diff --git a/Makefile b/Makefile index fe04aeb31..9797f69f8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .DEFAULT_GOAL:=help -.PHONY: help check-imports check-conventions check-api check-dependencies check-packaging check-import-stability install format-java check-java build-java generate-protocol-tests generate-codegen-output-py api-snapshot aio-check changelog-check canonical-imports dunder-all source-order dynamic-imports banned-imports ruff-extra docstrings declared-deps import-cycles dep-specifiers package-metadata version-consistency export-names exception-hierarchy secret-repr import-hygiene import-deprecations import-side-effects import-cost wheel-contents type-completeness optional-deps lowest-bounds gen ci lint-py check-py lint-rust check-rust third-party-licenses test-py test-protocols typecheck-protocols static-analysis test-unit test-functional test-integration benchmark build-py clean +.PHONY: help check-imports check-conventions check-api check-dependencies check-packaging check-import-stability install format-java check-java build-java generate-protocol-tests generate-codegen-output-py check-codegen-output-py test-codegen-output-py api-snapshot aio-check changelog-check canonical-imports dunder-all source-order dynamic-imports banned-imports ruff-extra docstrings declared-deps import-cycles dep-specifiers package-metadata version-consistency export-names exception-hierarchy secret-repr import-hygiene import-deprecations import-side-effects import-cost wheel-contents type-completeness optional-deps lowest-bounds gen ci lint-py check-py lint-rust check-rust third-party-licenses test-py test-protocols typecheck-protocols static-analysis test-unit test-functional test-integration benchmark build-py clean help: ## Show this help. @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-25s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST) @@ -17,6 +17,7 @@ static-analysis: ## Catches defects CI can find without running the code's tests $(MAKE) check-packaging $(MAKE) check-import-stability $(MAKE) check-api + $(MAKE) check-codegen-output-py test-unit: ## Runs the python unit tests. @@ -34,7 +35,8 @@ test-functional: ## Runs the python functional tests and test-protocols. test-integration: ## Builds and tests the Java codegen and asserts the regenerated snapshots match. $(MAKE) build-java $(MAKE) generate-protocol-tests - $(MAKE) generate-codegen-output-py + $(MAKE) check-codegen-output-py + $(MAKE) test-codegen-output-py ci: ## Runs the full CI sequence locally. @@ -132,17 +134,19 @@ generate-protocol-tests: ## Generates protocol-test clients, copies them to ./co @echo "codegen-output is up to date." -generate-codegen-output-py: ## Generates Python output and asserts no snapshot diff. - rm -rf codegen-output-py +generate-codegen-output-py: ## Regenerates standalone types snapshots using only Python. uv run python scripts/codegen-output-py/generate.py - @if ! git diff --quiet --exit-code -- codegen-output-py || [ -n "$$(git ls-files --others --exclude-standard -- codegen-output-py)" ]; then \ - echo "ERROR: generated codegen-output-py differs from the committed snapshot."; \ - echo "Review the diff and commit it if the change is intended:"; \ - git --no-pager status --short -- codegen-output-py; \ - git --no-pager diff -- codegen-output-py; \ - exit 1; \ - fi - @echo "codegen-output-py is up to date." + + +check-codegen-output-py: ## Checks native snapshots, Ruff, and strict Pyright using only Python. + uv run python scripts/codegen-output-py/generate.py --check + uv run ruff check scripts/codegen-output-py codegen-output-py --config pyproject.toml + uv run ruff format --check scripts/codegen-output-py codegen-output-py --config pyproject.toml + uv run pyright --project scripts/codegen-output-py/pyrightconfig.json + + +test-codegen-output-py: ## Checks native model/schema behavior against the ASTs and Java snapshots. + uv run pytest scripts/codegen-output-py/tests --no-cov api-snapshot: ## Records the public API surface and dual-mode mirrors of each package and asserts no git diff. diff --git a/codegen-output-py/aws-json-1-0/.smithy-python-manifest.json b/codegen-output-py/aws-json-1-0/.smithy-python-manifest.json new file mode 100644 index 000000000..84931a84f --- /dev/null +++ b/codegen-output-py/aws-json-1-0/.smithy-python-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "README.md": "767e060d5d96f9a0ca03b7855b5c44f45c5b06969c3246b7e7f03fefb92300ec", + "pyproject.toml": "d09f5af8330c8de6457c45a24952476adc4e53eb138a954e2221afd1b2be6cd3", + "src/awsjson10/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/awsjson10/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/awsjson10/_private/schemas.py": "e915ac3d2ddf32319cc868437dc2f1320fa799993d72e08886f7ff12430f743e", + "src/awsjson10/models.py": "bab8e32bb4d8e30eea86ae4ae6edb727934e11209506353bc3c4baeef1d79b6d", + "src/awsjson10/models.pyi": "4484730b2e0464045ab86690fb55ebeb2c6469de6e545b5772b6b425ec54e65d", + "src/awsjson10/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/aws-json-1-0/README.md b/codegen-output-py/aws-json-1-0/README.md new file mode 100644 index 000000000..15eaaf075 --- /dev/null +++ b/codegen-output-py/aws-json-1-0/README.md @@ -0,0 +1,5 @@ + + +## awsjson10 Types Package + +Native Python types for the aws-json-1-0 projection diff --git a/codegen-output-py/aws-json-1-0/pyproject.toml b/codegen-output-py/aws-json-1-0/pyproject.toml new file mode 100644 index 000000000..40f1f2b7c --- /dev/null +++ b/codegen-output-py/aws-json-1-0/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "awsjson10" +version = "0.0.1" +description = "Native Python types for the aws-json-1-0 projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "awsjson10"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/awsjson10", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/aws-json-1-0/src/awsjson10/__init__.py b/codegen-output-py/aws-json-1-0/src/awsjson10/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/aws-json-1-0/src/awsjson10/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/aws-json-1-0/src/awsjson10/_private/__init__.py b/codegen-output-py/aws-json-1-0/src/awsjson10/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/aws-json-1-0/src/awsjson10/_private/schemas.py b/codegen-output-py/aws-json-1-0/src/awsjson10/_private/schemas.py new file mode 100644 index 000000000..9ae476dae --- /dev/null +++ b/codegen-output-py/aws-json-1-0/src/awsjson10/_private/schemas.py @@ -0,0 +1,866 @@ +from types import MappingProxyType + +from smithy_core._schema_compact import StaticSchema + +n0 = "aws.protocoltests.json10" +_s0 = "ClientOptionalDefaults" +_s1 = "member" +_s2 = "smithy.api#default" +_s3 = "ComplexNestedErrorData" +_s4 = "Foo" +_s5 = "smithy.api#jsonName" +_s6 = "Fooooo" +_s7 = "ComplexError" +_s8 = "smithy.api#error" +_s9 = "client" +_s10 = "TopLevel" +_s11 = "Nested" +_s12 = "ContentTypeParametersInput" +_s13 = "smithy.api#input" +_s14 = "value" +_s15 = "ContentTypeParametersOutput" +_s16 = "smithy.api#output" +_s17 = "TestStringList" +_s18 = "TestStringMap" +_s19 = "key" +_s20 = "TestEnum" +_s21 = "FOO" +_s22 = "smithy.api#enumValue" +_s23 = "BAR" +_s24 = "BAZ" +_s25 = "TestIntEnum" +_s26 = "ONE" +_s27 = "TWO" +_s28 = "Defaults" +_s29 = "defaultString" +_s30 = "hi" +_s31 = "defaultBoolean" +_s32 = "defaultList" +_s33 = "defaultDocumentMap" +_s34 = "defaultDocumentString" +_s35 = "defaultDocumentBoolean" +_s36 = "defaultDocumentList" +_s37 = "defaultNullDocument" +_s38 = "defaultTimestamp" +_s39 = "defaultBlob" +_s40 = "YWJj" +_s41 = "defaultByte" +_s42 = "defaultShort" +_s43 = "defaultInteger" +_s44 = "defaultLong" +_s45 = "defaultFloat" +_s46 = "defaultDouble" +_s47 = "defaultMap" +_s48 = "defaultEnum" +_s49 = "defaultIntEnum" +_s50 = "emptyString" +_s51 = "" +_s52 = "falseBoolean" +_s53 = "emptyBlob" +_s54 = "zeroByte" +_s55 = "zeroShort" +_s56 = "zeroInteger" +_s57 = "zeroLong" +_s58 = "zeroFloat" +_s59 = "zeroDouble" +_s60 = "Farewell" +_s61 = "phrase" +_s62 = "bye" +_s63 = "Dialog" +_s64 = "language" +_s65 = "greeting" +_s66 = "farewell" +_s67 = "DialogList" +_s68 = "DialogMap" +_s69 = "EmptyInputAndEmptyOutputInput" +_s70 = "EmptyInputAndEmptyOutputOutput" +_s71 = "EndpointWithHostLabelOperationInput" +_s72 = "label" +_s73 = "FooError" +_s74 = "server" +_s75 = "GreetingWithErrorsInput" +_s76 = "GreetingWithErrorsOutput" +_s77 = "InvalidGreeting" +_s78 = "Message" +n1 = "aws.protocoltests.shared" +_s79 = "FooEnum" +_s80 = "Baz" +_s81 = "Bar" +_s82 = "1" +_s83 = "ZERO" +_s84 = "0" +_s85 = "IntegerEnum" +_s86 = "A" +_s87 = "B" +_s88 = "C" +_s89 = "StringList" +_s90 = "StringMap" +_s91 = "GreetingStruct" +_s92 = "MyUnion" +_s93 = "stringValue" +_s94 = "booleanValue" +_s95 = "numberValue" +_s96 = "blobValue" +_s97 = "timestampValue" +_s98 = "enumValue" +_s99 = "intEnumValue" +_s100 = "listValue" +_s101 = "mapValue" +_s102 = "structureValue" +_s103 = "JsonUnionsInput" +_s104 = "contents" +_s105 = "JsonUnionsOutput" +_s106 = "NoInputAndOutputOutput" +_s107 = "OperationWithDefaultsInput" +_s108 = "defaults" +_s109 = "clientOptionalDefaults" +_s110 = "topLevelDefault" +_s111 = "otherTopLevelDefault" +_s112 = "OperationWithDefaultsOutput" +_s113 = "dialog" +_s114 = "dialogList" +_s115 = "dialogMap" +_s116 = "OperationWithNestedStructureInput" +_s117 = "topLevel" +_s118 = "OperationWithNestedStructureOutput" +_s119 = "RequiredStringList" +_s120 = "RequiredStringMap" +_s121 = "OperationWithRequiredMembersOutput" +_s122 = "requiredString" +_s123 = "requiredBoolean" +_s124 = "requiredList" +_s125 = "requiredTimestamp" +_s126 = "requiredBlob" +_s127 = "requiredByte" +_s128 = "requiredShort" +_s129 = "requiredInteger" +_s130 = "requiredLong" +_s131 = "requiredFloat" +_s132 = "requiredDouble" +_s133 = "requiredMap" +_s134 = "RequiredEnum" +_s135 = "RequiredIntEnum" +_s136 = "OperationWithRequiredMembersWithDefaultsOutput" +_s137 = "smithy.api#required" +_s138 = "YmxvYg==" +_s139 = "requiredEnum" +_s140 = "requiredIntEnum" +_s141 = "PutWithContentEncodingInput" +_s142 = "encoding" +_s143 = "smithy.api#httpHeader" +_s144 = "Content-Encoding" +_s145 = "data" +_s146 = "SimpleScalarPropertiesInput" +_s147 = "floatValue" +_s148 = "doubleValue" +_s149 = "SimpleScalarPropertiesOutput" + +CLIENT_OPTIONAL_DEFAULTS: StaticSchema = ( + 18, + n0, + _s0, + 0, + (_s1,), + ((7, {_s2: 0}),), +) + +COMPLEX_NESTED_ERROR_DATA: StaticSchema = ( + 18, + n0, + _s3, + 0, + (_s4,), + ((3, {_s5: _s6}),), +) + +COMPLEX_ERROR: StaticSchema = ( + 18, + n0, + _s7, + {_s8: _s9}, + ( + _s10, + _s11, + ), + ( + (3, 0), + (COMPLEX_NESTED_ERROR_DATA, 0), + ), +) + +CONTENT_TYPE_PARAMETERS_INPUT: StaticSchema = ( + 18, + n0, + _s12, + {_s13: None}, + (_s14,), + ((7, 0),), +) + +CONTENT_TYPE_PARAMETERS_OUTPUT: StaticSchema = ( + 18, + n0, + _s15, + {_s16: None}, +) + +TEST_STRING_LIST: StaticSchema = ( + 16, + n0, + _s17, + 0, + (_s1,), + ((3, 0),), +) + +TEST_STRING_MAP: StaticSchema = ( + 17, + n0, + _s18, + 0, + ( + _s19, + _s14, + ), + ( + (3, 0), + (3, 0), + ), +) + +TEST_ENUM: StaticSchema = ( + 14, + n0, + _s20, + 0, + ( + _s21, + _s23, + _s24, + ), + ( + (-1, {_s22: _s21}), + (-1, {_s22: _s23}), + (-1, {_s22: _s24}), + ), +) + +TEST_INT_ENUM: StaticSchema = ( + 15, + n0, + _s25, + 0, + ( + _s26, + _s27, + ), + ( + (-1, {_s22: 1}), + (-1, {_s22: 2}), + ), +) + +DEFAULTS: StaticSchema = ( + 18, + n0, + _s28, + 0, + ( + _s29, + _s31, + _s32, + _s33, + _s34, + _s35, + _s36, + _s37, + _s38, + _s39, + _s41, + _s42, + _s43, + _s44, + _s45, + _s46, + _s47, + _s48, + _s49, + _s50, + _s52, + _s53, + _s54, + _s55, + _s56, + _s57, + _s58, + _s59, + ), + ( + (3, {_s2: _s30}), + (2, {_s2: True}), + (TEST_STRING_LIST, {_s2: ()}), + (13, {_s2: MappingProxyType[str, object]({})}), + (13, {_s2: _s30}), + (13, {_s2: True}), + (13, {_s2: ()}), + (13, {_s2: None}), + (4, {_s2: 0}), + (1, {_s2: _s40}), + (5, {_s2: 1}), + (6, {_s2: 1}), + (7, {_s2: 10}), + (8, {_s2: 100}), + (9, {_s2: 1.0}), + (10, {_s2: 1.0}), + (TEST_STRING_MAP, {_s2: MappingProxyType[str, object]({})}), + (TEST_ENUM, {_s2: _s21}), + (TEST_INT_ENUM, {_s2: 1}), + (3, {_s2: _s51}), + (2, {_s2: False}), + (1, {_s2: _s51}), + (5, {_s2: 0}), + (6, {_s2: 0}), + (7, {_s2: 0}), + (8, {_s2: 0}), + (9, {_s2: 0.0}), + (10, {_s2: 0.0}), + ), +) + +FAREWELL: StaticSchema = ( + 18, + n0, + _s60, + 0, + (_s61,), + ((3, {_s2: _s62}),), +) + +DIALOG: StaticSchema = ( + 18, + n0, + _s63, + 0, + ( + _s64, + _s65, + _s66, + ), + ( + (3, 0), + (3, {_s2: _s30}), + (FAREWELL, 0), + ), +) + +DIALOG_LIST: StaticSchema = ( + 16, + n0, + _s67, + 0, + (_s1,), + ((DIALOG, 0),), +) + +DIALOG_MAP: StaticSchema = ( + 17, + n0, + _s68, + 0, + ( + _s19, + _s14, + ), + ( + (3, 0), + (DIALOG, 0), + ), +) + +EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT: StaticSchema = ( + 18, + n0, + _s69, + {_s13: None}, +) + +EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s70, + {_s16: None}, +) + +ENDPOINT_WITH_HOST_LABEL_OPERATION_INPUT: StaticSchema = ( + 18, + n0, + _s71, + {_s13: None}, + (_s72,), + ((3, 257),), +) + +FOO_ERROR: StaticSchema = ( + 18, + n0, + _s73, + {_s8: _s74}, +) + +GREETING_WITH_ERRORS_INPUT: StaticSchema = ( + 18, + n0, + _s75, + {_s13: None}, + (_s65,), + ((3, 0),), +) + +GREETING_WITH_ERRORS_OUTPUT: StaticSchema = ( + 18, + n0, + _s76, + {_s16: None}, + (_s65,), + ((3, 0),), +) + +INVALID_GREETING: StaticSchema = ( + 18, + n0, + _s77, + {_s8: _s9}, + (_s78,), + ((3, 0),), +) + +FOO_ENUM: StaticSchema = ( + 14, + n1, + _s79, + 0, + ( + _s21, + _s24, + _s23, + _s26, + _s83, + ), + ( + (-1, {_s22: _s4}), + (-1, {_s22: _s80}), + (-1, {_s22: _s81}), + (-1, {_s22: _s82}), + (-1, {_s22: _s84}), + ), +) + +INTEGER_ENUM: StaticSchema = ( + 15, + n1, + _s85, + 0, + ( + _s86, + _s87, + _s88, + ), + ( + (-1, {_s22: 1}), + (-1, {_s22: 2}), + (-1, {_s22: 3}), + ), +) + +STRING_LIST: StaticSchema = ( + 16, + n1, + _s89, + 0, + (_s1,), + ((3, 0),), +) + +STRING_MAP: StaticSchema = ( + 17, + n1, + _s90, + 0, + ( + _s19, + _s14, + ), + ( + (3, 0), + (3, 0), + ), +) + +GREETING_STRUCT: StaticSchema = ( + 18, + n1, + _s91, + 0, + (_s30,), + ((3, 0),), +) + +MY_UNION: StaticSchema = ( + 19, + n0, + _s92, + 0, + ( + _s93, + _s94, + _s95, + _s96, + _s97, + _s98, + _s99, + _s100, + _s101, + _s102, + ), + ( + (3, 0), + (2, 0), + (7, 0), + (1, 0), + (4, 0), + (FOO_ENUM, 0), + (INTEGER_ENUM, 0), + (STRING_LIST, 0), + (STRING_MAP, 0), + (GREETING_STRUCT, 0), + ), +) + +JSON_UNIONS_INPUT: StaticSchema = ( + 18, + n0, + _s103, + {_s13: None}, + (_s104,), + ((MY_UNION, 0),), +) + +JSON_UNIONS_OUTPUT: StaticSchema = ( + 18, + n0, + _s105, + {_s16: None}, + (_s104,), + ((MY_UNION, 0),), +) + +NO_INPUT_AND_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s106, + {_s16: None}, +) + +OPERATION_WITH_DEFAULTS_INPUT: StaticSchema = ( + 18, + n0, + _s107, + {_s13: None}, + ( + _s108, + _s109, + _s110, + _s111, + ), + ( + (DEFAULTS, 0), + (CLIENT_OPTIONAL_DEFAULTS, 0), + (3, {_s2: _s30}), + (7, {_s2: 0}), + ), +) + +OPERATION_WITH_DEFAULTS_OUTPUT: StaticSchema = ( + 18, + n0, + _s112, + {_s16: None}, + ( + _s29, + _s31, + _s32, + _s33, + _s34, + _s35, + _s36, + _s37, + _s38, + _s39, + _s41, + _s42, + _s43, + _s44, + _s45, + _s46, + _s47, + _s48, + _s49, + _s50, + _s52, + _s53, + _s54, + _s55, + _s56, + _s57, + _s58, + _s59, + ), + ( + (3, {_s2: _s30}), + (2, {_s2: True}), + (TEST_STRING_LIST, {_s2: ()}), + (13, {_s2: MappingProxyType[str, object]({})}), + (13, {_s2: _s30}), + (13, {_s2: True}), + (13, {_s2: ()}), + (13, {_s2: None}), + (4, {_s2: 0}), + (1, {_s2: _s40}), + (5, {_s2: 1}), + (6, {_s2: 1}), + (7, {_s2: 10}), + (8, {_s2: 100}), + (9, {_s2: 1.0}), + (10, {_s2: 1.0}), + (TEST_STRING_MAP, {_s2: MappingProxyType[str, object]({})}), + (TEST_ENUM, {_s2: _s21}), + (TEST_INT_ENUM, {_s2: 1}), + (3, {_s2: _s51}), + (2, {_s2: False}), + (1, {_s2: _s51}), + (5, {_s2: 0}), + (6, {_s2: 0}), + (7, {_s2: 0}), + (8, {_s2: 0}), + (9, {_s2: 0.0}), + (10, {_s2: 0.0}), + ), +) + +TOP_LEVEL: StaticSchema = ( + 18, + n0, + _s10, + 0, + ( + _s113, + _s114, + _s115, + ), + ( + (DIALOG, 1), + (DIALOG_LIST, {_s2: ()}), + (DIALOG_MAP, {_s2: MappingProxyType[str, object]({})}), + ), +) + +OPERATION_WITH_NESTED_STRUCTURE_INPUT: StaticSchema = ( + 18, + n0, + _s116, + {_s13: None}, + (_s117,), + ((TOP_LEVEL, 1),), +) + +OPERATION_WITH_NESTED_STRUCTURE_OUTPUT: StaticSchema = ( + 18, + n0, + _s118, + {_s16: None}, + ( + _s113, + _s114, + _s115, + ), + ( + (DIALOG, 1), + (DIALOG_LIST, {_s2: ()}), + (DIALOG_MAP, {_s2: MappingProxyType[str, object]({})}), + ), +) + +REQUIRED_STRING_LIST: StaticSchema = ( + 16, + n0, + _s119, + 0, + (_s1,), + ((3, 0),), +) + +REQUIRED_STRING_MAP: StaticSchema = ( + 17, + n0, + _s120, + 0, + ( + _s19, + _s14, + ), + ( + (3, 0), + (3, 0), + ), +) + +OPERATION_WITH_REQUIRED_MEMBERS_OUTPUT: StaticSchema = ( + 18, + n0, + _s121, + {_s16: None}, + ( + _s122, + _s123, + _s124, + _s125, + _s126, + _s127, + _s128, + _s129, + _s130, + _s131, + _s132, + _s133, + ), + ( + (3, 1), + (2, 1), + (REQUIRED_STRING_LIST, 1), + (4, 1), + (1, 1), + (5, 1), + (6, 1), + (7, 1), + (8, 1), + (9, 1), + (10, 1), + (REQUIRED_STRING_MAP, 1), + ), +) + +REQUIRED_ENUM: StaticSchema = ( + 14, + n0, + _s134, + 0, + ( + _s21, + _s23, + _s24, + ), + ( + (-1, {_s22: _s21}), + (-1, {_s22: _s23}), + (-1, {_s22: _s24}), + ), +) + +REQUIRED_INT_ENUM: StaticSchema = ( + 15, + n0, + _s135, + 0, + ( + _s26, + _s27, + ), + ( + (-1, {_s22: 1}), + (-1, {_s22: 2}), + ), +) + +OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS_OUTPUT: StaticSchema = ( + 18, + n0, + _s136, + {_s16: None}, + ( + _s122, + _s123, + _s124, + _s125, + _s126, + _s127, + _s128, + _s129, + _s130, + _s131, + _s132, + _s133, + _s139, + _s140, + ), + ( + (3, {_s2: _s30, _s137: None}), + (2, {_s2: True, _s137: None}), + (REQUIRED_STRING_LIST, {_s2: (), _s137: None}), + (4, {_s2: 1, _s137: None}), + (1, {_s2: _s138, _s137: None}), + (5, {_s2: 1, _s137: None}), + (6, {_s2: 1, _s137: None}), + (7, {_s2: 10, _s137: None}), + (8, {_s2: 100, _s137: None}), + (9, {_s2: 1.0, _s137: None}), + (10, {_s2: 1.0, _s137: None}), + (REQUIRED_STRING_MAP, {_s2: MappingProxyType[str, object]({}), _s137: None}), + (REQUIRED_ENUM, {_s2: _s21, _s137: None}), + (REQUIRED_INT_ENUM, {_s2: 1, _s137: None}), + ), +) + +PUT_WITH_CONTENT_ENCODING_INPUT: StaticSchema = ( + 18, + n0, + _s141, + {_s13: None}, + ( + _s142, + _s145, + ), + ( + (3, {_s143: _s144}), + (3, 0), + ), +) + +SIMPLE_SCALAR_PROPERTIES_INPUT: StaticSchema = ( + 18, + n0, + _s146, + {_s13: None}, + ( + _s147, + _s148, + ), + ( + (9, 0), + (10, 0), + ), +) + +SIMPLE_SCALAR_PROPERTIES_OUTPUT: StaticSchema = ( + 18, + n0, + _s149, + {_s16: None}, + ( + _s147, + _s148, + ), + ( + (9, 0), + (10, 0), + ), +) diff --git a/codegen-output-py/aws-json-1-0/src/awsjson10/models.py b/codegen-output-py/aws-json-1-0/src/awsjson10/models.py new file mode 100644 index 000000000..afa865f33 --- /dev/null +++ b/codegen-output-py/aws-json-1-0/src/awsjson10/models.py @@ -0,0 +1,131 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "ClientOptionalDefaults": "CLIENT_OPTIONAL_DEFAULTS", + "ComplexError": "COMPLEX_ERROR", + "ComplexNestedErrorData": "COMPLEX_NESTED_ERROR_DATA", + "ContentTypeParametersInput": "CONTENT_TYPE_PARAMETERS_INPUT", + "ContentTypeParametersOutput": "CONTENT_TYPE_PARAMETERS_OUTPUT", + "Defaults": "DEFAULTS", + "Dialog": "DIALOG", + "EmptyInputAndEmptyOutputInput": "EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT", + "EmptyInputAndEmptyOutputOutput": "EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT", + "EndpointWithHostLabelOperationInput": "ENDPOINT_WITH_HOST_LABEL_OPERATION_INPUT", + "Farewell": "FAREWELL", + "FooError": "FOO_ERROR", + "GreetingWithErrorsInput": "GREETING_WITH_ERRORS_INPUT", + "GreetingWithErrorsOutput": "GREETING_WITH_ERRORS_OUTPUT", + "InvalidGreeting": "INVALID_GREETING", + "JsonUnionsInput": "JSON_UNIONS_INPUT", + "JsonUnionsOutput": "JSON_UNIONS_OUTPUT", + "MyUnion": "MY_UNION", + "MyUnionStringValue": "MY_UNION", + "MyUnionBooleanValue": "MY_UNION", + "MyUnionNumberValue": "MY_UNION", + "MyUnionBlobValue": "MY_UNION", + "MyUnionTimestampValue": "MY_UNION", + "MyUnionEnumValue": "MY_UNION", + "MyUnionIntEnumValue": "MY_UNION", + "MyUnionListValue": "MY_UNION", + "MyUnionMapValue": "MY_UNION", + "MyUnionStructureValue": "MY_UNION", + "MyUnionUnknown": "MY_UNION", + "NoInputAndOutputOutput": "NO_INPUT_AND_OUTPUT_OUTPUT", + "OperationWithDefaultsInput": "OPERATION_WITH_DEFAULTS_INPUT", + "OperationWithDefaultsOutput": "OPERATION_WITH_DEFAULTS_OUTPUT", + "OperationWithNestedStructureInput": "OPERATION_WITH_NESTED_STRUCTURE_INPUT", + "OperationWithNestedStructureOutput": "OPERATION_WITH_NESTED_STRUCTURE_OUTPUT", + "OperationWithRequiredMembersOutput": "OPERATION_WITH_REQUIRED_MEMBERS_OUTPUT", + "OperationWithRequiredMembersWithDefaultsOutput": "OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS_OUTPUT", + "PutWithContentEncodingInput": "PUT_WITH_CONTENT_ENCODING_INPUT", + "RequiredEnum": "REQUIRED_ENUM", + "RequiredIntEnum": "REQUIRED_INT_ENUM", + "SimpleScalarPropertiesInput": "SIMPLE_SCALAR_PROPERTIES_INPUT", + "SimpleScalarPropertiesOutput": "SIMPLE_SCALAR_PROPERTIES_OUTPUT", + "TestEnum": "TEST_ENUM", + "TestIntEnum": "TEST_INT_ENUM", + "TopLevel": "TOP_LEVEL", + "FooEnum": "FOO_ENUM", + "GreetingStruct": "GREETING_STRUCT", + "IntegerEnum": "INTEGER_ENUM", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "ClientOptionalDefaults", + "ComplexError", + "ComplexNestedErrorData", + "ContentTypeParametersInput", + "ContentTypeParametersOutput", + "Defaults", + "Dialog", + "EmptyInputAndEmptyOutputInput", + "EmptyInputAndEmptyOutputOutput", + "EndpointWithHostLabelOperationInput", + "Farewell", + "FooEnum", + "FooError", + "GreetingStruct", + "GreetingWithErrorsInput", + "GreetingWithErrorsOutput", + "IntegerEnum", + "InvalidGreeting", + "JsonUnionsInput", + "JsonUnionsOutput", + "MyUnion", + "NoInputAndOutputOutput", + "OperationWithDefaultsInput", + "OperationWithDefaultsOutput", + "OperationWithNestedStructureInput", + "OperationWithNestedStructureOutput", + "OperationWithRequiredMembersOutput", + "OperationWithRequiredMembersWithDefaultsOutput", + "PutWithContentEncodingInput", + "RequiredEnum", + "RequiredIntEnum", + "SimpleScalarPropertiesInput", + "SimpleScalarPropertiesOutput", + "TestEnum", + "TestIntEnum", + "TopLevel", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/aws-json-1-0/src/awsjson10/models.pyi b/codegen-output-py/aws-json-1-0/src/awsjson10/models.pyi new file mode 100644 index 000000000..2df1c9fc4 --- /dev/null +++ b/codegen-output-py/aws-json-1-0/src/awsjson10/models.pyi @@ -0,0 +1,543 @@ +from dataclasses import dataclass +from datetime import datetime +from enum import IntEnum, StrEnum +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.documents import Document +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.serializers import ShapeSerializer +from smithy_core.types import UnknownEnumMixin + +__all__ = [ + "ClientOptionalDefaults", + "ComplexError", + "ComplexNestedErrorData", + "ContentTypeParametersInput", + "ContentTypeParametersOutput", + "Defaults", + "Dialog", + "EmptyInputAndEmptyOutputInput", + "EmptyInputAndEmptyOutputOutput", + "EndpointWithHostLabelOperationInput", + "Farewell", + "FooEnum", + "FooError", + "GreetingStruct", + "GreetingWithErrorsInput", + "GreetingWithErrorsOutput", + "IntegerEnum", + "InvalidGreeting", + "JsonUnionsInput", + "JsonUnionsOutput", + "MyUnion", + "MyUnionBlobValue", + "MyUnionBooleanValue", + "MyUnionEnumValue", + "MyUnionIntEnumValue", + "MyUnionListValue", + "MyUnionMapValue", + "MyUnionNumberValue", + "MyUnionStringValue", + "MyUnionStructureValue", + "MyUnionTimestampValue", + "MyUnionUnknown", + "NoInputAndOutputOutput", + "OperationWithDefaultsInput", + "OperationWithDefaultsOutput", + "OperationWithNestedStructureInput", + "OperationWithNestedStructureOutput", + "OperationWithRequiredMembersOutput", + "OperationWithRequiredMembersWithDefaultsOutput", + "PutWithContentEncodingInput", + "RequiredEnum", + "RequiredIntEnum", + "ServiceError", + "SimpleScalarPropertiesInput", + "SimpleScalarPropertiesOutput", + "TestEnum", + "TestIntEnum", + "TopLevel", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class ClientOptionalDefaults(_SerdeShape): + "Dataclass for ClientOptionalDefaults structure." + + member: int | None = ... + +@dataclass(kw_only=True) +class ComplexError(ServiceError, _SerdeShape): + "This error is thrown when a request is invalid." + + top_level: str | None = ... + nested: ComplexNestedErrorData | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ComplexNestedErrorData(_SerdeShape): + "Dataclass for ComplexNestedErrorData structure." + + foo: str | None = ... + +@dataclass(kw_only=True) +class ContentTypeParametersInput(_SerdeShape): + "Dataclass for ContentTypeParametersInput structure." + + value: int | None = ... + +@dataclass(kw_only=True) +class ContentTypeParametersOutput(_SerdeShape): + "Dataclass for ContentTypeParametersOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class Defaults(_SerdeShape): + "Dataclass for Defaults structure." + + default_string: str | None = ... + default_boolean: bool | None = ... + default_list: list[str] | None = ... + default_document_map: Document | None = ... + default_document_string: Document | None = ... + default_document_boolean: Document | None = ... + default_document_list: Document | None = ... + default_null_document: Document | None = ... + default_timestamp: datetime | None = ... + default_blob: bytes | None = ... + default_byte: int | None = ... + default_short: int | None = ... + default_integer: int | None = ... + default_long: int | None = ... + default_float: float | None = ... + default_double: float | None = ... + default_map: dict[str, str] | None = ... + default_enum: str | None = ... + default_int_enum: int | None = ... + empty_string: str | None = ... + false_boolean: bool | None = ... + empty_blob: bytes | None = ... + zero_byte: int | None = ... + zero_short: int | None = ... + zero_integer: int | None = ... + zero_long: int | None = ... + zero_float: float | None = ... + zero_double: float | None = ... + +@dataclass(kw_only=True) +class Dialog(_SerdeShape): + "Dataclass for Dialog structure." + + language: str | None = ... + greeting: str | None = ... + farewell: Farewell | None = ... + +@dataclass(kw_only=True) +class EmptyInputAndEmptyOutputInput(_SerdeShape): + "Dataclass for EmptyInputAndEmptyOutputInput structure." + +@dataclass(kw_only=True) +class EmptyInputAndEmptyOutputOutput(_SerdeShape): + "Dataclass for EmptyInputAndEmptyOutputOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class EndpointWithHostLabelOperationInput(_SerdeShape): + "Dataclass for EndpointWithHostLabelOperationInput structure." + + label: str | None = ... + +@dataclass(kw_only=True) +class Farewell(_SerdeShape): + "Dataclass for Farewell structure." + + phrase: str | None = ... + +@dataclass(kw_only=True) +class FooError(ServiceError, _SerdeShape): + """ + This error has test cases that test some of the dark corners of Amazon + service + framework history. It should only be implemented by clients. + """ + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class GreetingWithErrorsInput(_SerdeShape): + "Dataclass for GreetingWithErrorsInput structure." + + greeting: str | None = ... + +@dataclass(kw_only=True) +class GreetingWithErrorsOutput(_SerdeShape): + "Dataclass for GreetingWithErrorsOutput structure." + + greeting: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class InvalidGreeting(ServiceError, _SerdeShape): + "This error is thrown when an invalid greeting value is provided." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class JsonUnionsInput(_SerdeShape): + "Dataclass for JsonUnionsInput structure." + + contents: MyUnion | None = ... + +@dataclass(kw_only=True) +class JsonUnionsOutput(_SerdeShape): + "Dataclass for JsonUnionsOutput structure." + + contents: MyUnion | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass +class MyUnionStringValue(_SerdeShape): + value: str + +@dataclass +class MyUnionBooleanValue(_SerdeShape): + value: bool + +@dataclass +class MyUnionNumberValue(_SerdeShape): + value: int + +@dataclass +class MyUnionBlobValue(_SerdeShape): + value: bytes + +@dataclass +class MyUnionTimestampValue(_SerdeShape): + value: datetime + +@dataclass +class MyUnionEnumValue(_SerdeShape): + value: str + +@dataclass +class MyUnionIntEnumValue(_SerdeShape): + value: int + +@dataclass +class MyUnionListValue(_SerdeShape): + value: list[str] + +@dataclass +class MyUnionMapValue(_SerdeShape): + value: dict[str, str] + +@dataclass +class MyUnionStructureValue(_SerdeShape): + value: GreetingStruct + +@dataclass +class MyUnionUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +MyUnion = ( + MyUnionStringValue + | MyUnionBooleanValue + | MyUnionNumberValue + | MyUnionBlobValue + | MyUnionTimestampValue + | MyUnionEnumValue + | MyUnionIntEnumValue + | MyUnionListValue + | MyUnionMapValue + | MyUnionStructureValue + | MyUnionUnknown +) +"A union with a representative set of types for members." + +class _MyUnionDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> MyUnion: ... + +@dataclass(kw_only=True) +class NoInputAndOutputOutput(_SerdeShape): + "Dataclass for NoInputAndOutputOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class OperationWithDefaultsInput(_SerdeShape): + "Dataclass for OperationWithDefaultsInput structure." + + defaults: Defaults | None = ... + client_optional_defaults: ClientOptionalDefaults | None = ... + top_level_default: str | None = ... + other_top_level_default: int | None = ... + +@dataclass(kw_only=True) +class OperationWithDefaultsOutput(_SerdeShape): + "Dataclass for OperationWithDefaultsOutput structure." + + default_string: str | None = ... + default_boolean: bool | None = ... + default_list: list[str] | None = ... + default_document_map: Document | None = ... + default_document_string: Document | None = ... + default_document_boolean: Document | None = ... + default_document_list: Document | None = ... + default_null_document: Document | None = ... + default_timestamp: datetime | None = ... + default_blob: bytes | None = ... + default_byte: int | None = ... + default_short: int | None = ... + default_integer: int | None = ... + default_long: int | None = ... + default_float: float | None = ... + default_double: float | None = ... + default_map: dict[str, str] | None = ... + default_enum: str | None = ... + default_int_enum: int | None = ... + empty_string: str | None = ... + false_boolean: bool | None = ... + empty_blob: bytes | None = ... + zero_byte: int | None = ... + zero_short: int | None = ... + zero_integer: int | None = ... + zero_long: int | None = ... + zero_float: float | None = ... + zero_double: float | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class OperationWithNestedStructureInput(_SerdeShape): + "Dataclass for OperationWithNestedStructureInput structure." + + top_level: TopLevel | None = ... + +@dataclass(kw_only=True) +class OperationWithNestedStructureOutput(_SerdeShape): + "Dataclass for OperationWithNestedStructureOutput structure." + + dialog: Dialog + dialog_list: list[Dialog] | None = ... + dialog_map: dict[str, Dialog] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class OperationWithRequiredMembersOutput(_SerdeShape): + "Dataclass for OperationWithRequiredMembersOutput structure." + + required_string: str + required_boolean: bool + required_list: list[str] + required_timestamp: datetime + required_blob: bytes + required_byte: int + required_short: int + required_integer: int + required_long: int + required_float: float + required_double: float + required_map: dict[str, str] + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class OperationWithRequiredMembersWithDefaultsOutput(_SerdeShape): + "Dataclass for OperationWithRequiredMembersWithDefaultsOutput structure." + + required_string: str | None = ... + required_boolean: bool | None = ... + required_list: list[str] | None = ... + required_timestamp: datetime | None = ... + required_blob: bytes | None = ... + required_byte: int | None = ... + required_short: int | None = ... + required_integer: int | None = ... + required_long: int | None = ... + required_float: float | None = ... + required_double: float | None = ... + required_map: dict[str, str] | None = ... + required_enum: str | None = ... + required_int_enum: int | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class PutWithContentEncodingInput(_SerdeShape): + "Dataclass for PutWithContentEncodingInput structure." + + encoding: str | None = ... + data: str | None = ... + +class RequiredEnum(UnknownEnumMixin, StrEnum): + FOO = "FOO" + BAR = "BAR" + BAZ = "BAZ" + +class RequiredIntEnum(UnknownEnumMixin, IntEnum): + ONE = 1 + TWO = 2 + +@dataclass(kw_only=True) +class SimpleScalarPropertiesInput(_SerdeShape): + "Dataclass for SimpleScalarPropertiesInput structure." + + float_value: float | None = ... + double_value: float | None = ... + +@dataclass(kw_only=True) +class SimpleScalarPropertiesOutput(_SerdeShape): + "Dataclass for SimpleScalarPropertiesOutput structure." + + float_value: float | None = ... + double_value: float | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +class TestEnum(UnknownEnumMixin, StrEnum): + FOO = "FOO" + BAR = "BAR" + BAZ = "BAZ" + +class TestIntEnum(UnknownEnumMixin, IntEnum): + ONE = 1 + TWO = 2 + +@dataclass(kw_only=True) +class TopLevel(_SerdeShape): + "Dataclass for TopLevel structure." + + dialog: Dialog + dialog_list: list[Dialog] | None = ... + dialog_map: dict[str, Dialog] | None = ... + +class FooEnum(UnknownEnumMixin, StrEnum): + FOO = "Foo" + BAZ = "Baz" + BAR = "Bar" + ONE = "1" + ZERO = "0" + +@dataclass(kw_only=True) +class GreetingStruct(_SerdeShape): + "Dataclass for GreetingStruct structure." + + hi: str | None = ... + +class IntegerEnum(UnknownEnumMixin, IntEnum): + A = 1 + B = 2 + C = 3 diff --git a/codegen-output-py/aws-json-1-0/src/awsjson10/py.typed b/codegen-output-py/aws-json-1-0/src/awsjson10/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/aws-json-1-1/.smithy-python-manifest.json b/codegen-output-py/aws-json-1-1/.smithy-python-manifest.json new file mode 100644 index 000000000..a9dd25058 --- /dev/null +++ b/codegen-output-py/aws-json-1-1/.smithy-python-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "README.md": "c4647f521c7bef71503b8a7d4d6cf0619345113a39bd0f32e683951ab170d284", + "pyproject.toml": "bc4ef7c18de00c107a59a9af6b332017e2ad56a0ce59e4099bbbe39ce117691f", + "src/awsjson11/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/awsjson11/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/awsjson11/_private/schemas.py": "7a77b126c4a2d011134c4d15ed688aecff85553b842eea67f9aee73228a53f36", + "src/awsjson11/models.py": "c44bb35dc4c85f06d814a3b38f1f802024c3c24d54c1534c06f10a64f95f2c3a", + "src/awsjson11/models.pyi": "de83945be2db0a56f63c5e1beaeebb56ea27300ea463288bf7a626a6bc21b4c8", + "src/awsjson11/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/aws-json-1-1/README.md b/codegen-output-py/aws-json-1-1/README.md new file mode 100644 index 000000000..bf53ab97f --- /dev/null +++ b/codegen-output-py/aws-json-1-1/README.md @@ -0,0 +1,5 @@ + + +## awsjson11 Types Package + +Native Python types for the aws-json-1-1 projection diff --git a/codegen-output-py/aws-json-1-1/pyproject.toml b/codegen-output-py/aws-json-1-1/pyproject.toml new file mode 100644 index 000000000..ca27aa92a --- /dev/null +++ b/codegen-output-py/aws-json-1-1/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "awsjson11" +version = "0.0.1" +description = "Native Python types for the aws-json-1-1 projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "awsjson11"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/awsjson11", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/aws-json-1-1/src/awsjson11/__init__.py b/codegen-output-py/aws-json-1-1/src/awsjson11/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/aws-json-1-1/src/awsjson11/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/aws-json-1-1/src/awsjson11/_private/__init__.py b/codegen-output-py/aws-json-1-1/src/awsjson11/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/aws-json-1-1/src/awsjson11/_private/schemas.py b/codegen-output-py/aws-json-1-1/src/awsjson11/_private/schemas.py new file mode 100644 index 000000000..30a37d5ad --- /dev/null +++ b/codegen-output-py/aws-json-1-1/src/awsjson11/_private/schemas.py @@ -0,0 +1,829 @@ +from smithy_core._schema_compact import StaticSchema + +n0 = "aws.protocoltests.json" +_s0 = "ComplexNestedErrorData" +_s1 = "Foo" +_s2 = "smithy.api#jsonName" +_s3 = "Fooooo" +_s4 = "ComplexError" +_s5 = "smithy.api#error" +_s6 = "client" +_s7 = "TopLevel" +_s8 = "Nested" +_s9 = "ContentTypeParametersInput" +_s10 = "smithy.api#input" +_s11 = "value" +_s12 = "ContentTypeParametersOutput" +_s13 = "smithy.api#output" +n1 = "aws.protocoltests.shared" +_s14 = "DateTime" +_s15 = "smithy.api#timestampFormat" +_s16 = "date-time" +_s17 = "DatetimeOffsetsOutput" +_s18 = "datetime" +_s19 = "Document" +_s20 = "EmptyStruct" +_s21 = "JsonValue" +_s22 = "smithy.api#mediaType" +_s23 = "application/json" +_s24 = "ListOfStrings" +_s25 = "member" +_s26 = "ListOfListOfStrings" +_s27 = "MapOfStrings" +_s28 = "key" +_s29 = "ListOfMapsOfStrings" +_s30 = "SimpleStruct" +_s31 = "Value" +_s32 = "ListOfStructs" +_s33 = "MapOfListsOfStrings" +_s34 = "MapOfMapOfStrings" +_s35 = "MapOfStructs" +_s36 = "StructWithJsonName" +_s37 = "RenamedMember" +_s38 = "ErrorWithMembers" +_s39 = "Code" +_s40 = "ComplexData" +_s41 = "IntegerField" +_s42 = "ListField" +_s43 = "MapField" +_s44 = "Message" +_s45 = "StringField" +_s46 = "ErrorWithoutMembers" +_s47 = "server" +_s48 = "FooError" +_s49 = "FractionalSecondsOutput" +_s50 = "GreetingWithErrorsOutput" +_s51 = "greeting" +_s52 = "HostLabelInput" +_s53 = "label" +_s54 = "InvalidGreeting" +_s55 = "FooEnum" +_s56 = "FOO" +_s57 = "smithy.api#enumValue" +_s58 = "BAZ" +_s59 = "Baz" +_s60 = "BAR" +_s61 = "Bar" +_s62 = "ONE" +_s63 = "1" +_s64 = "ZERO" +_s65 = "0" +_s66 = "FooEnumList" +_s67 = "FooEnumSet" +_s68 = "FooEnumMap" +_s69 = "JsonEnumsInputOutput" +_s70 = "fooEnum1" +_s71 = "fooEnum2" +_s72 = "fooEnum3" +_s73 = "fooEnumList" +_s74 = "fooEnumSet" +_s75 = "fooEnumMap" +_s76 = "IntegerEnum" +_s77 = "A" +_s78 = "B" +_s79 = "C" +_s80 = "IntegerEnumList" +_s81 = "IntegerEnumSet" +_s82 = "IntegerEnumMap" +_s83 = "JsonIntEnumsInputOutput" +_s84 = "intEnum1" +_s85 = "intEnum2" +_s86 = "intEnum3" +_s87 = "intEnumList" +_s88 = "intEnumSet" +_s89 = "intEnumMap" +_s90 = "StringList" +_s91 = "StringMap" +_s92 = "GreetingStruct" +_s93 = "hi" +_s94 = "MyUnion" +_s95 = "stringValue" +_s96 = "booleanValue" +_s97 = "numberValue" +_s98 = "blobValue" +_s99 = "timestampValue" +_s100 = "enumValue" +_s101 = "listValue" +_s102 = "mapValue" +_s103 = "structureValue" +_s104 = "NullOperationInputOutput" +_s105 = "string" +_s106 = "OperationWithOptionalInputOutputInput" +_s107 = "OperationWithOptionalInputOutputOutput" +_s108 = "PutAndGetInlineDocumentsInputOutput" +_s109 = "inlineDocument" +_s110 = "PutWithContentEncodingInput" +_s111 = "encoding" +_s112 = "smithy.api#httpHeader" +_s113 = "Content-Encoding" +_s114 = "data" +_s115 = "SimpleScalarPropertiesInputOutput" +_s116 = "floatValue" +_s117 = "doubleValue" +_s118 = "SparseStringList" +_s119 = "SparseStringMap" +_s120 = "SparseNullsOperationInputOutput" +_s121 = "sparseStringList" +_s122 = "sparseStringMap" +_s123 = "UnionInputOutput" +_s124 = "contents" +_s125 = "KitchenSink" +_s126 = "Blob" +_s127 = "Boolean" +_s128 = "Double" +_s129 = "Float" +_s130 = "HttpdateTimestamp" +_s131 = "http-date" +_s132 = "Integer" +_s133 = "Iso8601Timestamp" +_s134 = "ListOfLists" +_s135 = "Long" +_s136 = "MapOfMaps" +_s137 = "RecursiveList" +_s138 = "RecursiveMap" +_s139 = "RecursiveStruct" +_s140 = "String" +_s141 = "Timestamp" +_s142 = "UnixTimestamp" +_s143 = "epoch-seconds" +_s144 = "ListOfKitchenSinks" +_s145 = "MapOfKitchenSinks" + +COMPLEX_NESTED_ERROR_DATA: StaticSchema = ( + 18, + n0, + _s0, + 0, + (_s1,), + ((3, {_s2: _s3}),), +) + +COMPLEX_ERROR: StaticSchema = ( + 18, + n0, + _s4, + {_s5: _s6}, + ( + _s7, + _s8, + ), + ( + (3, 0), + (COMPLEX_NESTED_ERROR_DATA, 0), + ), +) + +CONTENT_TYPE_PARAMETERS_INPUT: StaticSchema = ( + 18, + n0, + _s9, + {_s10: None}, + (_s11,), + ((7, 0),), +) + +CONTENT_TYPE_PARAMETERS_OUTPUT: StaticSchema = ( + 18, + n0, + _s12, + {_s13: None}, +) + +DATE_TIME: StaticSchema = ( + 4, + n1, + _s14, + {_s15: _s16}, +) + +DATETIME_OFFSETS_OUTPUT: StaticSchema = ( + 18, + n0, + _s17, + {_s13: None}, + (_s18,), + ((DATE_TIME, 0),), +) + +DOCUMENT: StaticSchema = ( + 13, + n0, + _s19, + 0, +) + +EMPTY_STRUCT: StaticSchema = ( + 18, + n0, + _s20, + 0, +) + +JSON_VALUE: StaticSchema = ( + 3, + n0, + _s21, + {_s22: _s23}, +) + +LIST_OF_STRINGS: StaticSchema = ( + 16, + n0, + _s24, + 0, + (_s25,), + ((3, 0),), +) + +LIST_OF_LIST_OF_STRINGS: StaticSchema = ( + 16, + n0, + _s26, + 0, + (_s25,), + ((LIST_OF_STRINGS, 0),), +) + +MAP_OF_STRINGS: StaticSchema = ( + 17, + n0, + _s27, + 0, + ( + _s28, + _s11, + ), + ( + (3, 0), + (3, 0), + ), +) + +LIST_OF_MAPS_OF_STRINGS: StaticSchema = ( + 16, + n0, + _s29, + 0, + (_s25,), + ((MAP_OF_STRINGS, 0),), +) + +SIMPLE_STRUCT: StaticSchema = ( + 18, + n0, + _s30, + 0, + (_s31,), + ((3, 0),), +) + +LIST_OF_STRUCTS: StaticSchema = ( + 16, + n0, + _s32, + 0, + (_s25,), + ((SIMPLE_STRUCT, 0),), +) + +MAP_OF_LISTS_OF_STRINGS: StaticSchema = ( + 17, + n0, + _s33, + 0, + ( + _s28, + _s11, + ), + ( + (3, 0), + (LIST_OF_STRINGS, 0), + ), +) + +MAP_OF_MAP_OF_STRINGS: StaticSchema = ( + 17, + n0, + _s34, + 0, + ( + _s28, + _s11, + ), + ( + (3, 0), + (MAP_OF_STRINGS, 0), + ), +) + +MAP_OF_STRUCTS: StaticSchema = ( + 17, + n0, + _s35, + 0, + ( + _s28, + _s11, + ), + ( + (3, 0), + (SIMPLE_STRUCT, 0), + ), +) + +STRUCT_WITH_JSON_NAME: StaticSchema = ( + 18, + n0, + _s36, + 0, + (_s31,), + ((3, {_s2: _s37}),), +) + +ERROR_WITH_MEMBERS: StaticSchema = ( + 18, + n0, + _s38, + {_s5: _s6}, + ( + _s39, + _s40, + _s41, + _s42, + _s43, + _s44, + _s45, + ), + ( + (3, 0), + (lambda: KITCHEN_SINK, 0), + (7, 0), + (LIST_OF_STRINGS, 0), + (MAP_OF_STRINGS, 0), + (3, 0), + (3, 0), + ), +) + +ERROR_WITHOUT_MEMBERS: StaticSchema = ( + 18, + n0, + _s46, + {_s5: _s47}, +) + +FOO_ERROR: StaticSchema = ( + 18, + n0, + _s48, + {_s5: _s47}, +) + +FRACTIONAL_SECONDS_OUTPUT: StaticSchema = ( + 18, + n0, + _s49, + {_s13: None}, + (_s18,), + ((DATE_TIME, 0),), +) + +GREETING_WITH_ERRORS_OUTPUT: StaticSchema = ( + 18, + n0, + _s50, + {_s13: None}, + (_s51,), + ((3, 0),), +) + +HOST_LABEL_INPUT: StaticSchema = ( + 18, + n0, + _s52, + {_s10: None}, + (_s53,), + ((3, 257),), +) + +INVALID_GREETING: StaticSchema = ( + 18, + n0, + _s54, + {_s5: _s6}, + (_s44,), + ((3, 0),), +) + +FOO_ENUM: StaticSchema = ( + 14, + n1, + _s55, + 0, + ( + _s56, + _s58, + _s60, + _s62, + _s64, + ), + ( + (-1, {_s57: _s1}), + (-1, {_s57: _s59}), + (-1, {_s57: _s61}), + (-1, {_s57: _s63}), + (-1, {_s57: _s65}), + ), +) + +FOO_ENUM_LIST: StaticSchema = ( + 16, + n1, + _s66, + 0, + (_s25,), + ((FOO_ENUM, 0),), +) + +FOO_ENUM_SET: StaticSchema = ( + 16, + n1, + _s67, + 0, + (_s25,), + ((FOO_ENUM, 0),), +) + +FOO_ENUM_MAP: StaticSchema = ( + 17, + n1, + _s68, + 0, + ( + _s28, + _s11, + ), + ( + (3, 0), + (FOO_ENUM, 0), + ), +) + +JSON_ENUMS_INPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s69, + {_s10: None, _s13: None}, + ( + _s70, + _s71, + _s72, + _s73, + _s74, + _s75, + ), + ( + (FOO_ENUM, 0), + (FOO_ENUM, 0), + (FOO_ENUM, 0), + (FOO_ENUM_LIST, 0), + (FOO_ENUM_SET, 0), + (FOO_ENUM_MAP, 0), + ), +) + +INTEGER_ENUM: StaticSchema = ( + 15, + n1, + _s76, + 0, + ( + _s77, + _s78, + _s79, + ), + ( + (-1, {_s57: 1}), + (-1, {_s57: 2}), + (-1, {_s57: 3}), + ), +) + +INTEGER_ENUM_LIST: StaticSchema = ( + 16, + n1, + _s80, + 0, + (_s25,), + ((INTEGER_ENUM, 0),), +) + +INTEGER_ENUM_SET: StaticSchema = ( + 16, + n1, + _s81, + 0, + (_s25,), + ((INTEGER_ENUM, 0),), +) + +INTEGER_ENUM_MAP: StaticSchema = ( + 17, + n1, + _s82, + 0, + ( + _s28, + _s11, + ), + ( + (3, 0), + (INTEGER_ENUM, 0), + ), +) + +JSON_INT_ENUMS_INPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s83, + {_s10: None, _s13: None}, + ( + _s84, + _s85, + _s86, + _s87, + _s88, + _s89, + ), + ( + (INTEGER_ENUM, 0), + (INTEGER_ENUM, 0), + (INTEGER_ENUM, 0), + (INTEGER_ENUM_LIST, 0), + (INTEGER_ENUM_SET, 0), + (INTEGER_ENUM_MAP, 0), + ), +) + +STRING_LIST: StaticSchema = ( + 16, + n1, + _s90, + 0, + (_s25,), + ((3, 0),), +) + +STRING_MAP: StaticSchema = ( + 17, + n1, + _s91, + 0, + ( + _s28, + _s11, + ), + ( + (3, 0), + (3, 0), + ), +) + +GREETING_STRUCT: StaticSchema = ( + 18, + n1, + _s92, + 0, + (_s93,), + ((3, 0),), +) + +MY_UNION: StaticSchema = ( + 19, + n0, + _s94, + 0, + ( + _s95, + _s96, + _s97, + _s98, + _s99, + _s100, + _s101, + _s102, + _s103, + ), + ( + (3, 0), + (2, 0), + (7, 0), + (1, 0), + (4, 0), + (FOO_ENUM, 0), + (STRING_LIST, 0), + (STRING_MAP, 0), + (GREETING_STRUCT, 0), + ), +) + +NULL_OPERATION_INPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s104, + {_s10: None, _s13: None}, + (_s105,), + ((3, 0),), +) + +OPERATION_WITH_OPTIONAL_INPUT_OUTPUT_INPUT: StaticSchema = ( + 18, + n0, + _s106, + {_s10: None}, + (_s31,), + ((3, 0),), +) + +OPERATION_WITH_OPTIONAL_INPUT_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s107, + {_s13: None}, + (_s31,), + ((3, 0),), +) + +PUT_AND_GET_INLINE_DOCUMENTS_INPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s108, + {_s10: None, _s13: None}, + (_s109,), + ((DOCUMENT, 0),), +) + +PUT_WITH_CONTENT_ENCODING_INPUT: StaticSchema = ( + 18, + n0, + _s110, + {_s10: None}, + ( + _s111, + _s114, + ), + ( + (3, {_s112: _s113}), + (3, 0), + ), +) + +SIMPLE_SCALAR_PROPERTIES_INPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s115, + {_s10: None, _s13: None}, + ( + _s116, + _s117, + ), + ( + (9, 0), + (10, 0), + ), +) + +SPARSE_STRING_LIST: StaticSchema = ( + 16, + n1, + _s118, + 64, + (_s25,), + ((3, 0),), +) + +SPARSE_STRING_MAP: StaticSchema = ( + 17, + n1, + _s119, + 64, + ( + _s28, + _s11, + ), + ( + (3, 0), + (3, 0), + ), +) + +SPARSE_NULLS_OPERATION_INPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s120, + {_s10: None, _s13: None}, + ( + _s121, + _s122, + ), + ( + (SPARSE_STRING_LIST, 0), + (SPARSE_STRING_MAP, 0), + ), +) + +UNION_INPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s123, + {_s10: None, _s13: None}, + (_s124,), + ((MY_UNION, 0),), +) + +KITCHEN_SINK: StaticSchema = ( + 18, + n0, + _s125, + {_s10: None, _s13: None}, + ( + _s126, + _s127, + _s128, + _s20, + _s129, + _s130, + _s132, + _s133, + _s21, + _s134, + _s29, + _s24, + _s32, + _s135, + _s33, + _s136, + _s27, + _s35, + _s137, + _s138, + _s139, + _s30, + _s140, + _s36, + _s141, + _s142, + ), + ( + (1, 0), + (2, 0), + (10, 0), + (EMPTY_STRUCT, 0), + (9, 0), + (4, {_s15: _s131}), + (7, 0), + (4, {_s15: _s16}), + (JSON_VALUE, 0), + (LIST_OF_LIST_OF_STRINGS, 0), + (LIST_OF_MAPS_OF_STRINGS, 0), + (LIST_OF_STRINGS, 0), + (LIST_OF_STRUCTS, 0), + (8, 0), + (MAP_OF_LISTS_OF_STRINGS, 0), + (MAP_OF_MAP_OF_STRINGS, 0), + (MAP_OF_STRINGS, 0), + (MAP_OF_STRUCTS, 0), + (lambda: LIST_OF_KITCHEN_SINKS, 0), + (lambda: MAP_OF_KITCHEN_SINKS, 0), + (lambda: KITCHEN_SINK, 0), + (SIMPLE_STRUCT, 0), + (3, 0), + (STRUCT_WITH_JSON_NAME, 0), + (4, 0), + (4, {_s15: _s143}), + ), +) + +LIST_OF_KITCHEN_SINKS: StaticSchema = ( + 16, + n0, + _s144, + 0, + (_s25,), + ((KITCHEN_SINK, 0),), +) + +MAP_OF_KITCHEN_SINKS: StaticSchema = ( + 17, + n0, + _s145, + 0, + ( + _s28, + _s11, + ), + ( + (3, 0), + (KITCHEN_SINK, 0), + ), +) diff --git a/codegen-output-py/aws-json-1-1/src/awsjson11/models.py b/codegen-output-py/aws-json-1-1/src/awsjson11/models.py new file mode 100644 index 000000000..381c7cb68 --- /dev/null +++ b/codegen-output-py/aws-json-1-1/src/awsjson11/models.py @@ -0,0 +1,118 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "ComplexError": "COMPLEX_ERROR", + "ComplexNestedErrorData": "COMPLEX_NESTED_ERROR_DATA", + "ContentTypeParametersInput": "CONTENT_TYPE_PARAMETERS_INPUT", + "ContentTypeParametersOutput": "CONTENT_TYPE_PARAMETERS_OUTPUT", + "DatetimeOffsetsOutput": "DATETIME_OFFSETS_OUTPUT", + "EmptyStruct": "EMPTY_STRUCT", + "ErrorWithMembers": "ERROR_WITH_MEMBERS", + "ErrorWithoutMembers": "ERROR_WITHOUT_MEMBERS", + "FooError": "FOO_ERROR", + "FractionalSecondsOutput": "FRACTIONAL_SECONDS_OUTPUT", + "GreetingWithErrorsOutput": "GREETING_WITH_ERRORS_OUTPUT", + "HostLabelInput": "HOST_LABEL_INPUT", + "InvalidGreeting": "INVALID_GREETING", + "JsonEnumsInputOutput": "JSON_ENUMS_INPUT_OUTPUT", + "JsonIntEnumsInputOutput": "JSON_INT_ENUMS_INPUT_OUTPUT", + "KitchenSink": "KITCHEN_SINK", + "MyUnion": "MY_UNION", + "MyUnionStringValue": "MY_UNION", + "MyUnionBooleanValue": "MY_UNION", + "MyUnionNumberValue": "MY_UNION", + "MyUnionBlobValue": "MY_UNION", + "MyUnionTimestampValue": "MY_UNION", + "MyUnionEnumValue": "MY_UNION", + "MyUnionListValue": "MY_UNION", + "MyUnionMapValue": "MY_UNION", + "MyUnionStructureValue": "MY_UNION", + "MyUnionUnknown": "MY_UNION", + "NullOperationInputOutput": "NULL_OPERATION_INPUT_OUTPUT", + "OperationWithOptionalInputOutputInput": "OPERATION_WITH_OPTIONAL_INPUT_OUTPUT_INPUT", + "OperationWithOptionalInputOutputOutput": "OPERATION_WITH_OPTIONAL_INPUT_OUTPUT_OUTPUT", + "PutAndGetInlineDocumentsInputOutput": "PUT_AND_GET_INLINE_DOCUMENTS_INPUT_OUTPUT", + "PutWithContentEncodingInput": "PUT_WITH_CONTENT_ENCODING_INPUT", + "SimpleScalarPropertiesInputOutput": "SIMPLE_SCALAR_PROPERTIES_INPUT_OUTPUT", + "SimpleStruct": "SIMPLE_STRUCT", + "SparseNullsOperationInputOutput": "SPARSE_NULLS_OPERATION_INPUT_OUTPUT", + "StructWithJsonName": "STRUCT_WITH_JSON_NAME", + "UnionInputOutput": "UNION_INPUT_OUTPUT", + "FooEnum": "FOO_ENUM", + "GreetingStruct": "GREETING_STRUCT", + "IntegerEnum": "INTEGER_ENUM", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "ComplexError", + "ComplexNestedErrorData", + "ContentTypeParametersInput", + "ContentTypeParametersOutput", + "DatetimeOffsetsOutput", + "EmptyStruct", + "ErrorWithMembers", + "ErrorWithoutMembers", + "FooEnum", + "FooError", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "HostLabelInput", + "IntegerEnum", + "InvalidGreeting", + "JsonEnumsInputOutput", + "JsonIntEnumsInputOutput", + "KitchenSink", + "MyUnion", + "NullOperationInputOutput", + "OperationWithOptionalInputOutputInput", + "OperationWithOptionalInputOutputOutput", + "PutAndGetInlineDocumentsInputOutput", + "PutWithContentEncodingInput", + "SimpleScalarPropertiesInputOutput", + "SimpleStruct", + "SparseNullsOperationInputOutput", + "StructWithJsonName", + "UnionInputOutput", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/aws-json-1-1/src/awsjson11/models.pyi b/codegen-output-py/aws-json-1-1/src/awsjson11/models.pyi new file mode 100644 index 000000000..7f53aedde --- /dev/null +++ b/codegen-output-py/aws-json-1-1/src/awsjson11/models.pyi @@ -0,0 +1,496 @@ +from dataclasses import dataclass +from datetime import datetime +from enum import IntEnum, StrEnum +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.documents import Document +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.serializers import ShapeSerializer +from smithy_core.types import UnknownEnumMixin + +__all__ = [ + "ComplexError", + "ComplexNestedErrorData", + "ContentTypeParametersInput", + "ContentTypeParametersOutput", + "DatetimeOffsetsOutput", + "EmptyStruct", + "ErrorWithMembers", + "ErrorWithoutMembers", + "FooEnum", + "FooError", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "HostLabelInput", + "IntegerEnum", + "InvalidGreeting", + "JsonEnumsInputOutput", + "JsonIntEnumsInputOutput", + "KitchenSink", + "MyUnion", + "MyUnionBlobValue", + "MyUnionBooleanValue", + "MyUnionEnumValue", + "MyUnionListValue", + "MyUnionMapValue", + "MyUnionNumberValue", + "MyUnionStringValue", + "MyUnionStructureValue", + "MyUnionTimestampValue", + "MyUnionUnknown", + "NullOperationInputOutput", + "OperationWithOptionalInputOutputInput", + "OperationWithOptionalInputOutputOutput", + "PutAndGetInlineDocumentsInputOutput", + "PutWithContentEncodingInput", + "ServiceError", + "SimpleScalarPropertiesInputOutput", + "SimpleStruct", + "SparseNullsOperationInputOutput", + "StructWithJsonName", + "UnionInputOutput", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class ComplexError(ServiceError, _SerdeShape): + "This error is thrown when a request is invalid." + + top_level: str | None = ... + nested: ComplexNestedErrorData | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ComplexNestedErrorData(_SerdeShape): + "Dataclass for ComplexNestedErrorData structure." + + foo: str | None = ... + +@dataclass(kw_only=True) +class ContentTypeParametersInput(_SerdeShape): + "Dataclass for ContentTypeParametersInput structure." + + value: int | None = ... + +@dataclass(kw_only=True) +class ContentTypeParametersOutput(_SerdeShape): + "Dataclass for ContentTypeParametersOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class DatetimeOffsetsOutput(_SerdeShape): + "Dataclass for DatetimeOffsetsOutput structure." + + datetime_: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class EmptyStruct(_SerdeShape): + "Dataclass for EmptyStruct structure." + +@dataclass(kw_only=True) +class ErrorWithMembers(ServiceError, _SerdeShape): + "Dataclass for ErrorWithMembers structure." + + code: str | None = ... + complex_data: KitchenSink | None = ... + integer_field: int | None = ... + list_field: list[str] | None = ... + map_field: dict[str, str] | None = ... + string_field: str | None = ... + "abc" + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ErrorWithoutMembers(ServiceError, _SerdeShape): + "Dataclass for ErrorWithoutMembers structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FooError(ServiceError, _SerdeShape): + """ + This error has test cases that test some of the dark corners of Amazon + service + framework history. It should only be implemented by clients. + """ + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FractionalSecondsOutput(_SerdeShape): + "Dataclass for FractionalSecondsOutput structure." + + datetime_: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class GreetingWithErrorsOutput(_SerdeShape): + "Dataclass for GreetingWithErrorsOutput structure." + + greeting: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HostLabelInput(_SerdeShape): + "Dataclass for HostLabelInput structure." + + label: str | None = ... + +@dataclass(kw_only=True) +class InvalidGreeting(ServiceError, _SerdeShape): + "This error is thrown when an invalid greeting value is provided." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class JsonEnumsInputOutput(_SerdeShape): + "Dataclass for JsonEnumsInputOutput structure." + + foo_enum1: str | None = ... + foo_enum2: str | None = ... + foo_enum3: str | None = ... + foo_enum_list: list[str] | None = ... + foo_enum_set: list[str] | None = ... + foo_enum_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class JsonIntEnumsInputOutput(_SerdeShape): + "Dataclass for JsonIntEnumsInputOutput structure." + + int_enum1: int | None = ... + int_enum2: int | None = ... + int_enum3: int | None = ... + int_enum_list: list[int] | None = ... + int_enum_set: list[int] | None = ... + int_enum_map: dict[str, int] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class KitchenSink(_SerdeShape): + "Dataclass for KitchenSink structure." + + blob: bytes | None = ... + boolean: bool | None = ... + double: float | None = ... + empty_struct: EmptyStruct | None = ... + float_: float | None = ... + httpdate_timestamp: datetime | None = ... + integer: int | None = ... + iso8601_timestamp: datetime | None = ... + json_value: str | None = ... + list_of_lists: list[list[str]] | None = ... + list_of_maps_of_strings: list[dict[str, str]] | None = ... + list_of_strings: list[str] | None = ... + list_of_structs: list[SimpleStruct] | None = ... + long: int | None = ... + map_of_lists_of_strings: dict[str, list[str]] | None = ... + map_of_maps: dict[str, dict[str, str]] | None = ... + map_of_strings: dict[str, str] | None = ... + map_of_structs: dict[str, SimpleStruct] | None = ... + recursive_list: list[KitchenSink] | None = ... + recursive_map: dict[str, KitchenSink] | None = ... + recursive_struct: KitchenSink | None = ... + simple_struct: SimpleStruct | None = ... + string: str | None = ... + struct_with_json_name: StructWithJsonName | None = ... + timestamp: datetime | None = ... + unix_timestamp: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass +class MyUnionStringValue(_SerdeShape): + value: str + +@dataclass +class MyUnionBooleanValue(_SerdeShape): + value: bool + +@dataclass +class MyUnionNumberValue(_SerdeShape): + value: int + +@dataclass +class MyUnionBlobValue(_SerdeShape): + value: bytes + +@dataclass +class MyUnionTimestampValue(_SerdeShape): + value: datetime + +@dataclass +class MyUnionEnumValue(_SerdeShape): + value: str + +@dataclass +class MyUnionListValue(_SerdeShape): + value: list[str] + +@dataclass +class MyUnionMapValue(_SerdeShape): + value: dict[str, str] + +@dataclass +class MyUnionStructureValue(_SerdeShape): + value: GreetingStruct + +@dataclass +class MyUnionUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +MyUnion = ( + MyUnionStringValue + | MyUnionBooleanValue + | MyUnionNumberValue + | MyUnionBlobValue + | MyUnionTimestampValue + | MyUnionEnumValue + | MyUnionListValue + | MyUnionMapValue + | MyUnionStructureValue + | MyUnionUnknown +) +"A union with a representative set of types for members." + +class _MyUnionDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> MyUnion: ... + +@dataclass(kw_only=True) +class NullOperationInputOutput(_SerdeShape): + "Dataclass for NullOperationInputOutput structure." + + string: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class OperationWithOptionalInputOutputInput(_SerdeShape): + "Dataclass for OperationWithOptionalInputOutputInput structure." + + value: str | None = ... + +@dataclass(kw_only=True) +class OperationWithOptionalInputOutputOutput(_SerdeShape): + "Dataclass for OperationWithOptionalInputOutputOutput structure." + + value: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class PutAndGetInlineDocumentsInputOutput(_SerdeShape): + "Dataclass for PutAndGetInlineDocumentsInputOutput structure." + + inline_document: Document | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class PutWithContentEncodingInput(_SerdeShape): + "Dataclass for PutWithContentEncodingInput structure." + + encoding: str | None = ... + data: str | None = ... + +@dataclass(kw_only=True) +class SimpleScalarPropertiesInputOutput(_SerdeShape): + "Dataclass for SimpleScalarPropertiesInputOutput structure." + + float_value: float | None = ... + double_value: float | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class SimpleStruct(_SerdeShape): + "Dataclass for SimpleStruct structure." + + value: str | None = ... + +@dataclass(kw_only=True) +class SparseNullsOperationInputOutput(_SerdeShape): + "Dataclass for SparseNullsOperationInputOutput structure." + + sparse_string_list: list[str | None] | None = ... + sparse_string_map: dict[str, str | None] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class StructWithJsonName(_SerdeShape): + "Dataclass for StructWithJsonName structure." + + value: str | None = ... + +@dataclass(kw_only=True) +class UnionInputOutput(_SerdeShape): + "A shared structure that contains a single union member." + + contents: MyUnion | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +class FooEnum(UnknownEnumMixin, StrEnum): + FOO = "Foo" + BAZ = "Baz" + BAR = "Bar" + ONE = "1" + ZERO = "0" + +@dataclass(kw_only=True) +class GreetingStruct(_SerdeShape): + "Dataclass for GreetingStruct structure." + + hi: str | None = ... + +class IntegerEnum(UnknownEnumMixin, IntEnum): + A = 1 + B = 2 + C = 3 diff --git a/codegen-output-py/aws-json-1-1/src/awsjson11/py.typed b/codegen-output-py/aws-json-1-1/src/awsjson11/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/aws-query/.smithy-python-manifest.json b/codegen-output-py/aws-query/.smithy-python-manifest.json new file mode 100644 index 000000000..a6ea2fa37 --- /dev/null +++ b/codegen-output-py/aws-query/.smithy-python-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "README.md": "34e2e1a81a1bbc2412be2320d53c78a5c9d2557492c0a2a8826d60f7b12888a4", + "pyproject.toml": "04b2c6dac767c5836984b1769937d35d1f551de92f0682753366a15c65d0c6cb", + "src/awsquery/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/awsquery/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/awsquery/_private/schemas.py": "af76a042201a3bc8b255631ff9c38edf639475d1b982529c67926e3f933d6101", + "src/awsquery/models.py": "8eb878202479e21d06d267007600d1628630ca2840c09197d8b8a12cd26c9739", + "src/awsquery/models.pyi": "b38cf3c8aa8e62a815e2bfc2c9a75cc2d4731f580697588e614921fae4c6372f", + "src/awsquery/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/aws-query/README.md b/codegen-output-py/aws-query/README.md new file mode 100644 index 000000000..aa1db205e --- /dev/null +++ b/codegen-output-py/aws-query/README.md @@ -0,0 +1,5 @@ + + +## awsquery Types Package + +Native Python types for the aws-query projection diff --git a/codegen-output-py/aws-query/pyproject.toml b/codegen-output-py/aws-query/pyproject.toml new file mode 100644 index 000000000..42c524db6 --- /dev/null +++ b/codegen-output-py/aws-query/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "awsquery" +version = "0.0.1" +description = "Native Python types for the aws-query projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "awsquery"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/awsquery", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/aws-query/src/awsquery/__init__.py b/codegen-output-py/aws-query/src/awsquery/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/aws-query/src/awsquery/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/aws-query/src/awsquery/_private/__init__.py b/codegen-output-py/aws-query/src/awsquery/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/aws-query/src/awsquery/_private/schemas.py b/codegen-output-py/aws-query/src/awsquery/_private/schemas.py new file mode 100644 index 000000000..bda03ef5c --- /dev/null +++ b/codegen-output-py/aws-query/src/awsquery/_private/schemas.py @@ -0,0 +1,1149 @@ +from types import MappingProxyType + +from smithy_core._schema_compact import StaticSchema + +n0 = "aws.protocoltests.query" +_s0 = "ComplexNestedErrorData" +_s1 = "Foo" +_s2 = "ComplexError" +_s3 = "smithy.api#error" +_s4 = "client" +_s5 = "TopLevel" +_s6 = "Nested" +n1 = "aws.protocoltests.shared" +_s7 = "GreetingStruct" +_s8 = "hi" +_s9 = "ComplexMap" +_s10 = "key" +_s11 = "value" +_s12 = "CustomCodeError" +_s13 = "aws.protocols#awsQueryError" +_s14 = "Message" +_s15 = "DateTime" +_s16 = "smithy.api#timestampFormat" +_s17 = "date-time" +_s18 = "DatetimeOffsetsOutput" +_s19 = "smithy.api#output" +_s20 = "datetime" +_s21 = "EmptyInputAndEmptyOutputInput" +_s22 = "smithy.api#input" +_s23 = "EmptyInputAndEmptyOutputOutput" +_s24 = "FooEnum" +_s25 = "FOO" +_s26 = "smithy.api#enumValue" +_s27 = "BAZ" +_s28 = "Baz" +_s29 = "BAR" +_s30 = "Bar" +_s31 = "ONE" +_s32 = "1" +_s33 = "ZERO" +_s34 = "0" +_s35 = "FooEnumMap" +_s36 = "FlattenedXmlMapOutput" +_s37 = "myMap" +_s38 = "smithy.api#xmlFlattened" +_s39 = "FlattenedXmlMapWithXmlNameOutputMap" +_s40 = "smithy.api#xmlName" +_s41 = "K" +_s42 = "V" +_s43 = "FlattenedXmlMapWithXmlNameOutput" +_s44 = "KVP" +_s45 = "FlattenedXmlMapWithXmlNamespaceOutputMap" +_s46 = "smithy.api#xmlNamespace" +_s47 = "FlattenedXmlMapWithXmlNamespaceOutput" +_s48 = "FractionalSecondsOutput" +_s49 = "GreetingWithErrorsOutput" +_s50 = "greeting" +_s51 = "HostLabelInput" +_s52 = "label" +_s53 = "IgnoresWrappingXmlNameOutput" +_s54 = "IgnoreMe" +_s55 = "foo" +_s56 = "InvalidGreeting" +_s57 = "ListWithMemberNamespace" +_s58 = "member" +_s59 = "ListWithNamespace" +_s60 = "ListWithXmlName" +_s61 = "item" +_s62 = "StringList" +_s63 = "MapOfLists" +_s64 = "MapWithXmlName" +_s65 = "NestedStructWithList" +_s66 = "ListArg" +_s67 = "StringMap" +_s68 = "NestedStructWithMap" +_s69 = "MapArg" +_s70 = "NestedStructuresInput" +_s71 = "NoInputAndOutputInput" +_s72 = "NoInputAndOutputOutput" +_s73 = "PutWithContentEncodingInput" +_s74 = "encoding" +_s75 = "smithy.api#httpHeader" +_s76 = "Content-Encoding" +_s77 = "data" +_s78 = "QueryIdempotencyTokenAutoFillInput" +_s79 = "token" +_s80 = "GreetingList" +_s81 = "QueryListsInput" +_s82 = "ComplexListArg" +_s83 = "FlattenedListArg" +_s84 = "ListArgWithXmlNameMember" +_s85 = "FlattenedListArgWithXmlName" +_s86 = "Hi" +_s87 = "NestedWithList" +_s88 = "QueryMapsInput" +_s89 = "RenamedMapArg" +_s90 = "ComplexMapArg" +_s91 = "MapWithXmlMemberName" +_s92 = "FlattenedMap" +_s93 = "FlattenedMapWithXmlName" +_s94 = "EpochSeconds" +_s95 = "epoch-seconds" +_s96 = "QueryTimestampsInput" +_s97 = "normalFormat" +_s98 = "epochMember" +_s99 = "epochTarget" +_s100 = "RecursiveXmlShapesOutput" +_s101 = "nested" +_s102 = "RenamedListMembers" +_s103 = "IntegerEnum" +_s104 = "A" +_s105 = "B" +_s106 = "C" +_s107 = "SimpleInputParamsInput" +_s108 = "Bam" +_s109 = "FloatValue" +_s110 = "Boo" +_s111 = "Qux" +_s112 = "SimpleScalarXmlPropertiesOutput" +_s113 = "stringValue" +_s114 = "emptyStringValue" +_s115 = "trueBooleanValue" +_s116 = "falseBooleanValue" +_s117 = "byteValue" +_s118 = "shortValue" +_s119 = "integerValue" +_s120 = "longValue" +_s121 = "floatValue" +_s122 = "doubleValue" +_s123 = "DoubleDribble" +_s124 = "StructureListMember" +_s125 = "a" +_s126 = "b" +_s127 = "other" +_s128 = "StructureList" +_s129 = "XmlBlobsOutput" +_s130 = "FooEnumList" +_s131 = "FooEnumSet" +_s132 = "XmlEnumsOutput" +_s133 = "fooEnum1" +_s134 = "fooEnum2" +_s135 = "fooEnum3" +_s136 = "fooEnumList" +_s137 = "fooEnumSet" +_s138 = "fooEnumMap" +_s139 = "IntegerEnumList" +_s140 = "IntegerEnumSet" +_s141 = "IntegerEnumMap" +_s142 = "XmlIntEnumsOutput" +_s143 = "intEnum1" +_s144 = "intEnum2" +_s145 = "intEnum3" +_s146 = "intEnumList" +_s147 = "intEnumSet" +_s148 = "intEnumMap" +_s149 = "StringSet" +_s150 = "IntegerList" +_s151 = "BooleanList" +_s152 = "TimestampList" +_s153 = "NestedStringList" +_s154 = "XmlListsOutput" +_s155 = "stringList" +_s156 = "stringSet" +_s157 = "integerList" +_s158 = "booleanList" +_s159 = "timestampList" +_s160 = "enumList" +_s161 = "nestedStringList" +_s162 = "renamedListMembers" +_s163 = "renamed" +_s164 = "flattenedList" +_s165 = "flattenedList2" +_s166 = "customName" +_s167 = "flattenedListWithMemberNamespace" +_s168 = "flattenedListWithNamespace" +_s169 = "structureList" +_s170 = "myStructureList" +_s171 = "XmlMapsOutputMap" +_s172 = "XmlMapsOutput" +_s173 = "XmlMapsXmlNameOutputMap" +_s174 = "Attribute" +_s175 = "Setting" +_s176 = "XmlMapsXmlNameOutput" +_s177 = "XmlNamespacedList" +_s178 = "XmlNamespaceNested" +_s179 = "values" +_s180 = "XmlNamespacesOutput" +_s181 = "HttpDate" +_s182 = "http-date" +_s183 = "XmlTimestampsOutput" +_s184 = "normal" +_s185 = "dateTime" +_s186 = "dateTimeOnTarget" +_s187 = "epochSeconds" +_s188 = "epochSecondsOnTarget" +_s189 = "httpDate" +_s190 = "httpDateOnTarget" +_s191 = "RecursiveXmlShapesOutputNested1" +_s192 = "RecursiveXmlShapesOutputNested2" +_s193 = "bar" +_s194 = "recursiveMember" +_s195 = "StructArg" +_s196 = "StringArg" +_s197 = "OtherArg" +_s198 = "RecursiveArg" + +COMPLEX_NESTED_ERROR_DATA: StaticSchema = ( + 18, + n0, + _s0, + 0, + (_s1,), + ((3, 0),), +) + +COMPLEX_ERROR: StaticSchema = ( + 18, + n0, + _s2, + {_s3: _s4}, + ( + _s5, + _s6, + ), + ( + (3, 0), + (COMPLEX_NESTED_ERROR_DATA, 0), + ), +) + +GREETING_STRUCT: StaticSchema = ( + 18, + n1, + _s7, + 0, + (_s8,), + ((3, 0),), +) + +COMPLEX_MAP: StaticSchema = ( + 17, + n0, + _s9, + 0, + ( + _s10, + _s11, + ), + ( + (3, 0), + (GREETING_STRUCT, 0), + ), +) + +CUSTOM_CODE_ERROR: StaticSchema = ( + 18, + n0, + _s12, + {_s13: MappingProxyType({"code": "Customized", "httpResponseCode": 402}), _s3: _s4}, + (_s14,), + ((3, 0),), +) + +DATE_TIME: StaticSchema = ( + 4, + n1, + _s15, + {_s16: _s17}, +) + +DATETIME_OFFSETS_OUTPUT: StaticSchema = ( + 18, + n0, + _s18, + {_s19: None}, + (_s20,), + ((DATE_TIME, 0),), +) + +EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT: StaticSchema = ( + 18, + n0, + _s21, + {_s22: None}, +) + +EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s23, + {_s19: None}, +) + +FOO_ENUM: StaticSchema = ( + 14, + n1, + _s24, + 0, + ( + _s25, + _s27, + _s29, + _s31, + _s33, + ), + ( + (-1, {_s26: _s1}), + (-1, {_s26: _s28}), + (-1, {_s26: _s30}), + (-1, {_s26: _s32}), + (-1, {_s26: _s34}), + ), +) + +FOO_ENUM_MAP: StaticSchema = ( + 17, + n1, + _s35, + 0, + ( + _s10, + _s11, + ), + ( + (3, 0), + (FOO_ENUM, 0), + ), +) + +FLATTENED_XML_MAP_OUTPUT: StaticSchema = ( + 18, + n0, + _s36, + {_s19: None}, + (_s37,), + ((FOO_ENUM_MAP, {_s38: None}),), +) + +FLATTENED_XML_MAP_WITH_XML_NAME_OUTPUT_MAP: StaticSchema = ( + 17, + n0, + _s39, + 0, + ( + _s10, + _s11, + ), + ( + (3, {_s40: _s41}), + (3, {_s40: _s42}), + ), +) + +FLATTENED_XML_MAP_WITH_XML_NAME_OUTPUT: StaticSchema = ( + 18, + n0, + _s43, + {_s19: None}, + (_s37,), + ((FLATTENED_XML_MAP_WITH_XML_NAME_OUTPUT_MAP, {_s38: None, _s40: _s44}),), +) + +FLATTENED_XML_MAP_WITH_XML_NAMESPACE_OUTPUT_MAP: StaticSchema = ( + 17, + n0, + _s45, + 0, + ( + _s10, + _s11, + ), + ( + ( + 3, + { + _s40: _s41, + _s46: MappingProxyType({"uri": "https://the-key.example.com"}), + }, + ), + ( + 3, + { + _s40: _s42, + _s46: MappingProxyType({"uri": "https://the-value.example.com"}), + }, + ), + ), +) + +FLATTENED_XML_MAP_WITH_XML_NAMESPACE_OUTPUT: StaticSchema = ( + 18, + n0, + _s47, + {_s19: None}, + (_s37,), + ( + ( + FLATTENED_XML_MAP_WITH_XML_NAMESPACE_OUTPUT_MAP, + { + _s38: None, + _s40: _s44, + _s46: MappingProxyType({"uri": "https://the-member.example.com"}), + }, + ), + ), +) + +FRACTIONAL_SECONDS_OUTPUT: StaticSchema = ( + 18, + n0, + _s48, + {_s19: None}, + (_s20,), + ((DATE_TIME, 0),), +) + +GREETING_WITH_ERRORS_OUTPUT: StaticSchema = ( + 18, + n0, + _s49, + {_s19: None}, + (_s50,), + ((3, 0),), +) + +HOST_LABEL_INPUT: StaticSchema = ( + 18, + n0, + _s51, + {_s22: None}, + (_s52,), + ((3, 257),), +) + +IGNORES_WRAPPING_XML_NAME_OUTPUT: StaticSchema = ( + 18, + n0, + _s53, + {_s40: _s54, _s19: None}, + (_s55,), + ((3, 0),), +) + +INVALID_GREETING: StaticSchema = ( + 18, + n0, + _s56, + {_s3: _s4}, + (_s14,), + ((3, 0),), +) + +LIST_WITH_MEMBER_NAMESPACE: StaticSchema = ( + 16, + n0, + _s57, + {_s46: MappingProxyType({"uri": "https://xml-list.example.com"})}, + (_s58,), + ((3, {_s46: MappingProxyType({"uri": "https://xml-member.example.com"})}),), +) + +LIST_WITH_NAMESPACE: StaticSchema = ( + 16, + n0, + _s59, + {_s46: MappingProxyType({"uri": "https://xml-list.example.com"})}, + (_s58,), + ((3, 0),), +) + +LIST_WITH_XML_NAME: StaticSchema = ( + 16, + n0, + _s60, + 0, + (_s58,), + ((3, {_s40: _s61}),), +) + +STRING_LIST: StaticSchema = ( + 16, + n1, + _s62, + 0, + (_s58,), + ((3, 0),), +) + +MAP_OF_LISTS: StaticSchema = ( + 17, + n0, + _s63, + 0, + ( + _s10, + _s11, + ), + ( + (3, 0), + (STRING_LIST, 0), + ), +) + +MAP_WITH_XML_NAME: StaticSchema = ( + 17, + n0, + _s64, + 0, + ( + _s10, + _s11, + ), + ( + (3, {_s40: _s41}), + (3, {_s40: _s42}), + ), +) + +NESTED_STRUCT_WITH_LIST: StaticSchema = ( + 18, + n0, + _s65, + 0, + (_s66,), + ((STRING_LIST, 0),), +) + +STRING_MAP: StaticSchema = ( + 17, + n1, + _s67, + 0, + ( + _s10, + _s11, + ), + ( + (3, 0), + (3, 0), + ), +) + +NESTED_STRUCT_WITH_MAP: StaticSchema = ( + 18, + n0, + _s68, + 0, + (_s69,), + ((STRING_MAP, 0),), +) + +NESTED_STRUCTURES_INPUT: StaticSchema = ( + 18, + n0, + _s70, + {_s22: None}, + (_s6,), + ((lambda: STRUCT_ARG, 0),), +) + +NO_INPUT_AND_OUTPUT_INPUT: StaticSchema = ( + 18, + n0, + _s71, + {_s22: None}, +) + +NO_INPUT_AND_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s72, + {_s19: None}, +) + +PUT_WITH_CONTENT_ENCODING_INPUT: StaticSchema = ( + 18, + n0, + _s73, + {_s22: None}, + ( + _s74, + _s77, + ), + ( + (3, {_s75: _s76}), + (3, 0), + ), +) + +QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL_INPUT: StaticSchema = ( + 18, + n0, + _s78, + {_s22: None}, + (_s79,), + ((3, 2),), +) + +GREETING_LIST: StaticSchema = ( + 16, + n1, + _s80, + 0, + (_s58,), + ((GREETING_STRUCT, 0),), +) + +QUERY_LISTS_INPUT: StaticSchema = ( + 18, + n0, + _s81, + {_s22: None}, + ( + _s66, + _s82, + _s83, + _s84, + _s85, + _s87, + ), + ( + (STRING_LIST, 0), + (GREETING_LIST, 0), + (STRING_LIST, {_s38: None}), + (LIST_WITH_XML_NAME, 0), + (LIST_WITH_XML_NAME, {_s38: None, _s40: _s86}), + (NESTED_STRUCT_WITH_LIST, 0), + ), +) + +QUERY_MAPS_INPUT: StaticSchema = ( + 18, + n0, + _s88, + {_s22: None}, + ( + _s69, + _s89, + _s90, + _s91, + _s92, + _s93, + _s63, + _s68, + ), + ( + (STRING_MAP, 0), + (STRING_MAP, {_s40: _s1}), + (COMPLEX_MAP, 0), + (MAP_WITH_XML_NAME, 0), + (STRING_MAP, {_s38: None}), + (MAP_WITH_XML_NAME, {_s38: None, _s40: _s86}), + (MAP_OF_LISTS, 0), + (NESTED_STRUCT_WITH_MAP, 0), + ), +) + +EPOCH_SECONDS: StaticSchema = ( + 4, + n1, + _s94, + {_s16: _s95}, +) + +QUERY_TIMESTAMPS_INPUT: StaticSchema = ( + 18, + n0, + _s96, + {_s22: None}, + ( + _s97, + _s98, + _s99, + ), + ( + (4, 0), + (4, {_s16: _s95}), + (EPOCH_SECONDS, 0), + ), +) + +RECURSIVE_XML_SHAPES_OUTPUT: StaticSchema = ( + 18, + n0, + _s100, + {_s19: None}, + (_s101,), + ((lambda: RECURSIVE_XML_SHAPES_OUTPUT_NESTED1, 0),), +) + +RENAMED_LIST_MEMBERS: StaticSchema = ( + 16, + n0, + _s102, + 0, + (_s58,), + ((3, {_s40: _s61}),), +) + +INTEGER_ENUM: StaticSchema = ( + 15, + n1, + _s103, + 0, + ( + _s104, + _s105, + _s106, + ), + ( + (-1, {_s26: 1}), + (-1, {_s26: 2}), + (-1, {_s26: 3}), + ), +) + +SIMPLE_INPUT_PARAMS_INPUT: StaticSchema = ( + 18, + n0, + _s107, + {_s22: None}, + ( + _s1, + _s30, + _s28, + _s108, + _s109, + _s110, + _s111, + _s24, + _s103, + ), + ( + (3, 0), + (3, 0), + (2, 0), + (7, 0), + (9, 0), + (10, 0), + (1, 0), + (FOO_ENUM, 0), + (INTEGER_ENUM, 0), + ), +) + +SIMPLE_SCALAR_XML_PROPERTIES_OUTPUT: StaticSchema = ( + 18, + n0, + _s112, + {_s19: None}, + ( + _s113, + _s114, + _s115, + _s116, + _s117, + _s118, + _s119, + _s120, + _s121, + _s122, + ), + ( + (3, 0), + (3, 0), + (2, 0), + (2, 0), + (5, 0), + (6, 0), + (7, 0), + (8, 0), + (9, 0), + (10, {_s40: _s123}), + ), +) + +STRUCTURE_LIST_MEMBER: StaticSchema = ( + 18, + n0, + _s124, + 0, + ( + _s125, + _s126, + ), + ( + (3, {_s40: _s11}), + (3, {_s40: _s127}), + ), +) + +STRUCTURE_LIST: StaticSchema = ( + 16, + n0, + _s128, + 0, + (_s58,), + ((STRUCTURE_LIST_MEMBER, {_s40: _s61}),), +) + +XML_BLOBS_OUTPUT: StaticSchema = ( + 18, + n0, + _s129, + {_s19: None}, + (_s77,), + ((1, 0),), +) + +FOO_ENUM_LIST: StaticSchema = ( + 16, + n1, + _s130, + 0, + (_s58,), + ((FOO_ENUM, 0),), +) + +FOO_ENUM_SET: StaticSchema = ( + 16, + n1, + _s131, + 0, + (_s58,), + ((FOO_ENUM, 0),), +) + +XML_ENUMS_OUTPUT: StaticSchema = ( + 18, + n0, + _s132, + {_s19: None}, + ( + _s133, + _s134, + _s135, + _s136, + _s137, + _s138, + ), + ( + (FOO_ENUM, 0), + (FOO_ENUM, 0), + (FOO_ENUM, 0), + (FOO_ENUM_LIST, 0), + (FOO_ENUM_SET, 0), + (FOO_ENUM_MAP, 0), + ), +) + +INTEGER_ENUM_LIST: StaticSchema = ( + 16, + n1, + _s139, + 0, + (_s58,), + ((INTEGER_ENUM, 0),), +) + +INTEGER_ENUM_SET: StaticSchema = ( + 16, + n1, + _s140, + 0, + (_s58,), + ((INTEGER_ENUM, 0),), +) + +INTEGER_ENUM_MAP: StaticSchema = ( + 17, + n1, + _s141, + 0, + ( + _s10, + _s11, + ), + ( + (3, 0), + (INTEGER_ENUM, 0), + ), +) + +XML_INT_ENUMS_OUTPUT: StaticSchema = ( + 18, + n0, + _s142, + {_s19: None}, + ( + _s143, + _s144, + _s145, + _s146, + _s147, + _s148, + ), + ( + (INTEGER_ENUM, 0), + (INTEGER_ENUM, 0), + (INTEGER_ENUM, 0), + (INTEGER_ENUM_LIST, 0), + (INTEGER_ENUM_SET, 0), + (INTEGER_ENUM_MAP, 0), + ), +) + +STRING_SET: StaticSchema = ( + 16, + n1, + _s149, + 0, + (_s58,), + ((3, 0),), +) + +INTEGER_LIST: StaticSchema = ( + 16, + n1, + _s150, + 0, + (_s58,), + ((7, 0),), +) + +BOOLEAN_LIST: StaticSchema = ( + 16, + n1, + _s151, + 0, + (_s58,), + ((2, 0),), +) + +TIMESTAMP_LIST: StaticSchema = ( + 16, + n1, + _s152, + 0, + (_s58,), + ((4, 0),), +) + +NESTED_STRING_LIST: StaticSchema = ( + 16, + n1, + _s153, + 0, + (_s58,), + ((STRING_LIST, 0),), +) + +XML_LISTS_OUTPUT: StaticSchema = ( + 18, + n0, + _s154, + {_s19: None}, + ( + _s155, + _s156, + _s157, + _s158, + _s159, + _s160, + _s146, + _s161, + _s162, + _s164, + _s165, + _s167, + _s168, + _s169, + ), + ( + (STRING_LIST, 0), + (STRING_SET, 0), + (INTEGER_LIST, 0), + (BOOLEAN_LIST, 0), + (TIMESTAMP_LIST, 0), + (FOO_ENUM_LIST, 0), + (INTEGER_ENUM_LIST, 0), + (NESTED_STRING_LIST, 0), + (RENAMED_LIST_MEMBERS, {_s40: _s163}), + (RENAMED_LIST_MEMBERS, {_s38: None}), + (RENAMED_LIST_MEMBERS, {_s38: None, _s40: _s166}), + (LIST_WITH_MEMBER_NAMESPACE, {_s38: None}), + (LIST_WITH_NAMESPACE, {_s38: None}), + (STRUCTURE_LIST, {_s40: _s170}), + ), +) + +XML_MAPS_OUTPUT_MAP: StaticSchema = ( + 17, + n0, + _s171, + 0, + ( + _s10, + _s11, + ), + ( + (3, 0), + (GREETING_STRUCT, 0), + ), +) + +XML_MAPS_OUTPUT: StaticSchema = ( + 18, + n0, + _s172, + {_s19: None}, + (_s37,), + ((XML_MAPS_OUTPUT_MAP, 0),), +) + +XML_MAPS_XML_NAME_OUTPUT_MAP: StaticSchema = ( + 17, + n0, + _s173, + 0, + ( + _s10, + _s11, + ), + ( + (3, {_s40: _s174}), + (GREETING_STRUCT, {_s40: _s175}), + ), +) + +XML_MAPS_XML_NAME_OUTPUT: StaticSchema = ( + 18, + n0, + _s176, + {_s19: None}, + (_s37,), + ((XML_MAPS_XML_NAME_OUTPUT_MAP, 0),), +) + +XML_NAMESPACED_LIST: StaticSchema = ( + 16, + n0, + _s177, + 0, + (_s58,), + ((3, {_s46: MappingProxyType({"uri": "http://bux.com"})}),), +) + +XML_NAMESPACE_NESTED: StaticSchema = ( + 18, + n0, + _s178, + {_s46: MappingProxyType({"uri": "http://boo.com"})}, + ( + _s55, + _s179, + ), + ( + (3, {_s46: MappingProxyType({"uri": "http://baz.com", "prefix": "baz"})}), + (XML_NAMESPACED_LIST, {_s46: MappingProxyType({"uri": "http://qux.com"})}), + ), +) + +XML_NAMESPACES_OUTPUT: StaticSchema = ( + 18, + n0, + _s180, + {_s46: MappingProxyType({"uri": "http://foo.com"}), _s19: None}, + (_s101,), + ((XML_NAMESPACE_NESTED, 0),), +) + +HTTP_DATE: StaticSchema = ( + 4, + n1, + _s181, + {_s16: _s182}, +) + +XML_TIMESTAMPS_OUTPUT: StaticSchema = ( + 18, + n0, + _s183, + {_s19: None}, + ( + _s184, + _s185, + _s186, + _s187, + _s188, + _s189, + _s190, + ), + ( + (4, 0), + (4, {_s16: _s17}), + (DATE_TIME, 0), + (4, {_s16: _s95}), + (EPOCH_SECONDS, 0), + (4, {_s16: _s182}), + (HTTP_DATE, 0), + ), +) + +RECURSIVE_XML_SHAPES_OUTPUT_NESTED1: StaticSchema = ( + 18, + n0, + _s191, + 0, + ( + _s55, + _s101, + ), + ( + (3, 0), + (lambda: RECURSIVE_XML_SHAPES_OUTPUT_NESTED2, 0), + ), +) + +RECURSIVE_XML_SHAPES_OUTPUT_NESTED2: StaticSchema = ( + 18, + n0, + _s192, + 0, + ( + _s193, + _s194, + ), + ( + (3, 0), + (RECURSIVE_XML_SHAPES_OUTPUT_NESTED1, 0), + ), +) + +STRUCT_ARG: StaticSchema = ( + 18, + n0, + _s195, + 0, + ( + _s196, + _s197, + _s198, + ), + ( + (3, 0), + (2, 0), + (lambda: STRUCT_ARG, 0), + ), +) diff --git a/codegen-output-py/aws-query/src/awsquery/models.py b/codegen-output-py/aws-query/src/awsquery/models.py new file mode 100644 index 000000000..22053ace1 --- /dev/null +++ b/codegen-output-py/aws-query/src/awsquery/models.py @@ -0,0 +1,134 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "ComplexError": "COMPLEX_ERROR", + "ComplexNestedErrorData": "COMPLEX_NESTED_ERROR_DATA", + "CustomCodeError": "CUSTOM_CODE_ERROR", + "DatetimeOffsetsOutput": "DATETIME_OFFSETS_OUTPUT", + "EmptyInputAndEmptyOutputInput": "EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT", + "EmptyInputAndEmptyOutputOutput": "EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT", + "FlattenedXmlMapOutput": "FLATTENED_XML_MAP_OUTPUT", + "FlattenedXmlMapWithXmlNameOutput": "FLATTENED_XML_MAP_WITH_XML_NAME_OUTPUT", + "FlattenedXmlMapWithXmlNamespaceOutput": "FLATTENED_XML_MAP_WITH_XML_NAMESPACE_OUTPUT", + "FractionalSecondsOutput": "FRACTIONAL_SECONDS_OUTPUT", + "GreetingWithErrorsOutput": "GREETING_WITH_ERRORS_OUTPUT", + "HostLabelInput": "HOST_LABEL_INPUT", + "IgnoresWrappingXmlNameOutput": "IGNORES_WRAPPING_XML_NAME_OUTPUT", + "InvalidGreeting": "INVALID_GREETING", + "NestedStructWithList": "NESTED_STRUCT_WITH_LIST", + "NestedStructWithMap": "NESTED_STRUCT_WITH_MAP", + "NestedStructuresInput": "NESTED_STRUCTURES_INPUT", + "NoInputAndOutputInput": "NO_INPUT_AND_OUTPUT_INPUT", + "NoInputAndOutputOutput": "NO_INPUT_AND_OUTPUT_OUTPUT", + "PutWithContentEncodingInput": "PUT_WITH_CONTENT_ENCODING_INPUT", + "QueryIdempotencyTokenAutoFillInput": "QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL_INPUT", + "QueryListsInput": "QUERY_LISTS_INPUT", + "QueryMapsInput": "QUERY_MAPS_INPUT", + "QueryTimestampsInput": "QUERY_TIMESTAMPS_INPUT", + "RecursiveXmlShapesOutput": "RECURSIVE_XML_SHAPES_OUTPUT", + "RecursiveXmlShapesOutputNested1": "RECURSIVE_XML_SHAPES_OUTPUT_NESTED1", + "RecursiveXmlShapesOutputNested2": "RECURSIVE_XML_SHAPES_OUTPUT_NESTED2", + "SimpleInputParamsInput": "SIMPLE_INPUT_PARAMS_INPUT", + "SimpleScalarXmlPropertiesOutput": "SIMPLE_SCALAR_XML_PROPERTIES_OUTPUT", + "StructArg": "STRUCT_ARG", + "StructureListMember": "STRUCTURE_LIST_MEMBER", + "XmlBlobsOutput": "XML_BLOBS_OUTPUT", + "XmlEnumsOutput": "XML_ENUMS_OUTPUT", + "XmlIntEnumsOutput": "XML_INT_ENUMS_OUTPUT", + "XmlListsOutput": "XML_LISTS_OUTPUT", + "XmlMapsOutput": "XML_MAPS_OUTPUT", + "XmlMapsXmlNameOutput": "XML_MAPS_XML_NAME_OUTPUT", + "XmlNamespaceNested": "XML_NAMESPACE_NESTED", + "XmlNamespacesOutput": "XML_NAMESPACES_OUTPUT", + "XmlTimestampsOutput": "XML_TIMESTAMPS_OUTPUT", + "FooEnum": "FOO_ENUM", + "GreetingStruct": "GREETING_STRUCT", + "IntegerEnum": "INTEGER_ENUM", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "ComplexError", + "ComplexNestedErrorData", + "CustomCodeError", + "DatetimeOffsetsOutput", + "EmptyInputAndEmptyOutputInput", + "EmptyInputAndEmptyOutputOutput", + "FlattenedXmlMapOutput", + "FlattenedXmlMapWithXmlNameOutput", + "FlattenedXmlMapWithXmlNamespaceOutput", + "FooEnum", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "HostLabelInput", + "IgnoresWrappingXmlNameOutput", + "IntegerEnum", + "InvalidGreeting", + "NestedStructWithList", + "NestedStructWithMap", + "NestedStructuresInput", + "NoInputAndOutputInput", + "NoInputAndOutputOutput", + "PutWithContentEncodingInput", + "QueryIdempotencyTokenAutoFillInput", + "QueryListsInput", + "QueryMapsInput", + "QueryTimestampsInput", + "RecursiveXmlShapesOutput", + "RecursiveXmlShapesOutputNested1", + "RecursiveXmlShapesOutputNested2", + "SimpleInputParamsInput", + "SimpleScalarXmlPropertiesOutput", + "StructArg", + "StructureListMember", + "XmlBlobsOutput", + "XmlEnumsOutput", + "XmlIntEnumsOutput", + "XmlListsOutput", + "XmlMapsOutput", + "XmlMapsXmlNameOutput", + "XmlNamespaceNested", + "XmlNamespacesOutput", + "XmlTimestampsOutput", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/aws-query/src/awsquery/models.pyi b/codegen-output-py/aws-query/src/awsquery/models.pyi new file mode 100644 index 000000000..f46ff2893 --- /dev/null +++ b/codegen-output-py/aws-query/src/awsquery/models.pyi @@ -0,0 +1,566 @@ +from dataclasses import dataclass +from datetime import datetime +from enum import IntEnum, StrEnum +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.serializers import ShapeSerializer +from smithy_core.types import UnknownEnumMixin + +__all__ = [ + "ComplexError", + "ComplexNestedErrorData", + "CustomCodeError", + "DatetimeOffsetsOutput", + "EmptyInputAndEmptyOutputInput", + "EmptyInputAndEmptyOutputOutput", + "FlattenedXmlMapOutput", + "FlattenedXmlMapWithXmlNameOutput", + "FlattenedXmlMapWithXmlNamespaceOutput", + "FooEnum", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "HostLabelInput", + "IgnoresWrappingXmlNameOutput", + "IntegerEnum", + "InvalidGreeting", + "NestedStructWithList", + "NestedStructWithMap", + "NestedStructuresInput", + "NoInputAndOutputInput", + "NoInputAndOutputOutput", + "PutWithContentEncodingInput", + "QueryIdempotencyTokenAutoFillInput", + "QueryListsInput", + "QueryMapsInput", + "QueryTimestampsInput", + "RecursiveXmlShapesOutput", + "RecursiveXmlShapesOutputNested1", + "RecursiveXmlShapesOutputNested2", + "ServiceError", + "SimpleInputParamsInput", + "SimpleScalarXmlPropertiesOutput", + "StructArg", + "StructureListMember", + "XmlBlobsOutput", + "XmlEnumsOutput", + "XmlIntEnumsOutput", + "XmlListsOutput", + "XmlMapsOutput", + "XmlMapsXmlNameOutput", + "XmlNamespaceNested", + "XmlNamespacesOutput", + "XmlTimestampsOutput", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class ComplexError(ServiceError, _SerdeShape): + "This error is thrown when a request is invalid." + + top_level: str | None = ... + nested: ComplexNestedErrorData | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ComplexNestedErrorData(_SerdeShape): + "Dataclass for ComplexNestedErrorData structure." + + foo: str | None = ... + +@dataclass(kw_only=True) +class CustomCodeError(ServiceError, _SerdeShape): + "Dataclass for CustomCodeError structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class DatetimeOffsetsOutput(_SerdeShape): + "Dataclass for DatetimeOffsetsOutput structure." + + datetime_: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class EmptyInputAndEmptyOutputInput(_SerdeShape): + "Dataclass for EmptyInputAndEmptyOutputInput structure." + +@dataclass(kw_only=True) +class EmptyInputAndEmptyOutputOutput(_SerdeShape): + "Dataclass for EmptyInputAndEmptyOutputOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FlattenedXmlMapOutput(_SerdeShape): + "Dataclass for FlattenedXmlMapOutput structure." + + my_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FlattenedXmlMapWithXmlNameOutput(_SerdeShape): + "Dataclass for FlattenedXmlMapWithXmlNameOutput structure." + + my_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FlattenedXmlMapWithXmlNamespaceOutput(_SerdeShape): + "Dataclass for FlattenedXmlMapWithXmlNamespaceOutput structure." + + my_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FractionalSecondsOutput(_SerdeShape): + "Dataclass for FractionalSecondsOutput structure." + + datetime_: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class GreetingWithErrorsOutput(_SerdeShape): + "Dataclass for GreetingWithErrorsOutput structure." + + greeting: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HostLabelInput(_SerdeShape): + "Dataclass for HostLabelInput structure." + + label: str | None = ... + +@dataclass(kw_only=True) +class IgnoresWrappingXmlNameOutput(_SerdeShape): + "Dataclass for IgnoresWrappingXmlNameOutput structure." + + foo: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class InvalidGreeting(ServiceError, _SerdeShape): + "This error is thrown when an invalid greeting value is provided." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class NestedStructWithList(_SerdeShape): + "Dataclass for NestedStructWithList structure." + + list_arg: list[str] | None = ... + +@dataclass(kw_only=True) +class NestedStructWithMap(_SerdeShape): + "Dataclass for NestedStructWithMap structure." + + map_arg: dict[str, str] | None = ... + +@dataclass(kw_only=True) +class NestedStructuresInput(_SerdeShape): + "Dataclass for NestedStructuresInput structure." + + nested: StructArg | None = ... + +@dataclass(kw_only=True) +class NoInputAndOutputInput(_SerdeShape): + "Dataclass for NoInputAndOutputInput structure." + +@dataclass(kw_only=True) +class NoInputAndOutputOutput(_SerdeShape): + "Dataclass for NoInputAndOutputOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class PutWithContentEncodingInput(_SerdeShape): + "Dataclass for PutWithContentEncodingInput structure." + + encoding: str | None = ... + data: str | None = ... + +@dataclass(kw_only=True) +class QueryIdempotencyTokenAutoFillInput(_SerdeShape): + "Dataclass for QueryIdempotencyTokenAutoFillInput structure." + + token: str | None = ... + "This field is autopopulated if not provided." + +@dataclass(kw_only=True) +class QueryListsInput(_SerdeShape): + "Dataclass for QueryListsInput structure." + + list_arg: list[str] | None = ... + complex_list_arg: list[GreetingStruct] | None = ... + flattened_list_arg: list[str] | None = ... + list_arg_with_xml_name_member: list[str] | None = ... + flattened_list_arg_with_xml_name: list[str] | None = ... + nested_with_list: NestedStructWithList | None = ... + +@dataclass(kw_only=True) +class QueryMapsInput(_SerdeShape): + "Dataclass for QueryMapsInput structure." + + map_arg: dict[str, str] | None = ... + renamed_map_arg: dict[str, str] | None = ... + complex_map_arg: dict[str, GreetingStruct] | None = ... + map_with_xml_member_name: dict[str, str] | None = ... + flattened_map: dict[str, str] | None = ... + flattened_map_with_xml_name: dict[str, str] | None = ... + map_of_lists: dict[str, list[str]] | None = ... + nested_struct_with_map: NestedStructWithMap | None = ... + +@dataclass(kw_only=True) +class QueryTimestampsInput(_SerdeShape): + "Dataclass for QueryTimestampsInput structure." + + normal_format: datetime | None = ... + epoch_member: datetime | None = ... + epoch_target: datetime | None = ... + +@dataclass(kw_only=True) +class RecursiveXmlShapesOutput(_SerdeShape): + "Dataclass for RecursiveXmlShapesOutput structure." + + nested: RecursiveXmlShapesOutputNested1 | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class RecursiveXmlShapesOutputNested1(_SerdeShape): + "Dataclass for RecursiveXmlShapesOutputNested1 structure." + + foo: str | None = ... + nested: RecursiveXmlShapesOutputNested2 | None = ... + +@dataclass(kw_only=True) +class RecursiveXmlShapesOutputNested2(_SerdeShape): + "Dataclass for RecursiveXmlShapesOutputNested2 structure." + + bar: str | None = ... + recursive_member: RecursiveXmlShapesOutputNested1 | None = ... + +@dataclass(kw_only=True) +class SimpleInputParamsInput(_SerdeShape): + "Dataclass for SimpleInputParamsInput structure." + + foo: str | None = ... + bar: str | None = ... + baz: bool | None = ... + bam: int | None = ... + float_value: float | None = ... + boo: float | None = ... + qux: bytes | None = ... + foo_enum: str | None = ... + integer_enum: int | None = ... + +@dataclass(kw_only=True) +class SimpleScalarXmlPropertiesOutput(_SerdeShape): + "Dataclass for SimpleScalarXmlPropertiesOutput structure." + + string_value: str | None = ... + empty_string_value: str | None = ... + true_boolean_value: bool | None = ... + false_boolean_value: bool | None = ... + byte_value: int | None = ... + short_value: int | None = ... + integer_value: int | None = ... + long_value: int | None = ... + float_value: float | None = ... + double_value: float | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class StructArg(_SerdeShape): + "Dataclass for StructArg structure." + + string_arg: str | None = ... + other_arg: bool | None = ... + recursive_arg: StructArg | None = ... + +@dataclass(kw_only=True) +class StructureListMember(_SerdeShape): + "Dataclass for StructureListMember structure." + + a: str | None = ... + b: str | None = ... + +@dataclass(kw_only=True) +class XmlBlobsOutput(_SerdeShape): + "Dataclass for XmlBlobsOutput structure." + + data: bytes | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlEnumsOutput(_SerdeShape): + "Dataclass for XmlEnumsOutput structure." + + foo_enum1: str | None = ... + foo_enum2: str | None = ... + foo_enum3: str | None = ... + foo_enum_list: list[str] | None = ... + foo_enum_set: list[str] | None = ... + foo_enum_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlIntEnumsOutput(_SerdeShape): + "Dataclass for XmlIntEnumsOutput structure." + + int_enum1: int | None = ... + int_enum2: int | None = ... + int_enum3: int | None = ... + int_enum_list: list[int] | None = ... + int_enum_set: list[int] | None = ... + int_enum_map: dict[str, int] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlListsOutput(_SerdeShape): + "Dataclass for XmlListsOutput structure." + + string_list: list[str] | None = ... + string_set: list[str] | None = ... + integer_list: list[int] | None = ... + boolean_list: list[bool] | None = ... + timestamp_list: list[datetime] | None = ... + enum_list: list[str] | None = ... + int_enum_list: list[int] | None = ... + nested_string_list: list[list[str]] | None = ... + renamed_list_members: list[str] | None = ... + flattened_list: list[str] | None = ... + flattened_list2: list[str] | None = ... + flattened_list_with_member_namespace: list[str] | None = ... + flattened_list_with_namespace: list[str] | None = ... + structure_list: list[StructureListMember] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlMapsOutput(_SerdeShape): + "Dataclass for XmlMapsOutput structure." + + my_map: dict[str, GreetingStruct] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlMapsXmlNameOutput(_SerdeShape): + "Dataclass for XmlMapsXmlNameOutput structure." + + my_map: dict[str, GreetingStruct] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlNamespaceNested(_SerdeShape): + "Dataclass for XmlNamespaceNested structure." + + foo: str | None = ... + values: list[str] | None = ... + +@dataclass(kw_only=True) +class XmlNamespacesOutput(_SerdeShape): + "Dataclass for XmlNamespacesOutput structure." + + nested: XmlNamespaceNested | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlTimestampsOutput(_SerdeShape): + "Dataclass for XmlTimestampsOutput structure." + + normal: datetime | None = ... + date_time: datetime | None = ... + date_time_on_target: datetime | None = ... + epoch_seconds: datetime | None = ... + epoch_seconds_on_target: datetime | None = ... + http_date: datetime | None = ... + http_date_on_target: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +class FooEnum(UnknownEnumMixin, StrEnum): + FOO = "Foo" + BAZ = "Baz" + BAR = "Bar" + ONE = "1" + ZERO = "0" + +@dataclass(kw_only=True) +class GreetingStruct(_SerdeShape): + "Dataclass for GreetingStruct structure." + + hi: str | None = ... + +class IntegerEnum(UnknownEnumMixin, IntEnum): + A = 1 + B = 2 + C = 3 diff --git a/codegen-output-py/aws-query/src/awsquery/py.typed b/codegen-output-py/aws-query/src/awsquery/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/ec2-query/.smithy-python-manifest.json b/codegen-output-py/ec2-query/.smithy-python-manifest.json new file mode 100644 index 000000000..aa6d051d3 --- /dev/null +++ b/codegen-output-py/ec2-query/.smithy-python-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "README.md": "88060523405669e4b71bf32d9f2888d510765cf5d1aa0514b652de95144609a1", + "pyproject.toml": "367c9381d5d263cc6684cdc98322ca7c45774da9f6070266650a65460296e857", + "src/ec2query/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/ec2query/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/ec2query/_private/schemas.py": "76e3a270817a22e986312d047e701702b67700f8d111c91ecd2b97e3395b86de", + "src/ec2query/models.py": "ce705a922131d6b8c1b864d288be281bd7bca1d77a4240d6aee1aa5accbc2267", + "src/ec2query/models.pyi": "c4f72b8db1ccb61492be4d8fea8d636cd7e0cfd37d3b39a2bf919107dbae7088", + "src/ec2query/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/ec2-query/README.md b/codegen-output-py/ec2-query/README.md new file mode 100644 index 000000000..71adadfa8 --- /dev/null +++ b/codegen-output-py/ec2-query/README.md @@ -0,0 +1,5 @@ + + +## ec2query Types Package + +Native Python types for the ec2-query projection diff --git a/codegen-output-py/ec2-query/pyproject.toml b/codegen-output-py/ec2-query/pyproject.toml new file mode 100644 index 000000000..ae2a263dd --- /dev/null +++ b/codegen-output-py/ec2-query/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "ec2query" +version = "0.0.1" +description = "Native Python types for the ec2-query projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "ec2query"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/ec2query", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/ec2-query/src/ec2query/__init__.py b/codegen-output-py/ec2-query/src/ec2query/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/ec2-query/src/ec2query/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/ec2-query/src/ec2query/_private/__init__.py b/codegen-output-py/ec2-query/src/ec2query/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/ec2-query/src/ec2query/_private/schemas.py b/codegen-output-py/ec2-query/src/ec2query/_private/schemas.py new file mode 100644 index 000000000..a468e540e --- /dev/null +++ b/codegen-output-py/ec2-query/src/ec2query/_private/schemas.py @@ -0,0 +1,901 @@ +from types import MappingProxyType + +from smithy_core._schema_compact import StaticSchema + +n0 = "aws.protocoltests.ec2" +_s0 = "ComplexNestedErrorData" +_s1 = "Foo" +_s2 = "ComplexError" +_s3 = "smithy.api#error" +_s4 = "client" +_s5 = "TopLevel" +_s6 = "Nested" +n1 = "aws.protocoltests.shared" +_s7 = "DateTime" +_s8 = "smithy.api#timestampFormat" +_s9 = "date-time" +_s10 = "DatetimeOffsetsOutput" +_s11 = "smithy.api#output" +_s12 = "datetime" +_s13 = "EmptyInputAndEmptyOutputInput" +_s14 = "smithy.api#input" +_s15 = "EmptyInputAndEmptyOutputOutput" +_s16 = "FractionalSecondsOutput" +_s17 = "GreetingWithErrorsOutput" +_s18 = "greeting" +_s19 = "HostLabelInput" +_s20 = "label" +_s21 = "IgnoresWrappingXmlNameOutput" +_s22 = "smithy.api#xmlName" +_s23 = "IgnoreMe" +_s24 = "foo" +_s25 = "InvalidGreeting" +_s26 = "Message" +_s27 = "ListWithMemberNamespace" +_s28 = "smithy.api#xmlNamespace" +_s29 = "member" +_s30 = "ListWithNamespace" +_s31 = "ListWithXmlName" +_s32 = "item" +_s33 = "StringList" +_s34 = "NestedStructWithList" +_s35 = "ListArg" +_s36 = "NestedStructuresInput" +_s37 = "NoInputAndOutputOutput" +_s38 = "PutWithContentEncodingInput" +_s39 = "encoding" +_s40 = "smithy.api#httpHeader" +_s41 = "Content-Encoding" +_s42 = "data" +_s43 = "QueryIdempotencyTokenAutoFillInput" +_s44 = "token" +_s45 = "GreetingStruct" +_s46 = "hi" +_s47 = "GreetingList" +_s48 = "QueryListsInput" +_s49 = "ComplexListArg" +_s50 = "ListArgWithXmlNameMember" +_s51 = "ListArgWithXmlName" +_s52 = "Hi" +_s53 = "NestedWithList" +_s54 = "EpochSeconds" +_s55 = "epoch-seconds" +_s56 = "QueryTimestampsInput" +_s57 = "normalFormat" +_s58 = "epochMember" +_s59 = "epochTarget" +_s60 = "RecursiveXmlShapesOutput" +_s61 = "nested" +_s62 = "RenamedListMembers" +_s63 = "FooEnum" +_s64 = "FOO" +_s65 = "smithy.api#enumValue" +_s66 = "BAZ" +_s67 = "Baz" +_s68 = "BAR" +_s69 = "Bar" +_s70 = "ONE" +_s71 = "1" +_s72 = "ZERO" +_s73 = "0" +_s74 = "SimpleInputParamsInput" +_s75 = "Bam" +_s76 = "FloatValue" +_s77 = "Boo" +_s78 = "Qux" +_s79 = "HasQueryName" +_s80 = "aws.protocols#ec2QueryName" +_s81 = "HasQueryAndXmlName" +_s82 = "hasQueryAndXmlName" +_s83 = "UsesXmlName" +_s84 = "usesXmlName" +_s85 = "DistinctQueryName" +_s86 = "QueryName" +_s87 = "DistinctQueryAndXmlName" +_s88 = "queryAndXmlName" +_s89 = "xmlAndQueryName" +_s90 = "DistinctXmlName" +_s91 = "xmlNameOnly" +_s92 = "SimpleScalarXmlPropertiesOutput" +_s93 = "stringValue" +_s94 = "emptyStringValue" +_s95 = "trueBooleanValue" +_s96 = "falseBooleanValue" +_s97 = "byteValue" +_s98 = "shortValue" +_s99 = "integerValue" +_s100 = "longValue" +_s101 = "floatValue" +_s102 = "doubleValue" +_s103 = "DoubleDribble" +_s104 = "StructureListMember" +_s105 = "a" +_s106 = "value" +_s107 = "b" +_s108 = "other" +_s109 = "StructureList" +_s110 = "XmlBlobsOutput" +_s111 = "FooEnumList" +_s112 = "FooEnumSet" +_s113 = "FooEnumMap" +_s114 = "key" +_s115 = "XmlEnumsOutput" +_s116 = "fooEnum1" +_s117 = "fooEnum2" +_s118 = "fooEnum3" +_s119 = "fooEnumList" +_s120 = "fooEnumSet" +_s121 = "fooEnumMap" +_s122 = "IntegerEnum" +_s123 = "A" +_s124 = "B" +_s125 = "C" +_s126 = "IntegerEnumList" +_s127 = "IntegerEnumSet" +_s128 = "IntegerEnumMap" +_s129 = "XmlIntEnumsOutput" +_s130 = "intEnum1" +_s131 = "intEnum2" +_s132 = "intEnum3" +_s133 = "intEnumList" +_s134 = "intEnumSet" +_s135 = "intEnumMap" +_s136 = "StringSet" +_s137 = "IntegerList" +_s138 = "BooleanList" +_s139 = "TimestampList" +_s140 = "NestedStringList" +_s141 = "XmlListsOutput" +_s142 = "stringList" +_s143 = "stringSet" +_s144 = "integerList" +_s145 = "booleanList" +_s146 = "timestampList" +_s147 = "enumList" +_s148 = "nestedStringList" +_s149 = "renamedListMembers" +_s150 = "renamed" +_s151 = "flattenedList" +_s152 = "smithy.api#xmlFlattened" +_s153 = "flattenedList2" +_s154 = "customName" +_s155 = "flattenedListWithMemberNamespace" +_s156 = "flattenedListWithNamespace" +_s157 = "structureList" +_s158 = "myStructureList" +_s159 = "XmlNamespacedList" +_s160 = "XmlNamespaceNested" +_s161 = "values" +_s162 = "XmlNamespacesOutput" +_s163 = "HttpDate" +_s164 = "http-date" +_s165 = "XmlTimestampsOutput" +_s166 = "normal" +_s167 = "dateTime" +_s168 = "dateTimeOnTarget" +_s169 = "epochSeconds" +_s170 = "epochSecondsOnTarget" +_s171 = "httpDate" +_s172 = "httpDateOnTarget" +_s173 = "RecursiveXmlShapesOutputNested1" +_s174 = "RecursiveXmlShapesOutputNested2" +_s175 = "bar" +_s176 = "recursiveMember" +_s177 = "StructArg" +_s178 = "StringArg" +_s179 = "OtherArg" +_s180 = "RecursiveArg" + +COMPLEX_NESTED_ERROR_DATA: StaticSchema = ( + 18, + n0, + _s0, + 0, + (_s1,), + ((3, 0),), +) + +COMPLEX_ERROR: StaticSchema = ( + 18, + n0, + _s2, + {_s3: _s4}, + ( + _s5, + _s6, + ), + ( + (3, 0), + (COMPLEX_NESTED_ERROR_DATA, 0), + ), +) + +DATE_TIME: StaticSchema = ( + 4, + n1, + _s7, + {_s8: _s9}, +) + +DATETIME_OFFSETS_OUTPUT: StaticSchema = ( + 18, + n0, + _s10, + {_s11: None}, + (_s12,), + ((DATE_TIME, 0),), +) + +EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT: StaticSchema = ( + 18, + n0, + _s13, + {_s14: None}, +) + +EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s15, + {_s11: None}, +) + +FRACTIONAL_SECONDS_OUTPUT: StaticSchema = ( + 18, + n0, + _s16, + {_s11: None}, + (_s12,), + ((DATE_TIME, 0),), +) + +GREETING_WITH_ERRORS_OUTPUT: StaticSchema = ( + 18, + n0, + _s17, + {_s11: None}, + (_s18,), + ((3, 0),), +) + +HOST_LABEL_INPUT: StaticSchema = ( + 18, + n0, + _s19, + {_s14: None}, + (_s20,), + ((3, 257),), +) + +IGNORES_WRAPPING_XML_NAME_OUTPUT: StaticSchema = ( + 18, + n0, + _s21, + {_s22: _s23, _s11: None}, + (_s24,), + ((3, 0),), +) + +INVALID_GREETING: StaticSchema = ( + 18, + n0, + _s25, + {_s3: _s4}, + (_s26,), + ((3, 0),), +) + +LIST_WITH_MEMBER_NAMESPACE: StaticSchema = ( + 16, + n0, + _s27, + {_s28: MappingProxyType({"uri": "https://xml-list.example.com"})}, + (_s29,), + ((3, {_s28: MappingProxyType({"uri": "https://xml-member.example.com"})}),), +) + +LIST_WITH_NAMESPACE: StaticSchema = ( + 16, + n0, + _s30, + {_s28: MappingProxyType({"uri": "https://xml-list.example.com"})}, + (_s29,), + ((3, 0),), +) + +LIST_WITH_XML_NAME: StaticSchema = ( + 16, + n0, + _s31, + 0, + (_s29,), + ((3, {_s22: _s32}),), +) + +STRING_LIST: StaticSchema = ( + 16, + n1, + _s33, + 0, + (_s29,), + ((3, 0),), +) + +NESTED_STRUCT_WITH_LIST: StaticSchema = ( + 18, + n0, + _s34, + 0, + (_s35,), + ((STRING_LIST, 0),), +) + +NESTED_STRUCTURES_INPUT: StaticSchema = ( + 18, + n0, + _s36, + {_s14: None}, + (_s6,), + ((lambda: STRUCT_ARG, 0),), +) + +NO_INPUT_AND_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s37, + {_s11: None}, +) + +PUT_WITH_CONTENT_ENCODING_INPUT: StaticSchema = ( + 18, + n0, + _s38, + {_s14: None}, + ( + _s39, + _s42, + ), + ( + (3, {_s40: _s41}), + (3, 0), + ), +) + +QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL_INPUT: StaticSchema = ( + 18, + n0, + _s43, + {_s14: None}, + (_s44,), + ((3, 2),), +) + +GREETING_STRUCT: StaticSchema = ( + 18, + n1, + _s45, + 0, + (_s46,), + ((3, 0),), +) + +GREETING_LIST: StaticSchema = ( + 16, + n1, + _s47, + 0, + (_s29,), + ((GREETING_STRUCT, 0),), +) + +QUERY_LISTS_INPUT: StaticSchema = ( + 18, + n0, + _s48, + {_s14: None}, + ( + _s35, + _s49, + _s50, + _s51, + _s53, + ), + ( + (STRING_LIST, 0), + (GREETING_LIST, 0), + (LIST_WITH_XML_NAME, 0), + (LIST_WITH_XML_NAME, {_s22: _s52}), + (NESTED_STRUCT_WITH_LIST, 0), + ), +) + +EPOCH_SECONDS: StaticSchema = ( + 4, + n1, + _s54, + {_s8: _s55}, +) + +QUERY_TIMESTAMPS_INPUT: StaticSchema = ( + 18, + n0, + _s56, + {_s14: None}, + ( + _s57, + _s58, + _s59, + ), + ( + (4, 0), + (4, {_s8: _s55}), + (EPOCH_SECONDS, 0), + ), +) + +RECURSIVE_XML_SHAPES_OUTPUT: StaticSchema = ( + 18, + n0, + _s60, + {_s11: None}, + (_s61,), + ((lambda: RECURSIVE_XML_SHAPES_OUTPUT_NESTED1, 0),), +) + +RENAMED_LIST_MEMBERS: StaticSchema = ( + 16, + n0, + _s62, + 0, + (_s29,), + ((3, {_s22: _s32}),), +) + +FOO_ENUM: StaticSchema = ( + 14, + n1, + _s63, + 0, + ( + _s64, + _s66, + _s68, + _s70, + _s72, + ), + ( + (-1, {_s65: _s1}), + (-1, {_s65: _s67}), + (-1, {_s65: _s69}), + (-1, {_s65: _s71}), + (-1, {_s65: _s73}), + ), +) + +SIMPLE_INPUT_PARAMS_INPUT: StaticSchema = ( + 18, + n0, + _s74, + {_s14: None}, + ( + _s1, + _s69, + _s67, + _s75, + _s76, + _s77, + _s78, + _s63, + _s79, + _s81, + _s83, + _s85, + _s87, + _s90, + ), + ( + (3, 0), + (3, 0), + (2, 0), + (7, 0), + (9, 0), + (10, 0), + (1, 0), + (FOO_ENUM, 0), + (3, {_s80: _s79}), + (3, {_s80: _s81, _s22: _s82}), + (3, {_s22: _s84}), + (3, {_s80: _s86}), + (3, {_s80: _s88, _s22: _s89}), + (3, {_s22: _s91}), + ), +) + +SIMPLE_SCALAR_XML_PROPERTIES_OUTPUT: StaticSchema = ( + 18, + n0, + _s92, + {_s11: None}, + ( + _s93, + _s94, + _s95, + _s96, + _s97, + _s98, + _s99, + _s100, + _s101, + _s102, + ), + ( + (3, {_s80: _s23}), + (3, 0), + (2, 0), + (2, 0), + (5, 0), + (6, 0), + (7, 0), + (8, 0), + (9, 0), + (10, {_s22: _s103}), + ), +) + +STRUCTURE_LIST_MEMBER: StaticSchema = ( + 18, + n0, + _s104, + 0, + ( + _s105, + _s107, + ), + ( + (3, {_s22: _s106}), + (3, {_s22: _s108}), + ), +) + +STRUCTURE_LIST: StaticSchema = ( + 16, + n0, + _s109, + 0, + (_s29,), + ((STRUCTURE_LIST_MEMBER, {_s22: _s32}),), +) + +XML_BLOBS_OUTPUT: StaticSchema = ( + 18, + n0, + _s110, + {_s11: None}, + (_s42,), + ((1, 0),), +) + +FOO_ENUM_LIST: StaticSchema = ( + 16, + n1, + _s111, + 0, + (_s29,), + ((FOO_ENUM, 0),), +) + +FOO_ENUM_SET: StaticSchema = ( + 16, + n1, + _s112, + 0, + (_s29,), + ((FOO_ENUM, 0),), +) + +FOO_ENUM_MAP: StaticSchema = ( + 17, + n1, + _s113, + 0, + ( + _s114, + _s106, + ), + ( + (3, 0), + (FOO_ENUM, 0), + ), +) + +XML_ENUMS_OUTPUT: StaticSchema = ( + 18, + n0, + _s115, + {_s11: None}, + ( + _s116, + _s117, + _s118, + _s119, + _s120, + _s121, + ), + ( + (FOO_ENUM, 0), + (FOO_ENUM, 0), + (FOO_ENUM, 0), + (FOO_ENUM_LIST, 0), + (FOO_ENUM_SET, 0), + (FOO_ENUM_MAP, 0), + ), +) + +INTEGER_ENUM: StaticSchema = ( + 15, + n1, + _s122, + 0, + ( + _s123, + _s124, + _s125, + ), + ( + (-1, {_s65: 1}), + (-1, {_s65: 2}), + (-1, {_s65: 3}), + ), +) + +INTEGER_ENUM_LIST: StaticSchema = ( + 16, + n1, + _s126, + 0, + (_s29,), + ((INTEGER_ENUM, 0),), +) + +INTEGER_ENUM_SET: StaticSchema = ( + 16, + n1, + _s127, + 0, + (_s29,), + ((INTEGER_ENUM, 0),), +) + +INTEGER_ENUM_MAP: StaticSchema = ( + 17, + n1, + _s128, + 0, + ( + _s114, + _s106, + ), + ( + (3, 0), + (INTEGER_ENUM, 0), + ), +) + +XML_INT_ENUMS_OUTPUT: StaticSchema = ( + 18, + n0, + _s129, + {_s11: None}, + ( + _s130, + _s131, + _s132, + _s133, + _s134, + _s135, + ), + ( + (INTEGER_ENUM, 0), + (INTEGER_ENUM, 0), + (INTEGER_ENUM, 0), + (INTEGER_ENUM_LIST, 0), + (INTEGER_ENUM_SET, 0), + (INTEGER_ENUM_MAP, 0), + ), +) + +STRING_SET: StaticSchema = ( + 16, + n1, + _s136, + 0, + (_s29,), + ((3, 0),), +) + +INTEGER_LIST: StaticSchema = ( + 16, + n1, + _s137, + 0, + (_s29,), + ((7, 0),), +) + +BOOLEAN_LIST: StaticSchema = ( + 16, + n1, + _s138, + 0, + (_s29,), + ((2, 0),), +) + +TIMESTAMP_LIST: StaticSchema = ( + 16, + n1, + _s139, + 0, + (_s29,), + ((4, 0),), +) + +NESTED_STRING_LIST: StaticSchema = ( + 16, + n1, + _s140, + 0, + (_s29,), + ((STRING_LIST, 0),), +) + +XML_LISTS_OUTPUT: StaticSchema = ( + 18, + n0, + _s141, + {_s11: None}, + ( + _s142, + _s143, + _s144, + _s145, + _s146, + _s147, + _s133, + _s148, + _s149, + _s151, + _s153, + _s155, + _s156, + _s157, + ), + ( + (STRING_LIST, 0), + (STRING_SET, 0), + (INTEGER_LIST, 0), + (BOOLEAN_LIST, 0), + (TIMESTAMP_LIST, 0), + (FOO_ENUM_LIST, 0), + (INTEGER_ENUM_LIST, 0), + (NESTED_STRING_LIST, 0), + (RENAMED_LIST_MEMBERS, {_s22: _s150}), + (RENAMED_LIST_MEMBERS, {_s152: None}), + (RENAMED_LIST_MEMBERS, {_s152: None, _s22: _s154}), + (LIST_WITH_MEMBER_NAMESPACE, {_s152: None}), + (LIST_WITH_NAMESPACE, {_s152: None}), + (STRUCTURE_LIST, {_s22: _s158}), + ), +) + +XML_NAMESPACED_LIST: StaticSchema = ( + 16, + n0, + _s159, + 0, + (_s29,), + ((3, {_s28: MappingProxyType({"uri": "http://bux.com"})}),), +) + +XML_NAMESPACE_NESTED: StaticSchema = ( + 18, + n0, + _s160, + {_s28: MappingProxyType({"uri": "http://foo.com"})}, + ( + _s24, + _s161, + ), + ( + (3, {_s28: MappingProxyType({"uri": "http://baz.com", "prefix": "baz"})}), + (XML_NAMESPACED_LIST, {_s28: MappingProxyType({"uri": "http://qux.com"})}), + ), +) + +XML_NAMESPACES_OUTPUT: StaticSchema = ( + 18, + n0, + _s162, + {_s28: MappingProxyType({"uri": "http://foo.com"}), _s11: None}, + (_s61,), + ((XML_NAMESPACE_NESTED, 0),), +) + +HTTP_DATE: StaticSchema = ( + 4, + n1, + _s163, + {_s8: _s164}, +) + +XML_TIMESTAMPS_OUTPUT: StaticSchema = ( + 18, + n0, + _s165, + {_s11: None}, + ( + _s166, + _s167, + _s168, + _s169, + _s170, + _s171, + _s172, + ), + ( + (4, 0), + (4, {_s8: _s9}), + (DATE_TIME, 0), + (4, {_s8: _s55}), + (EPOCH_SECONDS, 0), + (4, {_s8: _s164}), + (HTTP_DATE, 0), + ), +) + +RECURSIVE_XML_SHAPES_OUTPUT_NESTED1: StaticSchema = ( + 18, + n0, + _s173, + 0, + ( + _s24, + _s61, + ), + ( + (3, 0), + (lambda: RECURSIVE_XML_SHAPES_OUTPUT_NESTED2, 0), + ), +) + +RECURSIVE_XML_SHAPES_OUTPUT_NESTED2: StaticSchema = ( + 18, + n0, + _s174, + 0, + ( + _s175, + _s176, + ), + ( + (3, 0), + (RECURSIVE_XML_SHAPES_OUTPUT_NESTED1, 0), + ), +) + +STRUCT_ARG: StaticSchema = ( + 18, + n0, + _s177, + 0, + ( + _s178, + _s179, + _s180, + ), + ( + (3, 0), + (2, 0), + (lambda: STRUCT_ARG, 0), + ), +) diff --git a/codegen-output-py/ec2-query/src/ec2query/models.py b/codegen-output-py/ec2-query/src/ec2query/models.py new file mode 100644 index 000000000..b6cff76b8 --- /dev/null +++ b/codegen-output-py/ec2-query/src/ec2query/models.py @@ -0,0 +1,116 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "ComplexError": "COMPLEX_ERROR", + "ComplexNestedErrorData": "COMPLEX_NESTED_ERROR_DATA", + "DatetimeOffsetsOutput": "DATETIME_OFFSETS_OUTPUT", + "EmptyInputAndEmptyOutputInput": "EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT", + "EmptyInputAndEmptyOutputOutput": "EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT", + "FractionalSecondsOutput": "FRACTIONAL_SECONDS_OUTPUT", + "GreetingWithErrorsOutput": "GREETING_WITH_ERRORS_OUTPUT", + "HostLabelInput": "HOST_LABEL_INPUT", + "IgnoresWrappingXmlNameOutput": "IGNORES_WRAPPING_XML_NAME_OUTPUT", + "InvalidGreeting": "INVALID_GREETING", + "NestedStructWithList": "NESTED_STRUCT_WITH_LIST", + "NestedStructuresInput": "NESTED_STRUCTURES_INPUT", + "NoInputAndOutputOutput": "NO_INPUT_AND_OUTPUT_OUTPUT", + "PutWithContentEncodingInput": "PUT_WITH_CONTENT_ENCODING_INPUT", + "QueryIdempotencyTokenAutoFillInput": "QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL_INPUT", + "QueryListsInput": "QUERY_LISTS_INPUT", + "QueryTimestampsInput": "QUERY_TIMESTAMPS_INPUT", + "RecursiveXmlShapesOutput": "RECURSIVE_XML_SHAPES_OUTPUT", + "RecursiveXmlShapesOutputNested1": "RECURSIVE_XML_SHAPES_OUTPUT_NESTED1", + "RecursiveXmlShapesOutputNested2": "RECURSIVE_XML_SHAPES_OUTPUT_NESTED2", + "SimpleInputParamsInput": "SIMPLE_INPUT_PARAMS_INPUT", + "SimpleScalarXmlPropertiesOutput": "SIMPLE_SCALAR_XML_PROPERTIES_OUTPUT", + "StructArg": "STRUCT_ARG", + "StructureListMember": "STRUCTURE_LIST_MEMBER", + "XmlBlobsOutput": "XML_BLOBS_OUTPUT", + "XmlEnumsOutput": "XML_ENUMS_OUTPUT", + "XmlIntEnumsOutput": "XML_INT_ENUMS_OUTPUT", + "XmlListsOutput": "XML_LISTS_OUTPUT", + "XmlNamespaceNested": "XML_NAMESPACE_NESTED", + "XmlNamespacesOutput": "XML_NAMESPACES_OUTPUT", + "XmlTimestampsOutput": "XML_TIMESTAMPS_OUTPUT", + "FooEnum": "FOO_ENUM", + "GreetingStruct": "GREETING_STRUCT", + "IntegerEnum": "INTEGER_ENUM", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "ComplexError", + "ComplexNestedErrorData", + "DatetimeOffsetsOutput", + "EmptyInputAndEmptyOutputInput", + "EmptyInputAndEmptyOutputOutput", + "FooEnum", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "HostLabelInput", + "IgnoresWrappingXmlNameOutput", + "IntegerEnum", + "InvalidGreeting", + "NestedStructWithList", + "NestedStructuresInput", + "NoInputAndOutputOutput", + "PutWithContentEncodingInput", + "QueryIdempotencyTokenAutoFillInput", + "QueryListsInput", + "QueryTimestampsInput", + "RecursiveXmlShapesOutput", + "RecursiveXmlShapesOutputNested1", + "RecursiveXmlShapesOutputNested2", + "SimpleInputParamsInput", + "SimpleScalarXmlPropertiesOutput", + "StructArg", + "StructureListMember", + "XmlBlobsOutput", + "XmlEnumsOutput", + "XmlIntEnumsOutput", + "XmlListsOutput", + "XmlNamespaceNested", + "XmlNamespacesOutput", + "XmlTimestampsOutput", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/ec2-query/src/ec2query/models.pyi b/codegen-output-py/ec2-query/src/ec2query/models.pyi new file mode 100644 index 000000000..451e1f61c --- /dev/null +++ b/codegen-output-py/ec2-query/src/ec2query/models.pyi @@ -0,0 +1,455 @@ +from dataclasses import dataclass +from datetime import datetime +from enum import IntEnum, StrEnum +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.serializers import ShapeSerializer +from smithy_core.types import UnknownEnumMixin + +__all__ = [ + "ComplexError", + "ComplexNestedErrorData", + "DatetimeOffsetsOutput", + "EmptyInputAndEmptyOutputInput", + "EmptyInputAndEmptyOutputOutput", + "FooEnum", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "HostLabelInput", + "IgnoresWrappingXmlNameOutput", + "IntegerEnum", + "InvalidGreeting", + "NestedStructWithList", + "NestedStructuresInput", + "NoInputAndOutputOutput", + "PutWithContentEncodingInput", + "QueryIdempotencyTokenAutoFillInput", + "QueryListsInput", + "QueryTimestampsInput", + "RecursiveXmlShapesOutput", + "RecursiveXmlShapesOutputNested1", + "RecursiveXmlShapesOutputNested2", + "ServiceError", + "SimpleInputParamsInput", + "SimpleScalarXmlPropertiesOutput", + "StructArg", + "StructureListMember", + "XmlBlobsOutput", + "XmlEnumsOutput", + "XmlIntEnumsOutput", + "XmlListsOutput", + "XmlNamespaceNested", + "XmlNamespacesOutput", + "XmlTimestampsOutput", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class ComplexError(ServiceError, _SerdeShape): + "This error is thrown when a request is invalid." + + top_level: str | None = ... + nested: ComplexNestedErrorData | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ComplexNestedErrorData(_SerdeShape): + "Dataclass for ComplexNestedErrorData structure." + + foo: str | None = ... + +@dataclass(kw_only=True) +class DatetimeOffsetsOutput(_SerdeShape): + "Dataclass for DatetimeOffsetsOutput structure." + + datetime_: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class EmptyInputAndEmptyOutputInput(_SerdeShape): + "Dataclass for EmptyInputAndEmptyOutputInput structure." + +@dataclass(kw_only=True) +class EmptyInputAndEmptyOutputOutput(_SerdeShape): + "Dataclass for EmptyInputAndEmptyOutputOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FractionalSecondsOutput(_SerdeShape): + "Dataclass for FractionalSecondsOutput structure." + + datetime_: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class GreetingWithErrorsOutput(_SerdeShape): + "Dataclass for GreetingWithErrorsOutput structure." + + greeting: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HostLabelInput(_SerdeShape): + "Dataclass for HostLabelInput structure." + + label: str | None = ... + +@dataclass(kw_only=True) +class IgnoresWrappingXmlNameOutput(_SerdeShape): + "Dataclass for IgnoresWrappingXmlNameOutput structure." + + foo: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class InvalidGreeting(ServiceError, _SerdeShape): + "This error is thrown when an invalid greeting value is provided." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class NestedStructWithList(_SerdeShape): + "Dataclass for NestedStructWithList structure." + + list_arg: list[str] | None = ... + +@dataclass(kw_only=True) +class NestedStructuresInput(_SerdeShape): + "Dataclass for NestedStructuresInput structure." + + nested: StructArg | None = ... + +@dataclass(kw_only=True) +class NoInputAndOutputOutput(_SerdeShape): + "Dataclass for NoInputAndOutputOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class PutWithContentEncodingInput(_SerdeShape): + "Dataclass for PutWithContentEncodingInput structure." + + encoding: str | None = ... + data: str | None = ... + +@dataclass(kw_only=True) +class QueryIdempotencyTokenAutoFillInput(_SerdeShape): + "Dataclass for QueryIdempotencyTokenAutoFillInput structure." + + token: str | None = ... + "This field is autopopulated if not provided." + +@dataclass(kw_only=True) +class QueryListsInput(_SerdeShape): + "Dataclass for QueryListsInput structure." + + list_arg: list[str] | None = ... + complex_list_arg: list[GreetingStruct] | None = ... + list_arg_with_xml_name_member: list[str] | None = ... + list_arg_with_xml_name: list[str] | None = ... + nested_with_list: NestedStructWithList | None = ... + +@dataclass(kw_only=True) +class QueryTimestampsInput(_SerdeShape): + "Dataclass for QueryTimestampsInput structure." + + normal_format: datetime | None = ... + epoch_member: datetime | None = ... + epoch_target: datetime | None = ... + +@dataclass(kw_only=True) +class RecursiveXmlShapesOutput(_SerdeShape): + "Dataclass for RecursiveXmlShapesOutput structure." + + nested: RecursiveXmlShapesOutputNested1 | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class RecursiveXmlShapesOutputNested1(_SerdeShape): + "Dataclass for RecursiveXmlShapesOutputNested1 structure." + + foo: str | None = ... + nested: RecursiveXmlShapesOutputNested2 | None = ... + +@dataclass(kw_only=True) +class RecursiveXmlShapesOutputNested2(_SerdeShape): + "Dataclass for RecursiveXmlShapesOutputNested2 structure." + + bar: str | None = ... + recursive_member: RecursiveXmlShapesOutputNested1 | None = ... + +@dataclass(kw_only=True) +class SimpleInputParamsInput(_SerdeShape): + "Dataclass for SimpleInputParamsInput structure." + + foo: str | None = ... + bar: str | None = ... + baz: bool | None = ... + bam: int | None = ... + float_value: float | None = ... + boo: float | None = ... + qux: bytes | None = ... + foo_enum: str | None = ... + has_query_name: str | None = ... + has_query_and_xml_name: str | None = ... + uses_xml_name: str | None = ... + distinct_query_name: str | None = ... + distinct_query_and_xml_name: str | None = ... + distinct_xml_name: str | None = ... + +@dataclass(kw_only=True) +class SimpleScalarXmlPropertiesOutput(_SerdeShape): + "Dataclass for SimpleScalarXmlPropertiesOutput structure." + + string_value: str | None = ... + empty_string_value: str | None = ... + true_boolean_value: bool | None = ... + false_boolean_value: bool | None = ... + byte_value: int | None = ... + short_value: int | None = ... + integer_value: int | None = ... + long_value: int | None = ... + float_value: float | None = ... + double_value: float | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class StructArg(_SerdeShape): + "Dataclass for StructArg structure." + + string_arg: str | None = ... + other_arg: bool | None = ... + recursive_arg: StructArg | None = ... + +@dataclass(kw_only=True) +class StructureListMember(_SerdeShape): + "Dataclass for StructureListMember structure." + + a: str | None = ... + b: str | None = ... + +@dataclass(kw_only=True) +class XmlBlobsOutput(_SerdeShape): + "Dataclass for XmlBlobsOutput structure." + + data: bytes | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlEnumsOutput(_SerdeShape): + "Dataclass for XmlEnumsOutput structure." + + foo_enum1: str | None = ... + foo_enum2: str | None = ... + foo_enum3: str | None = ... + foo_enum_list: list[str] | None = ... + foo_enum_set: list[str] | None = ... + foo_enum_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlIntEnumsOutput(_SerdeShape): + "Dataclass for XmlIntEnumsOutput structure." + + int_enum1: int | None = ... + int_enum2: int | None = ... + int_enum3: int | None = ... + int_enum_list: list[int] | None = ... + int_enum_set: list[int] | None = ... + int_enum_map: dict[str, int] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlListsOutput(_SerdeShape): + "Dataclass for XmlListsOutput structure." + + string_list: list[str] | None = ... + string_set: list[str] | None = ... + integer_list: list[int] | None = ... + boolean_list: list[bool] | None = ... + timestamp_list: list[datetime] | None = ... + enum_list: list[str] | None = ... + int_enum_list: list[int] | None = ... + nested_string_list: list[list[str]] | None = ... + renamed_list_members: list[str] | None = ... + flattened_list: list[str] | None = ... + flattened_list2: list[str] | None = ... + flattened_list_with_member_namespace: list[str] | None = ... + flattened_list_with_namespace: list[str] | None = ... + structure_list: list[StructureListMember] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlNamespaceNested(_SerdeShape): + "Dataclass for XmlNamespaceNested structure." + + foo: str | None = ... + values: list[str] | None = ... + +@dataclass(kw_only=True) +class XmlNamespacesOutput(_SerdeShape): + "Dataclass for XmlNamespacesOutput structure." + + nested: XmlNamespaceNested | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlTimestampsOutput(_SerdeShape): + "Dataclass for XmlTimestampsOutput structure." + + normal: datetime | None = ... + date_time: datetime | None = ... + date_time_on_target: datetime | None = ... + epoch_seconds: datetime | None = ... + epoch_seconds_on_target: datetime | None = ... + http_date: datetime | None = ... + http_date_on_target: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +class FooEnum(UnknownEnumMixin, StrEnum): + FOO = "Foo" + BAZ = "Baz" + BAR = "Bar" + ONE = "1" + ZERO = "0" + +@dataclass(kw_only=True) +class GreetingStruct(_SerdeShape): + "Dataclass for GreetingStruct structure." + + hi: str | None = ... + +class IntegerEnum(UnknownEnumMixin, IntEnum): + A = 1 + B = 2 + C = 3 diff --git a/codegen-output-py/ec2-query/src/ec2query/py.typed b/codegen-output-py/ec2-query/src/ec2query/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/my-handwritten-json-model/.smithy-python-manifest.json b/codegen-output-py/my-handwritten-json-model/.smithy-python-manifest.json new file mode 100644 index 000000000..f958706b5 --- /dev/null +++ b/codegen-output-py/my-handwritten-json-model/.smithy-python-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "README.md": "b62b9017d3b5f4ac588458f462dcf7da6232f960f8aac1d5ed16a4be3bd34695", + "pyproject.toml": "d52b2820f44a7312778e0cd1f52ed1aecd812b5062537140bcc30442c7f2eb6c", + "src/my_handwritten_json_model/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/my_handwritten_json_model/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/my_handwritten_json_model/_private/schemas.py": "002be4e9d7e845198664c36e3245ea2086d930f7d0595a8239d57285e2f24068", + "src/my_handwritten_json_model/models.py": "c7d9575479a8a6a3580871da76345de34c6ca18a977f271fcf9bd62801715700", + "src/my_handwritten_json_model/models.pyi": "8f59462ef2d242ae24b24bbcdb082aa05576aab445d2fa2bc9ae3a9194399bdb", + "src/my_handwritten_json_model/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/my-handwritten-json-model/README.md b/codegen-output-py/my-handwritten-json-model/README.md new file mode 100644 index 000000000..aab21ce56 --- /dev/null +++ b/codegen-output-py/my-handwritten-json-model/README.md @@ -0,0 +1,5 @@ + + +## my_handwritten_json_model Types Package + +Native Python types for the my-handwritten-json-model projection diff --git a/codegen-output-py/my-handwritten-json-model/pyproject.toml b/codegen-output-py/my-handwritten-json-model/pyproject.toml new file mode 100644 index 000000000..4b64897d5 --- /dev/null +++ b/codegen-output-py/my-handwritten-json-model/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "my_handwritten_json_model" +version = "0.0.1" +description = "Native Python types for the my-handwritten-json-model projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "my_handwritten_json_model"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/my_handwritten_json_model", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/__init__.py b/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/_private/__init__.py b/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/_private/schemas.py b/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/_private/schemas.py new file mode 100644 index 000000000..982fb0a2f --- /dev/null +++ b/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/_private/schemas.py @@ -0,0 +1,176 @@ +from smithy_core._schema_compact import StaticSchema + +n0 = "smithy.python.tests.handwritten.json" +_s0 = "Alpha" +_s1 = "id" +_s2 = "timestamp" +_s3 = "DifferentShapeName" +_s4 = "name" +_s5 = "number" +_s6 = "IntegerList" +_s7 = "member" +_s8 = "GammaPayload" +_s9 = "message" +_s10 = "values" +_s11 = "Gamma" +_s12 = "sequenceNumber" +_s13 = "smithy.api#eventHeader" +_s14 = "payload" +_s15 = "smithy.api#eventPayload" +_s16 = "StreamServiceError" +_s17 = "smithy.api#error" +_s18 = "server" +_s19 = "ThrottlingEvent" +_s20 = "client" +_s21 = "TradeEvents" +_s22 = "smithy.api#streaming" +_s23 = "alpha" +_s24 = "beta" +_s25 = "gamma" +_s26 = "delta" +_s27 = "throttle" +_s28 = "TradeEventStreamInput" +_s29 = "smithy.api#input" +_s30 = "sessionId" +_s31 = "events" +_s32 = "TradeEventStreamOutput" +_s33 = "smithy.api#output" +_s34 = "greeting" + +ALPHA: StaticSchema = ( + 18, + n0, + _s0, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (4, 0), + ), +) + +DIFFERENT_SHAPE_NAME: StaticSchema = ( + 18, + n0, + _s3, + 0, + ( + _s4, + _s5, + ), + ( + (3, 0), + (7, 0), + ), +) + +INTEGER_LIST: StaticSchema = ( + 16, + n0, + _s6, + 0, + (_s7,), + ((7, 0),), +) + +GAMMA_PAYLOAD: StaticSchema = ( + 18, + n0, + _s8, + 0, + ( + _s9, + _s10, + ), + ( + (3, 0), + (INTEGER_LIST, 0), + ), +) + +GAMMA: StaticSchema = ( + 18, + n0, + _s11, + 0, + ( + _s12, + _s14, + ), + ( + (7, {_s13: None}), + (GAMMA_PAYLOAD, {_s15: None}), + ), +) + +STREAM_SERVICE_ERROR: StaticSchema = ( + 18, + n0, + _s16, + {_s17: _s18}, + (_s9,), + ((3, 0),), +) + +THROTTLING_EVENT: StaticSchema = ( + 18, + n0, + _s19, + {_s17: _s20}, + (_s9,), + ((3, 0),), +) + +TRADE_EVENTS: StaticSchema = ( + 19, + n0, + _s21, + {_s22: None}, + ( + _s23, + _s24, + _s25, + _s26, + _s27, + ), + ( + (ALPHA, 0), + (-1, 0), + (GAMMA, 0), + (DIFFERENT_SHAPE_NAME, 0), + (THROTTLING_EVENT, 0), + ), +) + +TRADE_EVENT_STREAM_INPUT: StaticSchema = ( + 18, + n0, + _s28, + {_s29: None}, + ( + _s30, + _s31, + ), + ( + (3, 0), + (TRADE_EVENTS, 0), + ), +) + +TRADE_EVENT_STREAM_OUTPUT: StaticSchema = ( + 18, + n0, + _s32, + {_s33: None}, + ( + _s34, + _s31, + ), + ( + (3, 0), + (TRADE_EVENTS, 0), + ), +) diff --git a/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/models.py b/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/models.py new file mode 100644 index 000000000..50d6a8486 --- /dev/null +++ b/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/models.py @@ -0,0 +1,73 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "Alpha": "ALPHA", + "DifferentShapeName": "DIFFERENT_SHAPE_NAME", + "Gamma": "GAMMA", + "GammaPayload": "GAMMA_PAYLOAD", + "StreamServiceError": "STREAM_SERVICE_ERROR", + "ThrottlingEvent": "THROTTLING_EVENT", + "TradeEventStreamInput": "TRADE_EVENT_STREAM_INPUT", + "TradeEventStreamOutput": "TRADE_EVENT_STREAM_OUTPUT", + "TradeEvents": "TRADE_EVENTS", + "TradeEventsAlpha": "TRADE_EVENTS", + "TradeEventsBeta": "TRADE_EVENTS", + "TradeEventsGamma": "TRADE_EVENTS", + "TradeEventsDelta": "TRADE_EVENTS", + "TradeEventsThrottle": "TRADE_EVENTS", + "TradeEventsUnknown": "TRADE_EVENTS", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_MODEL_NAMES = (*tuple(_MODEL_INDEX), "Unit") +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "Alpha", + "DifferentShapeName", + "Gamma", + "GammaPayload", + "StreamServiceError", + "ThrottlingEvent", + "TradeEventStreamInput", + "TradeEventStreamOutput", + "TradeEvents", + "Unit", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/models.pyi b/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/models.pyi new file mode 100644 index 000000000..e7a388a9a --- /dev/null +++ b/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/models.pyi @@ -0,0 +1,165 @@ +from dataclasses import dataclass +from datetime import datetime +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.serializers import ShapeSerializer + +__all__ = [ + "Alpha", + "DifferentShapeName", + "Gamma", + "GammaPayload", + "ServiceError", + "StreamServiceError", + "ThrottlingEvent", + "TradeEventStreamInput", + "TradeEventStreamOutput", + "TradeEvents", + "TradeEventsAlpha", + "TradeEventsBeta", + "TradeEventsDelta", + "TradeEventsGamma", + "TradeEventsThrottle", + "TradeEventsUnknown", + "Unit", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class Alpha(_SerdeShape): + "Dataclass for Alpha structure." + + id: str | None = ... + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class DifferentShapeName(_SerdeShape): + "Dataclass for DifferentShapeName structure." + + name: str | None = ... + number: int | None = ... + +@dataclass(kw_only=True) +class Gamma(_SerdeShape): + "Dataclass for Gamma structure." + + sequence_number: int | None = ... + payload: GammaPayload | None = ... + +@dataclass(kw_only=True) +class GammaPayload(_SerdeShape): + "Dataclass for GammaPayload structure." + + message: str | None = ... + values: list[int] | None = ... + +@dataclass(kw_only=True) +class StreamServiceError(ServiceError, _SerdeShape): + "Dataclass for StreamServiceError structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ThrottlingEvent(ServiceError, _SerdeShape): + "Dataclass for ThrottlingEvent structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class TradeEventStreamInput(_SerdeShape): + "Dataclass for TradeEventStreamInput structure." + + session_id: str | None = ... + +@dataclass(kw_only=True) +class TradeEventStreamOutput(_SerdeShape): + "Dataclass for TradeEventStreamOutput structure." + + greeting: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass +class TradeEventsAlpha(_SerdeShape): + value: Alpha + +@dataclass +class TradeEventsBeta(_SerdeShape): + value: Unit + +@dataclass +class TradeEventsGamma(_SerdeShape): + value: Gamma + +@dataclass +class TradeEventsDelta(_SerdeShape): + value: DifferentShapeName + +@dataclass +class TradeEventsThrottle(_SerdeShape): + value: ThrottlingEvent + +@dataclass +class TradeEventsUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +TradeEvents = ( + TradeEventsAlpha + | TradeEventsBeta + | TradeEventsGamma + | TradeEventsDelta + | TradeEventsThrottle + | TradeEventsUnknown +) + +class _TradeEventsDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> TradeEvents: ... + +@dataclass(kw_only=True) +class Unit(_SerdeShape): + pass diff --git a/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/py.typed b/codegen-output-py/my-handwritten-json-model/src/my_handwritten_json_model/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/my-handwritten-model/.smithy-python-manifest.json b/codegen-output-py/my-handwritten-model/.smithy-python-manifest.json new file mode 100644 index 000000000..8d41f0334 --- /dev/null +++ b/codegen-output-py/my-handwritten-model/.smithy-python-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "README.md": "47dc0fb73aa8673141f1fcde44fa3ba3995be83953b41c4f26e3ceb5c5b3ffda", + "pyproject.toml": "d15c8789a77a3152fb54c4b2e1f7d383e0df5872b597fc013a413d9112f93609", + "src/my_handwritten_model/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/my_handwritten_model/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/my_handwritten_model/_private/schemas.py": "6b8ddc152fe086e6ef8277a04da92ea535791b8a90dd066d3defd9cb71a36ba9", + "src/my_handwritten_model/models.py": "ca3c2b4d5dab0e7da762ec0feceaeda02fd0656fdeb161e0417686a8b4279e24", + "src/my_handwritten_model/models.pyi": "a01e010947193acad3008148301f76d2e5de0dbbe09b149f325d64582b0815a3", + "src/my_handwritten_model/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/my-handwritten-model/README.md b/codegen-output-py/my-handwritten-model/README.md new file mode 100644 index 000000000..3950bc201 --- /dev/null +++ b/codegen-output-py/my-handwritten-model/README.md @@ -0,0 +1,5 @@ + + +## my_handwritten_model Types Package + +Native Python types for the my-handwritten-model projection diff --git a/codegen-output-py/my-handwritten-model/pyproject.toml b/codegen-output-py/my-handwritten-model/pyproject.toml new file mode 100644 index 000000000..9700d8656 --- /dev/null +++ b/codegen-output-py/my-handwritten-model/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "my_handwritten_model" +version = "0.0.1" +description = "Native Python types for the my-handwritten-model projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "my_handwritten_model"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/my_handwritten_model", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/my-handwritten-model/src/my_handwritten_model/__init__.py b/codegen-output-py/my-handwritten-model/src/my_handwritten_model/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/my-handwritten-model/src/my_handwritten_model/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/my-handwritten-model/src/my_handwritten_model/_private/__init__.py b/codegen-output-py/my-handwritten-model/src/my_handwritten_model/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/my-handwritten-model/src/my_handwritten_model/_private/schemas.py b/codegen-output-py/my-handwritten-model/src/my_handwritten_model/_private/schemas.py new file mode 100644 index 000000000..0156f81ed --- /dev/null +++ b/codegen-output-py/my-handwritten-model/src/my_handwritten_model/_private/schemas.py @@ -0,0 +1,341 @@ +from smithy_core._schema_compact import StaticSchema + +n0 = "smithy.python.tests.handwritten" +_s0 = "Alpha" +_s1 = "id" +_s2 = "timestamp" +_s3 = "DifferentShapeName" +_s4 = "name" +_s5 = "number" +_s6 = "IntegerList" +_s7 = "member" +_s8 = "GammaPayload" +_s9 = "message" +_s10 = "values" +_s11 = "Gamma" +_s12 = "sequenceNumber" +_s13 = "smithy.api#eventHeader" +_s14 = "payload" +_s15 = "smithy.api#eventPayload" +_s16 = "HeartbeatEvent" +_s17 = "LogEvent" +_s18 = "level" +_s19 = "MetricEvent" +_s20 = "value" +_s21 = "NotificationEvent" +_s22 = "topic" +_s23 = "PublishEventStream" +_s24 = "smithy.api#streaming" +_s25 = "log" +_s26 = "metric" +_s27 = "PublishEventsInput" +_s28 = "smithy.api#input" +_s29 = "channel" +_s30 = "events" +_s31 = "PublishEventsOutput" +_s32 = "smithy.api#output" +_s33 = "eventCount" +_s34 = "StreamServiceError" +_s35 = "smithy.api#error" +_s36 = "server" +_s37 = "SubscribeEventStream" +_s38 = "notification" +_s39 = "heartbeat" +_s40 = "SubscribeToEventsInput" +_s41 = "maxEvents" +_s42 = "SubscribeToEventsOutput" +_s43 = "subscriptionId" +_s44 = "ThrottlingEvent" +_s45 = "client" +_s46 = "TradeEvents" +_s47 = "alpha" +_s48 = "beta" +_s49 = "gamma" +_s50 = "delta" +_s51 = "throttle" +_s52 = "TradeEventStreamInput" +_s53 = "sessionId" +_s54 = "TradeEventStreamOutput" +_s55 = "greeting" + +ALPHA: StaticSchema = ( + 18, + n0, + _s0, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (4, 0), + ), +) + +DIFFERENT_SHAPE_NAME: StaticSchema = ( + 18, + n0, + _s3, + 0, + ( + _s4, + _s5, + ), + ( + (3, 0), + (7, 0), + ), +) + +INTEGER_LIST: StaticSchema = ( + 16, + n0, + _s6, + 0, + (_s7,), + ((7, 0),), +) + +GAMMA_PAYLOAD: StaticSchema = ( + 18, + n0, + _s8, + 0, + ( + _s9, + _s10, + ), + ( + (3, 0), + (INTEGER_LIST, 0), + ), +) + +GAMMA: StaticSchema = ( + 18, + n0, + _s11, + 0, + ( + _s12, + _s14, + ), + ( + (7, {_s13: None}), + (GAMMA_PAYLOAD, {_s15: None}), + ), +) + +HEARTBEAT_EVENT: StaticSchema = ( + 18, + n0, + _s16, + 0, + (_s2,), + ((4, 0),), +) + +LOG_EVENT: StaticSchema = ( + 18, + n0, + _s17, + 0, + ( + _s18, + _s9, + ), + ( + (3, 0), + (3, 0), + ), +) + +METRIC_EVENT: StaticSchema = ( + 18, + n0, + _s19, + 0, + ( + _s4, + _s20, + ), + ( + (3, 0), + (10, 0), + ), +) + +NOTIFICATION_EVENT: StaticSchema = ( + 18, + n0, + _s21, + 0, + ( + _s22, + _s14, + ), + ( + (3, 0), + (3, 0), + ), +) + +PUBLISH_EVENT_STREAM: StaticSchema = ( + 19, + n0, + _s23, + {_s24: None}, + ( + _s25, + _s26, + ), + ( + (LOG_EVENT, 0), + (METRIC_EVENT, 0), + ), +) + +PUBLISH_EVENTS_INPUT: StaticSchema = ( + 18, + n0, + _s27, + {_s28: None}, + ( + _s29, + _s30, + ), + ( + (3, 0), + (PUBLISH_EVENT_STREAM, 0), + ), +) + +PUBLISH_EVENTS_OUTPUT: StaticSchema = ( + 18, + n0, + _s31, + {_s32: None}, + ( + _s33, + _s9, + ), + ( + (7, 0), + (3, 0), + ), +) + +STREAM_SERVICE_ERROR: StaticSchema = ( + 18, + n0, + _s34, + {_s35: _s36}, + (_s9,), + ((3, 0),), +) + +SUBSCRIBE_EVENT_STREAM: StaticSchema = ( + 19, + n0, + _s37, + {_s24: None}, + ( + _s38, + _s39, + ), + ( + (NOTIFICATION_EVENT, 0), + (HEARTBEAT_EVENT, 0), + ), +) + +SUBSCRIBE_TO_EVENTS_INPUT: StaticSchema = ( + 18, + n0, + _s40, + {_s28: None}, + ( + _s29, + _s41, + ), + ( + (3, 0), + (7, 0), + ), +) + +SUBSCRIBE_TO_EVENTS_OUTPUT: StaticSchema = ( + 18, + n0, + _s42, + {_s32: None}, + ( + _s43, + _s30, + ), + ( + (3, 0), + (SUBSCRIBE_EVENT_STREAM, 0), + ), +) + +THROTTLING_EVENT: StaticSchema = ( + 18, + n0, + _s44, + {_s35: _s45}, + (_s9,), + ((3, 0),), +) + +TRADE_EVENTS: StaticSchema = ( + 19, + n0, + _s46, + {_s24: None}, + ( + _s47, + _s48, + _s49, + _s50, + _s51, + ), + ( + (ALPHA, 0), + (-1, 0), + (GAMMA, 0), + (DIFFERENT_SHAPE_NAME, 0), + (THROTTLING_EVENT, 0), + ), +) + +TRADE_EVENT_STREAM_INPUT: StaticSchema = ( + 18, + n0, + _s52, + {_s28: None}, + ( + _s53, + _s30, + ), + ( + (3, 0), + (TRADE_EVENTS, 0), + ), +) + +TRADE_EVENT_STREAM_OUTPUT: StaticSchema = ( + 18, + n0, + _s54, + {_s32: None}, + ( + _s55, + _s30, + ), + ( + (3, 0), + (TRADE_EVENTS, 0), + ), +) diff --git a/codegen-output-py/my-handwritten-model/src/my_handwritten_model/models.py b/codegen-output-py/my-handwritten-model/src/my_handwritten_model/models.py new file mode 100644 index 000000000..b9de11b14 --- /dev/null +++ b/codegen-output-py/my-handwritten-model/src/my_handwritten_model/models.py @@ -0,0 +1,99 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "Alpha": "ALPHA", + "DifferentShapeName": "DIFFERENT_SHAPE_NAME", + "Gamma": "GAMMA", + "GammaPayload": "GAMMA_PAYLOAD", + "HeartbeatEvent": "HEARTBEAT_EVENT", + "LogEvent": "LOG_EVENT", + "MetricEvent": "METRIC_EVENT", + "NotificationEvent": "NOTIFICATION_EVENT", + "PublishEventStream": "PUBLISH_EVENT_STREAM", + "PublishEventStreamLog": "PUBLISH_EVENT_STREAM", + "PublishEventStreamMetric": "PUBLISH_EVENT_STREAM", + "PublishEventStreamUnknown": "PUBLISH_EVENT_STREAM", + "PublishEventsInput": "PUBLISH_EVENTS_INPUT", + "PublishEventsOutput": "PUBLISH_EVENTS_OUTPUT", + "StreamServiceError": "STREAM_SERVICE_ERROR", + "SubscribeEventStream": "SUBSCRIBE_EVENT_STREAM", + "SubscribeEventStreamNotification": "SUBSCRIBE_EVENT_STREAM", + "SubscribeEventStreamHeartbeat": "SUBSCRIBE_EVENT_STREAM", + "SubscribeEventStreamUnknown": "SUBSCRIBE_EVENT_STREAM", + "SubscribeToEventsInput": "SUBSCRIBE_TO_EVENTS_INPUT", + "SubscribeToEventsOutput": "SUBSCRIBE_TO_EVENTS_OUTPUT", + "ThrottlingEvent": "THROTTLING_EVENT", + "TradeEventStreamInput": "TRADE_EVENT_STREAM_INPUT", + "TradeEventStreamOutput": "TRADE_EVENT_STREAM_OUTPUT", + "TradeEvents": "TRADE_EVENTS", + "TradeEventsAlpha": "TRADE_EVENTS", + "TradeEventsBeta": "TRADE_EVENTS", + "TradeEventsGamma": "TRADE_EVENTS", + "TradeEventsDelta": "TRADE_EVENTS", + "TradeEventsThrottle": "TRADE_EVENTS", + "TradeEventsUnknown": "TRADE_EVENTS", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_MODEL_NAMES = (*tuple(_MODEL_INDEX), "Unit") +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "Alpha", + "DifferentShapeName", + "Gamma", + "GammaPayload", + "HeartbeatEvent", + "LogEvent", + "MetricEvent", + "NotificationEvent", + "PublishEventStream", + "PublishEventsInput", + "PublishEventsOutput", + "StreamServiceError", + "SubscribeEventStream", + "SubscribeToEventsInput", + "SubscribeToEventsOutput", + "ThrottlingEvent", + "TradeEventStreamInput", + "TradeEventStreamOutput", + "TradeEvents", + "Unit", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/my-handwritten-model/src/my_handwritten_model/models.pyi b/codegen-output-py/my-handwritten-model/src/my_handwritten_model/models.pyi new file mode 100644 index 000000000..15ef15b99 --- /dev/null +++ b/codegen-output-py/my-handwritten-model/src/my_handwritten_model/models.pyi @@ -0,0 +1,308 @@ +from dataclasses import dataclass +from datetime import datetime +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.serializers import ShapeSerializer + +__all__ = [ + "Alpha", + "DifferentShapeName", + "Gamma", + "GammaPayload", + "HeartbeatEvent", + "LogEvent", + "MetricEvent", + "NotificationEvent", + "PublishEventStream", + "PublishEventStreamLog", + "PublishEventStreamMetric", + "PublishEventStreamUnknown", + "PublishEventsInput", + "PublishEventsOutput", + "ServiceError", + "StreamServiceError", + "SubscribeEventStream", + "SubscribeEventStreamHeartbeat", + "SubscribeEventStreamNotification", + "SubscribeEventStreamUnknown", + "SubscribeToEventsInput", + "SubscribeToEventsOutput", + "ThrottlingEvent", + "TradeEventStreamInput", + "TradeEventStreamOutput", + "TradeEvents", + "TradeEventsAlpha", + "TradeEventsBeta", + "TradeEventsDelta", + "TradeEventsGamma", + "TradeEventsThrottle", + "TradeEventsUnknown", + "Unit", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class Alpha(_SerdeShape): + "Dataclass for Alpha structure." + + id: str | None = ... + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class DifferentShapeName(_SerdeShape): + "Dataclass for DifferentShapeName structure." + + name: str | None = ... + number: int | None = ... + +@dataclass(kw_only=True) +class Gamma(_SerdeShape): + "Dataclass for Gamma structure." + + sequence_number: int | None = ... + payload: GammaPayload | None = ... + +@dataclass(kw_only=True) +class GammaPayload(_SerdeShape): + "Dataclass for GammaPayload structure." + + message: str | None = ... + values: list[int] | None = ... + +@dataclass(kw_only=True) +class HeartbeatEvent(_SerdeShape): + "Dataclass for HeartbeatEvent structure." + + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class LogEvent(_SerdeShape): + "Dataclass for LogEvent structure." + + level: str | None = ... + message: str | None = ... + +@dataclass(kw_only=True) +class MetricEvent(_SerdeShape): + "Dataclass for MetricEvent structure." + + name: str | None = ... + value: float | None = ... + +@dataclass(kw_only=True) +class NotificationEvent(_SerdeShape): + "Dataclass for NotificationEvent structure." + + topic: str | None = ... + payload: str | None = ... + +@dataclass +class PublishEventStreamLog(_SerdeShape): + value: LogEvent + +@dataclass +class PublishEventStreamMetric(_SerdeShape): + value: MetricEvent + +@dataclass +class PublishEventStreamUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +PublishEventStream = ( + PublishEventStreamLog | PublishEventStreamMetric | PublishEventStreamUnknown +) + +class _PublishEventStreamDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> PublishEventStream: ... + +@dataclass(kw_only=True) +class PublishEventsInput(_SerdeShape): + "Dataclass for PublishEventsInput structure." + + channel: str | None = ... + +@dataclass(kw_only=True) +class PublishEventsOutput(_SerdeShape): + "Dataclass for PublishEventsOutput structure." + + event_count: int | None = ... + message: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class StreamServiceError(ServiceError, _SerdeShape): + "Dataclass for StreamServiceError structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass +class SubscribeEventStreamNotification(_SerdeShape): + value: NotificationEvent + +@dataclass +class SubscribeEventStreamHeartbeat(_SerdeShape): + value: HeartbeatEvent + +@dataclass +class SubscribeEventStreamUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +SubscribeEventStream = ( + SubscribeEventStreamNotification + | SubscribeEventStreamHeartbeat + | SubscribeEventStreamUnknown +) + +class _SubscribeEventStreamDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> SubscribeEventStream: ... + +@dataclass(kw_only=True) +class SubscribeToEventsInput(_SerdeShape): + "Dataclass for SubscribeToEventsInput structure." + + channel: str | None = ... + max_events: int | None = ... + +@dataclass(kw_only=True) +class SubscribeToEventsOutput(_SerdeShape): + "Dataclass for SubscribeToEventsOutput structure." + + subscription_id: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ThrottlingEvent(ServiceError, _SerdeShape): + "Dataclass for ThrottlingEvent structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class TradeEventStreamInput(_SerdeShape): + "Dataclass for TradeEventStreamInput structure." + + session_id: str | None = ... + +@dataclass(kw_only=True) +class TradeEventStreamOutput(_SerdeShape): + "Dataclass for TradeEventStreamOutput structure." + + greeting: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass +class TradeEventsAlpha(_SerdeShape): + value: Alpha + +@dataclass +class TradeEventsBeta(_SerdeShape): + value: Unit + +@dataclass +class TradeEventsGamma(_SerdeShape): + value: Gamma + +@dataclass +class TradeEventsDelta(_SerdeShape): + value: DifferentShapeName + +@dataclass +class TradeEventsThrottle(_SerdeShape): + value: ThrottlingEvent + +@dataclass +class TradeEventsUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +TradeEvents = ( + TradeEventsAlpha + | TradeEventsBeta + | TradeEventsGamma + | TradeEventsDelta + | TradeEventsThrottle + | TradeEventsUnknown +) + +class _TradeEventsDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> TradeEvents: ... + +@dataclass(kw_only=True) +class Unit(_SerdeShape): + pass diff --git a/codegen-output-py/my-handwritten-model/src/my_handwritten_model/py.typed b/codegen-output-py/my-handwritten-model/src/my_handwritten_model/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/non-query-compatible-rpcv2-cbor/.smithy-python-manifest.json b/codegen-output-py/non-query-compatible-rpcv2-cbor/.smithy-python-manifest.json new file mode 100644 index 000000000..adab26d6b --- /dev/null +++ b/codegen-output-py/non-query-compatible-rpcv2-cbor/.smithy-python-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "README.md": "0596f3af522471b12c17e5e2cb0f2e42bfeb3a7d910ca77e185f1bd493d12764", + "pyproject.toml": "387175323e3c45838b46b83a0b1190986426e9f6ce6af0512cf8f34f437010a3", + "src/nonquerycompatiblerpcv2cbor/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/nonquerycompatiblerpcv2cbor/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/nonquerycompatiblerpcv2cbor/_private/schemas.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/nonquerycompatiblerpcv2cbor/models.py": "1baf2fd582c07639bd15e8d7162d003c2de4983b562d3b0b4cfc963fea29c89b", + "src/nonquerycompatiblerpcv2cbor/models.pyi": "5baac8c3bf71dc1d6d71297457d046b5b8fbd883273ee0b3ddc3458c0e58220b", + "src/nonquerycompatiblerpcv2cbor/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/non-query-compatible-rpcv2-cbor/README.md b/codegen-output-py/non-query-compatible-rpcv2-cbor/README.md new file mode 100644 index 000000000..4d80124d4 --- /dev/null +++ b/codegen-output-py/non-query-compatible-rpcv2-cbor/README.md @@ -0,0 +1,5 @@ + + +## nonquerycompatiblerpcv2cbor Types Package + +Native Python types for the non-query-compatible-rpcv2-cbor projection diff --git a/codegen-output-py/non-query-compatible-rpcv2-cbor/pyproject.toml b/codegen-output-py/non-query-compatible-rpcv2-cbor/pyproject.toml new file mode 100644 index 000000000..30eea90ad --- /dev/null +++ b/codegen-output-py/non-query-compatible-rpcv2-cbor/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "nonquerycompatiblerpcv2cbor" +version = "0.0.1" +description = "Native Python types for the non-query-compatible-rpcv2-cbor projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "nonquerycompatiblerpcv2cbor"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/nonquerycompatiblerpcv2cbor", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/__init__.py b/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/_private/__init__.py b/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/_private/schemas.py b/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/_private/schemas.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/models.py b/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/models.py new file mode 100644 index 000000000..c3798706f --- /dev/null +++ b/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/models.py @@ -0,0 +1,44 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX: dict[str, str] = {} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset(), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/models.pyi b/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/models.pyi new file mode 100644 index 000000000..6d472bcdd --- /dev/null +++ b/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/models.pyi @@ -0,0 +1,23 @@ +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.exceptions import ModeledError +from smithy_core.serializers import ShapeSerializer + +__all__ = [ + "ServiceError", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ diff --git a/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/py.typed b/codegen-output-py/non-query-compatible-rpcv2-cbor/src/nonquerycompatiblerpcv2cbor/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/partitioned-types/.smithy-python-manifest.json b/codegen-output-py/partitioned-types/.smithy-python-manifest.json new file mode 100644 index 000000000..34e81e6a1 --- /dev/null +++ b/codegen-output-py/partitioned-types/.smithy-python-manifest.json @@ -0,0 +1,18 @@ +{ + "files": { + "README.md": "20221d6b4a6eb9d45105b926f3bf80197e6ed2bdcab748c5f15e9e6e28dd11ec", + "pyproject.toml": "6980c970f57d31dca2a1ef73e2933e1936b3eb7803a5a7dd2116ced729945a03", + "src/partitioned_types/__init__.py": "27ea4bc5ba93a6fc6e1f11e9784565de24e9249f0d3e77a9e2fb64fa47d11012", + "src/partitioned_types/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/partitioned_types/_private/models_0.pyi": "43e2d95e8b75e1a63f4a6d7a60ead524045f688617e6433271a82b9d6eec3b95", + "src/partitioned_types/_private/models_1.pyi": "84d482c80640d546ced883fc90ee028e1a67b0606c956f4bedc4e997c4b34b81", + "src/partitioned_types/_private/schemas.py": "6968c15944aa9c55c1842cfe11c0c0dd88269850ee4d1e7c58a3d22e2ab7222f", + "src/partitioned_types/_private/schemas_0.py": "be67800d8f0a27d41db9ce7b6b34c3b01b19cc0963b6d77821105cecffc6e355", + "src/partitioned_types/_private/schemas_1.py": "c27d7745e33745720f0d175f50fccc4c5755b43a35112634856087eca30b6f3a", + "src/partitioned_types/_private/schemas_2.py": "a25fbc37916761685d7e90171fdde28361ee0f4d24e43dd3a887e26c3f0cc7c3", + "src/partitioned_types/models.py": "8c2b0f2d0a149d87a6213112cc12b8e01bac84f7bf73c91f9d5aba63512fcd30", + "src/partitioned_types/models.pyi": "713c888831f64f57c9430b272844fb8680f8c1f133d8c7792009065791397d9b", + "src/partitioned_types/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/partitioned-types/README.md b/codegen-output-py/partitioned-types/README.md new file mode 100644 index 000000000..7f84586cc --- /dev/null +++ b/codegen-output-py/partitioned-types/README.md @@ -0,0 +1,5 @@ + + +## partitioned_types Types Package + +Native schema and model stub partition stress fixture diff --git a/codegen-output-py/partitioned-types/pyproject.toml b/codegen-output-py/partitioned-types/pyproject.toml new file mode 100644 index 000000000..2f0f55d8a --- /dev/null +++ b/codegen-output-py/partitioned-types/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "partitioned_types" +version = "1.0.0" +description = "Native schema and model stub partition stress fixture" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "partitioned_types"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/partitioned_types", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/partitioned-types/src/partitioned_types/__init__.py b/codegen-output-py/partitioned-types/src/partitioned_types/__init__.py new file mode 100644 index 000000000..3e7d37b5b --- /dev/null +++ b/codegen-output-py/partitioned-types/src/partitioned_types/__init__.py @@ -0,0 +1 @@ +__version__: str = "1.0.0" diff --git a/codegen-output-py/partitioned-types/src/partitioned_types/_private/__init__.py b/codegen-output-py/partitioned-types/src/partitioned_types/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/partitioned-types/src/partitioned_types/_private/models_0.pyi b/codegen-output-py/partitioned-types/src/partitioned_types/_private/models_0.pyi new file mode 100644 index 000000000..d88533529 --- /dev/null +++ b/codegen-output-py/partitioned-types/src/partitioned_types/_private/models_0.pyi @@ -0,0 +1,2578 @@ +from dataclasses import dataclass +from enum import IntEnum, StrEnum + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.documents import Document +from smithy_core.response import ResponseMetadata +from smithy_core.types import UnknownEnumMixin + +from ..models import ( + EventStream as ___models_EventStream, +) +from ..models import ( + EventStreamExample as ___models_EventStreamExample, +) +from ..models import ( + EventStreamUnknown as ___models_EventStreamUnknown, +) +from ..models import ( + ExampleValue as ___models_ExampleValue, +) +from ..models import ( + ExampleValueEmpty as ___models_ExampleValueEmpty, +) +from ..models import ( + ExampleValueNumber as ___models_ExampleValueNumber, +) +from ..models import ( + ExampleValueText as ___models_ExampleValueText, +) +from ..models import ( + ExampleValueUnknown as ___models_ExampleValueUnknown, +) +from ..models import ( + PartitionItem000 as ___models_PartitionItem000, +) +from ..models import ( + PartitionItem001 as ___models_PartitionItem001, +) +from ..models import ( + PartitionItem002 as ___models_PartitionItem002, +) +from ..models import ( + PartitionItem003 as ___models_PartitionItem003, +) +from ..models import ( + PartitionItem004 as ___models_PartitionItem004, +) +from ..models import ( + PartitionItem005 as ___models_PartitionItem005, +) +from ..models import ( + PartitionItem006 as ___models_PartitionItem006, +) +from ..models import ( + PartitionItem007 as ___models_PartitionItem007, +) +from ..models import ( + PartitionItem008 as ___models_PartitionItem008, +) +from ..models import ( + PartitionItem009 as ___models_PartitionItem009, +) +from ..models import ( + PartitionItem010 as ___models_PartitionItem010, +) +from ..models import ( + PartitionItem011 as ___models_PartitionItem011, +) +from ..models import ( + PartitionItem012 as ___models_PartitionItem012, +) +from ..models import ( + PartitionItem013 as ___models_PartitionItem013, +) +from ..models import ( + PartitionItem014 as ___models_PartitionItem014, +) +from ..models import ( + PartitionItem015 as ___models_PartitionItem015, +) +from ..models import ( + PartitionItem016 as ___models_PartitionItem016, +) +from ..models import ( + PartitionItem017 as ___models_PartitionItem017, +) +from ..models import ( + PartitionItem018 as ___models_PartitionItem018, +) +from ..models import ( + PartitionItem019 as ___models_PartitionItem019, +) +from ..models import ( + PartitionItem020 as ___models_PartitionItem020, +) +from ..models import ( + PartitionItem021 as ___models_PartitionItem021, +) +from ..models import ( + PartitionItem022 as ___models_PartitionItem022, +) +from ..models import ( + PartitionItem023 as ___models_PartitionItem023, +) +from ..models import ( + PartitionItem024 as ___models_PartitionItem024, +) +from ..models import ( + PartitionItem025 as ___models_PartitionItem025, +) +from ..models import ( + PartitionItem026 as ___models_PartitionItem026, +) +from ..models import ( + PartitionItem027 as ___models_PartitionItem027, +) +from ..models import ( + PartitionItem028 as ___models_PartitionItem028, +) +from ..models import ( + PartitionItem029 as ___models_PartitionItem029, +) +from ..models import ( + PartitionItem030 as ___models_PartitionItem030, +) +from ..models import ( + PartitionItem031 as ___models_PartitionItem031, +) +from ..models import ( + PartitionItem032 as ___models_PartitionItem032, +) +from ..models import ( + PartitionItem033 as ___models_PartitionItem033, +) +from ..models import ( + PartitionItem034 as ___models_PartitionItem034, +) +from ..models import ( + PartitionItem035 as ___models_PartitionItem035, +) +from ..models import ( + PartitionItem036 as ___models_PartitionItem036, +) +from ..models import ( + PartitionItem037 as ___models_PartitionItem037, +) +from ..models import ( + PartitionItem038 as ___models_PartitionItem038, +) +from ..models import ( + PartitionItem039 as ___models_PartitionItem039, +) +from ..models import ( + PartitionItem040 as ___models_PartitionItem040, +) +from ..models import ( + PartitionItem041 as ___models_PartitionItem041, +) +from ..models import ( + PartitionItem042 as ___models_PartitionItem042, +) +from ..models import ( + PartitionItem043 as ___models_PartitionItem043, +) +from ..models import ( + PartitionItem044 as ___models_PartitionItem044, +) +from ..models import ( + PartitionItem045 as ___models_PartitionItem045, +) +from ..models import ( + PartitionItem046 as ___models_PartitionItem046, +) +from ..models import ( + PartitionItem047 as ___models_PartitionItem047, +) +from ..models import ( + PartitionItem048 as ___models_PartitionItem048, +) +from ..models import ( + PartitionItem049 as ___models_PartitionItem049, +) +from ..models import ( + PartitionItem050 as ___models_PartitionItem050, +) +from ..models import ( + PartitionItem051 as ___models_PartitionItem051, +) +from ..models import ( + PartitionItem052 as ___models_PartitionItem052, +) +from ..models import ( + PartitionItem053 as ___models_PartitionItem053, +) +from ..models import ( + PartitionItem054 as ___models_PartitionItem054, +) +from ..models import ( + PartitionItem055 as ___models_PartitionItem055, +) +from ..models import ( + PartitionItem056 as ___models_PartitionItem056, +) +from ..models import ( + PartitionItem057 as ___models_PartitionItem057, +) +from ..models import ( + PartitionItem058 as ___models_PartitionItem058, +) +from ..models import ( + PartitionItem059 as ___models_PartitionItem059, +) +from ..models import ( + PartitionItem060 as ___models_PartitionItem060, +) +from ..models import ( + PartitionItem061 as ___models_PartitionItem061, +) +from ..models import ( + PartitionItem062 as ___models_PartitionItem062, +) +from ..models import ( + PartitionItem063 as ___models_PartitionItem063, +) +from ..models import ( + PartitionItem064 as ___models_PartitionItem064, +) +from ..models import ( + PartitionItem065 as ___models_PartitionItem065, +) +from ..models import ( + PartitionItem066 as ___models_PartitionItem066, +) +from ..models import ( + PartitionItem067 as ___models_PartitionItem067, +) +from ..models import ( + PartitionItem068 as ___models_PartitionItem068, +) +from ..models import ( + PartitionItem069 as ___models_PartitionItem069, +) +from ..models import ( + PartitionItem070 as ___models_PartitionItem070, +) +from ..models import ( + PartitionItem071 as ___models_PartitionItem071, +) +from ..models import ( + PartitionItem072 as ___models_PartitionItem072, +) +from ..models import ( + PartitionItem073 as ___models_PartitionItem073, +) +from ..models import ( + PartitionItem074 as ___models_PartitionItem074, +) +from ..models import ( + PartitionItem075 as ___models_PartitionItem075, +) +from ..models import ( + PartitionItem076 as ___models_PartitionItem076, +) +from ..models import ( + PartitionItem077 as ___models_PartitionItem077, +) +from ..models import ( + PartitionItem078 as ___models_PartitionItem078, +) +from ..models import ( + PartitionItem079 as ___models_PartitionItem079, +) +from ..models import ( + PartitionItem080 as ___models_PartitionItem080, +) +from ..models import ( + PartitionItem081 as ___models_PartitionItem081, +) +from ..models import ( + PartitionItem082 as ___models_PartitionItem082, +) +from ..models import ( + PartitionItem083 as ___models_PartitionItem083, +) +from ..models import ( + PartitionItem084 as ___models_PartitionItem084, +) +from ..models import ( + PartitionItem085 as ___models_PartitionItem085, +) +from ..models import ( + PartitionItem086 as ___models_PartitionItem086, +) +from ..models import ( + PartitionItem087 as ___models_PartitionItem087, +) +from ..models import ( + PartitionItem088 as ___models_PartitionItem088, +) +from ..models import ( + PartitionItem089 as ___models_PartitionItem089, +) +from ..models import ( + PartitionItem090 as ___models_PartitionItem090, +) +from ..models import ( + PartitionItem091 as ___models_PartitionItem091, +) +from ..models import ( + PartitionItem092 as ___models_PartitionItem092, +) +from ..models import ( + PartitionItem093 as ___models_PartitionItem093, +) +from ..models import ( + PartitionItem094 as ___models_PartitionItem094, +) +from ..models import ( + PartitionItem095 as ___models_PartitionItem095, +) +from ..models import ( + PartitionItem096 as ___models_PartitionItem096, +) +from ..models import ( + PartitionItem097 as ___models_PartitionItem097, +) +from ..models import ( + PartitionItem098 as ___models_PartitionItem098, +) +from ..models import ( + PartitionItem099 as ___models_PartitionItem099, +) +from ..models import ( + PartitionItem100 as ___models_PartitionItem100, +) +from ..models import ( + PartitionItem101 as ___models_PartitionItem101, +) +from ..models import ( + PartitionItem102 as ___models_PartitionItem102, +) +from ..models import ( + PartitionItem103 as ___models_PartitionItem103, +) +from ..models import ( + PartitionItem104 as ___models_PartitionItem104, +) +from ..models import ( + PartitionItem105 as ___models_PartitionItem105, +) +from ..models import ( + PartitionItem106 as ___models_PartitionItem106, +) +from ..models import ( + PartitionItem107 as ___models_PartitionItem107, +) +from ..models import ( + PartitionItem108 as ___models_PartitionItem108, +) +from ..models import ( + PartitionItem109 as ___models_PartitionItem109, +) +from ..models import ( + PartitionItem110 as ___models_PartitionItem110, +) +from ..models import ( + PartitionItem111 as ___models_PartitionItem111, +) +from ..models import ( + PartitionItem112 as ___models_PartitionItem112, +) +from ..models import ( + PartitionItem113 as ___models_PartitionItem113, +) +from ..models import ( + PartitionItem114 as ___models_PartitionItem114, +) +from ..models import ( + PartitionItem115 as ___models_PartitionItem115, +) +from ..models import ( + PartitionItem116 as ___models_PartitionItem116, +) +from ..models import ( + PartitionItem117 as ___models_PartitionItem117, +) +from ..models import ( + PartitionItem118 as ___models_PartitionItem118, +) +from ..models import ( + PartitionItem119 as ___models_PartitionItem119, +) +from ..models import ( + PartitionItem120 as ___models_PartitionItem120, +) +from ..models import ( + PartitionItem121 as ___models_PartitionItem121, +) +from ..models import ( + PartitionItem122 as ___models_PartitionItem122, +) +from ..models import ( + PartitionItem123 as ___models_PartitionItem123, +) +from ..models import ( + PartitionItem124 as ___models_PartitionItem124, +) +from ..models import ( + PartitionItem125 as ___models_PartitionItem125, +) +from ..models import ( + PartitionItem126 as ___models_PartitionItem126, +) +from ..models import ( + PartitionItem127 as ___models_PartitionItem127, +) +from ..models import ( + PartitionItem128 as ___models_PartitionItem128, +) +from ..models import ( + PartitionItem129 as ___models_PartitionItem129, +) +from ..models import ( + PartitionItem130 as ___models_PartitionItem130, +) +from ..models import ( + PartitionItem131 as ___models_PartitionItem131, +) +from ..models import ( + PartitionItem132 as ___models_PartitionItem132, +) +from ..models import ( + PartitionItem133 as ___models_PartitionItem133, +) +from ..models import ( + PartitionItem134 as ___models_PartitionItem134, +) +from ..models import ( + PartitionItem135 as ___models_PartitionItem135, +) +from ..models import ( + PartitionItem136 as ___models_PartitionItem136, +) +from ..models import ( + PartitionItem137 as ___models_PartitionItem137, +) +from ..models import ( + PartitionItem138 as ___models_PartitionItem138, +) +from ..models import ( + PartitionItem139 as ___models_PartitionItem139, +) +from ..models import ( + PartitionItem140 as ___models_PartitionItem140, +) +from ..models import ( + PartitionItem141 as ___models_PartitionItem141, +) +from ..models import ( + PartitionItem142 as ___models_PartitionItem142, +) +from ..models import ( + PartitionItem143 as ___models_PartitionItem143, +) +from ..models import ( + PartitionItem144 as ___models_PartitionItem144, +) +from ..models import ( + PartitionItem145 as ___models_PartitionItem145, +) +from ..models import ( + PartitionItem146 as ___models_PartitionItem146, +) +from ..models import ( + PartitionItem147 as ___models_PartitionItem147, +) +from ..models import ( + PartitionItem148 as ___models_PartitionItem148, +) +from ..models import ( + PartitionItem149 as ___models_PartitionItem149, +) +from ..models import ( + PartitionItem150 as ___models_PartitionItem150, +) +from ..models import ( + PartitionItem151 as ___models_PartitionItem151, +) +from ..models import ( + PartitionItem152 as ___models_PartitionItem152, +) +from ..models import ( + PartitionItem153 as ___models_PartitionItem153, +) +from ..models import ( + PartitionItem154 as ___models_PartitionItem154, +) +from ..models import ( + PartitionItem155 as ___models_PartitionItem155, +) +from ..models import ( + PartitionItem156 as ___models_PartitionItem156, +) +from ..models import ( + PartitionItem157 as ___models_PartitionItem157, +) +from ..models import ( + PartitionItem158 as ___models_PartitionItem158, +) +from ..models import ( + PartitionItem159 as ___models_PartitionItem159, +) +from ..models import ( + PartitionItem160 as ___models_PartitionItem160, +) +from ..models import ( + PartitionItem161 as ___models_PartitionItem161, +) +from ..models import ( + PartitionItem162 as ___models_PartitionItem162, +) +from ..models import ( + PartitionItem163 as ___models_PartitionItem163, +) +from ..models import ( + PartitionItem164 as ___models_PartitionItem164, +) +from ..models import ( + PartitionItem165 as ___models_PartitionItem165, +) +from ..models import ( + PartitionItem166 as ___models_PartitionItem166, +) +from ..models import ( + PartitionItem167 as ___models_PartitionItem167, +) +from ..models import ( + PartitionItem168 as ___models_PartitionItem168, +) +from ..models import ( + PartitionItem169 as ___models_PartitionItem169, +) +from ..models import ( + PartitionItem170 as ___models_PartitionItem170, +) +from ..models import ( + PartitionItem171 as ___models_PartitionItem171, +) +from ..models import ( + PartitionItem172 as ___models_PartitionItem172, +) +from ..models import ( + PartitionItem173 as ___models_PartitionItem173, +) +from ..models import ( + PartitionItem174 as ___models_PartitionItem174, +) +from ..models import ( + PartitionItem175 as ___models_PartitionItem175, +) +from ..models import ( + PartitionItem176 as ___models_PartitionItem176, +) +from ..models import ( + PartitionItem177 as ___models_PartitionItem177, +) +from ..models import ( + PartitionItem178 as ___models_PartitionItem178, +) +from ..models import ( + PartitionItem179 as ___models_PartitionItem179, +) +from ..models import ( + PartitionItem180 as ___models_PartitionItem180, +) +from ..models import ( + PartitionItem181 as ___models_PartitionItem181, +) +from ..models import ( + PartitionItem182 as ___models_PartitionItem182, +) +from ..models import ( + PartitionItem183 as ___models_PartitionItem183, +) +from ..models import ( + PartitionItem184 as ___models_PartitionItem184, +) +from ..models import ( + PartitionItem185 as ___models_PartitionItem185, +) +from ..models import ( + PartitionItem186 as ___models_PartitionItem186, +) +from ..models import ( + PartitionItem187 as ___models_PartitionItem187, +) +from ..models import ( + PartitionItem188 as ___models_PartitionItem188, +) +from ..models import ( + PartitionItem189 as ___models_PartitionItem189, +) +from ..models import ( + PartitionItem190 as ___models_PartitionItem190, +) +from ..models import ( + PartitionItem191 as ___models_PartitionItem191, +) +from ..models import ( + PartitionItem192 as ___models_PartitionItem192, +) +from ..models import ( + PartitionItem193 as ___models_PartitionItem193, +) +from ..models import ( + PartitionItem194 as ___models_PartitionItem194, +) +from ..models import ( + PartitionItem195 as ___models_PartitionItem195, +) +from ..models import ( + PartitionItem196 as ___models_PartitionItem196, +) +from ..models import ( + PartitionItem197 as ___models_PartitionItem197, +) +from ..models import ( + PartitionItem198 as ___models_PartitionItem198, +) +from ..models import ( + PartitionItem199 as ___models_PartitionItem199, +) +from ..models import ( + PartitionItem200 as ___models_PartitionItem200, +) +from ..models import ( + PartitionItem201 as ___models_PartitionItem201, +) +from ..models import ( + PartitionItem202 as ___models_PartitionItem202, +) +from ..models import ( + PartitionItem203 as ___models_PartitionItem203, +) +from ..models import ( + PartitionItem204 as ___models_PartitionItem204, +) +from ..models import ( + PartitionItem205 as ___models_PartitionItem205, +) +from ..models import ( + PartitionItem206 as ___models_PartitionItem206, +) +from ..models import ( + PartitionItem207 as ___models_PartitionItem207, +) +from ..models import ( + PartitionItem208 as ___models_PartitionItem208, +) +from ..models import ( + PartitionItem209 as ___models_PartitionItem209, +) +from ..models import ( + PartitionItem210 as ___models_PartitionItem210, +) +from ..models import ( + PartitionItem211 as ___models_PartitionItem211, +) +from ..models import ( + PartitionItem212 as ___models_PartitionItem212, +) +from ..models import ( + PartitionItem213 as ___models_PartitionItem213, +) +from ..models import ( + PartitionItem214 as ___models_PartitionItem214, +) +from ..models import ( + PartitionItem215 as ___models_PartitionItem215, +) +from ..models import ( + PartitionItem216 as ___models_PartitionItem216, +) +from ..models import ( + PartitionItem217 as ___models_PartitionItem217, +) +from ..models import ( + PartitionItem218 as ___models_PartitionItem218, +) +from ..models import ( + PartitionItem219 as ___models_PartitionItem219, +) +from ..models import ( + PartitionItem220 as ___models_PartitionItem220, +) +from ..models import ( + PartitionItem221 as ___models_PartitionItem221, +) +from ..models import ( + PartitionItem222 as ___models_PartitionItem222, +) +from ..models import ( + PartitionItem223 as ___models_PartitionItem223, +) +from ..models import ( + PartitionItem224 as ___models_PartitionItem224, +) +from ..models import ( + PartitionItem225 as ___models_PartitionItem225, +) +from ..models import ( + PartitionItem226 as ___models_PartitionItem226, +) +from ..models import ( + PartitionItem227 as ___models_PartitionItem227, +) +from ..models import ( + PartitionItem228 as ___models_PartitionItem228, +) +from ..models import ( + PartitionItem229 as ___models_PartitionItem229, +) +from ..models import ( + PartitionItem230 as ___models_PartitionItem230, +) +from ..models import ( + PartitionItem231 as ___models_PartitionItem231, +) +from ..models import ( + PartitionItem232 as ___models_PartitionItem232, +) +from ..models import ( + PartitionItem233 as ___models_PartitionItem233, +) +from ..models import ( + PartitionItem234 as ___models_PartitionItem234, +) +from ..models import ( + PartitionItem235 as ___models_PartitionItem235, +) +from ..models import ( + PartitionItem236 as ___models_PartitionItem236, +) +from ..models import ( + PartitionItem237 as ___models_PartitionItem237, +) +from ..models import ( + PartitionItem238 as ___models_PartitionItem238, +) +from ..models import ( + PartitionItem239 as ___models_PartitionItem239, +) +from ..models import ( + PartitionItem240 as ___models_PartitionItem240, +) +from ..models import ( + PartitionItem241 as ___models_PartitionItem241, +) +from ..models import ( + PartitionItem242, + ServiceError, + Unit, + _SerdeShape, # pyright: ignore[reportPrivateUsage] +) +from ..models import ( + RenamedExample as ___models_RenamedExample, +) + +@dataclass(kw_only=True) +class GetExampleInput(_SerdeShape): + "Input for retrieving an example." + + id: str | None = ... + partitioned: ___models_PartitionItem000 | None = ... + +@dataclass(kw_only=True) +class GetExampleOutput(_SerdeShape): + "Dataclass for GetExampleOutput structure." + + example: ___models_RenamedExample | None = ... + value: ___models_ExampleValue | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ExampleError(ServiceError, _SerdeShape): + "An example modeled error." + + retry_after_seconds: int | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class RenamedExample(_SerdeShape): + "A representative generated structure." + + name: str + "The example name." + count: int | None = ... + tags: list[str] | None = ... + attributes: dict[str, Document] | None = ... + choice: ___models_ExampleValue | None = ... + status: str | None = ... + code: int | None = ... + +@dataclass +class ExampleValueText(_SerdeShape): + value: str + +@dataclass +class ExampleValueNumber(_SerdeShape): + value: int + +@dataclass +class ExampleValueEmpty(_SerdeShape): + value: Unit + +@dataclass +class ExampleValueUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +ExampleValue = ( + ___models_ExampleValueText + | ___models_ExampleValueNumber + | ___models_ExampleValueEmpty + | ___models_ExampleValueUnknown +) +"A representative generated union." + +class _ExampleValueDeserializer: + def deserialize( + self, deserializer: ShapeDeserializer + ) -> ___models_ExampleValue: ... + +@dataclass +class EventStreamExample(_SerdeShape): + value: ___models_RenamedExample + +@dataclass +class EventStreamUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +EventStream = ___models_EventStreamExample | ___models_EventStreamUnknown + +class _EventStreamDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> ___models_EventStream: ... + +class Status(UnknownEnumMixin, StrEnum): + ACTIVE = "active" + INACTIVE = "inactive" + +class Code(UnknownEnumMixin, IntEnum): + OK = 200 + NOT_FOUND = 404 + +@dataclass(kw_only=True) +class PartitionItem000(_SerdeShape): + "Dataclass for PartitionItem000 structure." + + value: str | None = ... + next: ___models_PartitionItem001 | None = ... + +@dataclass(kw_only=True) +class PartitionItem001(_SerdeShape): + "Dataclass for PartitionItem001 structure." + + value: str | None = ... + next: ___models_PartitionItem002 | None = ... + +@dataclass(kw_only=True) +class PartitionItem002(_SerdeShape): + "Dataclass for PartitionItem002 structure." + + value: str | None = ... + next: ___models_PartitionItem003 | None = ... + +@dataclass(kw_only=True) +class PartitionItem003(_SerdeShape): + "Dataclass for PartitionItem003 structure." + + value: str | None = ... + next: ___models_PartitionItem004 | None = ... + +@dataclass(kw_only=True) +class PartitionItem004(_SerdeShape): + "Dataclass for PartitionItem004 structure." + + value: str | None = ... + next: ___models_PartitionItem005 | None = ... + +@dataclass(kw_only=True) +class PartitionItem005(_SerdeShape): + "Dataclass for PartitionItem005 structure." + + value: str | None = ... + next: ___models_PartitionItem006 | None = ... + +@dataclass(kw_only=True) +class PartitionItem006(_SerdeShape): + "Dataclass for PartitionItem006 structure." + + value: str | None = ... + next: ___models_PartitionItem007 | None = ... + +@dataclass(kw_only=True) +class PartitionItem007(_SerdeShape): + "Dataclass for PartitionItem007 structure." + + value: str | None = ... + next: ___models_PartitionItem008 | None = ... + +@dataclass(kw_only=True) +class PartitionItem008(_SerdeShape): + "Dataclass for PartitionItem008 structure." + + value: str | None = ... + next: ___models_PartitionItem009 | None = ... + +@dataclass(kw_only=True) +class PartitionItem009(_SerdeShape): + "Dataclass for PartitionItem009 structure." + + value: str | None = ... + next: ___models_PartitionItem010 | None = ... + +@dataclass(kw_only=True) +class PartitionItem010(_SerdeShape): + "Dataclass for PartitionItem010 structure." + + value: str | None = ... + next: ___models_PartitionItem011 | None = ... + +@dataclass(kw_only=True) +class PartitionItem011(_SerdeShape): + "Dataclass for PartitionItem011 structure." + + value: str | None = ... + next: ___models_PartitionItem012 | None = ... + +@dataclass(kw_only=True) +class PartitionItem012(_SerdeShape): + "Dataclass for PartitionItem012 structure." + + value: str | None = ... + next: ___models_PartitionItem013 | None = ... + +@dataclass(kw_only=True) +class PartitionItem013(_SerdeShape): + "Dataclass for PartitionItem013 structure." + + value: str | None = ... + next: ___models_PartitionItem014 | None = ... + +@dataclass(kw_only=True) +class PartitionItem014(_SerdeShape): + "Dataclass for PartitionItem014 structure." + + value: str | None = ... + next: ___models_PartitionItem015 | None = ... + +@dataclass(kw_only=True) +class PartitionItem015(_SerdeShape): + "Dataclass for PartitionItem015 structure." + + value: str | None = ... + next: ___models_PartitionItem016 | None = ... + +@dataclass(kw_only=True) +class PartitionItem016(_SerdeShape): + "Dataclass for PartitionItem016 structure." + + value: str | None = ... + next: ___models_PartitionItem017 | None = ... + +@dataclass(kw_only=True) +class PartitionItem017(_SerdeShape): + "Dataclass for PartitionItem017 structure." + + value: str | None = ... + next: ___models_PartitionItem018 | None = ... + +@dataclass(kw_only=True) +class PartitionItem018(_SerdeShape): + "Dataclass for PartitionItem018 structure." + + value: str | None = ... + next: ___models_PartitionItem019 | None = ... + +@dataclass(kw_only=True) +class PartitionItem019(_SerdeShape): + "Dataclass for PartitionItem019 structure." + + value: str | None = ... + next: ___models_PartitionItem020 | None = ... + +@dataclass(kw_only=True) +class PartitionItem020(_SerdeShape): + "Dataclass for PartitionItem020 structure." + + value: str | None = ... + next: ___models_PartitionItem021 | None = ... + +@dataclass(kw_only=True) +class PartitionItem021(_SerdeShape): + "Dataclass for PartitionItem021 structure." + + value: str | None = ... + next: ___models_PartitionItem022 | None = ... + +@dataclass(kw_only=True) +class PartitionItem022(_SerdeShape): + "Dataclass for PartitionItem022 structure." + + value: str | None = ... + next: ___models_PartitionItem023 | None = ... + +@dataclass(kw_only=True) +class PartitionItem023(_SerdeShape): + "Dataclass for PartitionItem023 structure." + + value: str | None = ... + next: ___models_PartitionItem024 | None = ... + +@dataclass(kw_only=True) +class PartitionItem024(_SerdeShape): + "Dataclass for PartitionItem024 structure." + + value: str | None = ... + next: ___models_PartitionItem025 | None = ... + +@dataclass(kw_only=True) +class PartitionItem025(_SerdeShape): + "Dataclass for PartitionItem025 structure." + + value: str | None = ... + next: ___models_PartitionItem026 | None = ... + +@dataclass(kw_only=True) +class PartitionItem026(_SerdeShape): + "Dataclass for PartitionItem026 structure." + + value: str | None = ... + next: ___models_PartitionItem027 | None = ... + +@dataclass(kw_only=True) +class PartitionItem027(_SerdeShape): + "Dataclass for PartitionItem027 structure." + + value: str | None = ... + next: ___models_PartitionItem028 | None = ... + +@dataclass(kw_only=True) +class PartitionItem028(_SerdeShape): + "Dataclass for PartitionItem028 structure." + + value: str | None = ... + next: ___models_PartitionItem029 | None = ... + +@dataclass(kw_only=True) +class PartitionItem029(_SerdeShape): + "Dataclass for PartitionItem029 structure." + + value: str | None = ... + next: ___models_PartitionItem030 | None = ... + +@dataclass(kw_only=True) +class PartitionItem030(_SerdeShape): + "Dataclass for PartitionItem030 structure." + + value: str | None = ... + next: ___models_PartitionItem031 | None = ... + +@dataclass(kw_only=True) +class PartitionItem031(_SerdeShape): + "Dataclass for PartitionItem031 structure." + + value: str | None = ... + next: ___models_PartitionItem032 | None = ... + +@dataclass(kw_only=True) +class PartitionItem032(_SerdeShape): + "Dataclass for PartitionItem032 structure." + + value: str | None = ... + next: ___models_PartitionItem033 | None = ... + +@dataclass(kw_only=True) +class PartitionItem033(_SerdeShape): + "Dataclass for PartitionItem033 structure." + + value: str | None = ... + next: ___models_PartitionItem034 | None = ... + +@dataclass(kw_only=True) +class PartitionItem034(_SerdeShape): + "Dataclass for PartitionItem034 structure." + + value: str | None = ... + next: ___models_PartitionItem035 | None = ... + +@dataclass(kw_only=True) +class PartitionItem035(_SerdeShape): + "Dataclass for PartitionItem035 structure." + + value: str | None = ... + next: ___models_PartitionItem036 | None = ... + +@dataclass(kw_only=True) +class PartitionItem036(_SerdeShape): + "Dataclass for PartitionItem036 structure." + + value: str | None = ... + next: ___models_PartitionItem037 | None = ... + +@dataclass(kw_only=True) +class PartitionItem037(_SerdeShape): + "Dataclass for PartitionItem037 structure." + + value: str | None = ... + next: ___models_PartitionItem038 | None = ... + +@dataclass(kw_only=True) +class PartitionItem038(_SerdeShape): + "Dataclass for PartitionItem038 structure." + + value: str | None = ... + next: ___models_PartitionItem039 | None = ... + +@dataclass(kw_only=True) +class PartitionItem039(_SerdeShape): + "Dataclass for PartitionItem039 structure." + + value: str | None = ... + next: ___models_PartitionItem040 | None = ... + +@dataclass(kw_only=True) +class PartitionItem040(_SerdeShape): + "Dataclass for PartitionItem040 structure." + + value: str | None = ... + next: ___models_PartitionItem041 | None = ... + +@dataclass(kw_only=True) +class PartitionItem041(_SerdeShape): + "Dataclass for PartitionItem041 structure." + + value: str | None = ... + next: ___models_PartitionItem042 | None = ... + +@dataclass(kw_only=True) +class PartitionItem042(_SerdeShape): + "Dataclass for PartitionItem042 structure." + + value: str | None = ... + next: ___models_PartitionItem043 | None = ... + +@dataclass(kw_only=True) +class PartitionItem043(_SerdeShape): + "Dataclass for PartitionItem043 structure." + + value: str | None = ... + next: ___models_PartitionItem044 | None = ... + +@dataclass(kw_only=True) +class PartitionItem044(_SerdeShape): + "Dataclass for PartitionItem044 structure." + + value: str | None = ... + next: ___models_PartitionItem045 | None = ... + +@dataclass(kw_only=True) +class PartitionItem045(_SerdeShape): + "Dataclass for PartitionItem045 structure." + + value: str | None = ... + next: ___models_PartitionItem046 | None = ... + +@dataclass(kw_only=True) +class PartitionItem046(_SerdeShape): + "Dataclass for PartitionItem046 structure." + + value: str | None = ... + next: ___models_PartitionItem047 | None = ... + +@dataclass(kw_only=True) +class PartitionItem047(_SerdeShape): + "Dataclass for PartitionItem047 structure." + + value: str | None = ... + next: ___models_PartitionItem048 | None = ... + +@dataclass(kw_only=True) +class PartitionItem048(_SerdeShape): + "Dataclass for PartitionItem048 structure." + + value: str | None = ... + next: ___models_PartitionItem049 | None = ... + +@dataclass(kw_only=True) +class PartitionItem049(_SerdeShape): + "Dataclass for PartitionItem049 structure." + + value: str | None = ... + next: ___models_PartitionItem050 | None = ... + +@dataclass(kw_only=True) +class PartitionItem050(_SerdeShape): + "Dataclass for PartitionItem050 structure." + + value: str | None = ... + next: ___models_PartitionItem051 | None = ... + +@dataclass(kw_only=True) +class PartitionItem051(_SerdeShape): + "Dataclass for PartitionItem051 structure." + + value: str | None = ... + next: ___models_PartitionItem052 | None = ... + +@dataclass(kw_only=True) +class PartitionItem052(_SerdeShape): + "Dataclass for PartitionItem052 structure." + + value: str | None = ... + next: ___models_PartitionItem053 | None = ... + +@dataclass(kw_only=True) +class PartitionItem053(_SerdeShape): + "Dataclass for PartitionItem053 structure." + + value: str | None = ... + next: ___models_PartitionItem054 | None = ... + +@dataclass(kw_only=True) +class PartitionItem054(_SerdeShape): + "Dataclass for PartitionItem054 structure." + + value: str | None = ... + next: ___models_PartitionItem055 | None = ... + +@dataclass(kw_only=True) +class PartitionItem055(_SerdeShape): + "Dataclass for PartitionItem055 structure." + + value: str | None = ... + next: ___models_PartitionItem056 | None = ... + +@dataclass(kw_only=True) +class PartitionItem056(_SerdeShape): + "Dataclass for PartitionItem056 structure." + + value: str | None = ... + next: ___models_PartitionItem057 | None = ... + +@dataclass(kw_only=True) +class PartitionItem057(_SerdeShape): + "Dataclass for PartitionItem057 structure." + + value: str | None = ... + next: ___models_PartitionItem058 | None = ... + +@dataclass(kw_only=True) +class PartitionItem058(_SerdeShape): + "Dataclass for PartitionItem058 structure." + + value: str | None = ... + next: ___models_PartitionItem059 | None = ... + +@dataclass(kw_only=True) +class PartitionItem059(_SerdeShape): + "Dataclass for PartitionItem059 structure." + + value: str | None = ... + next: ___models_PartitionItem060 | None = ... + +@dataclass(kw_only=True) +class PartitionItem060(_SerdeShape): + "Dataclass for PartitionItem060 structure." + + value: str | None = ... + next: ___models_PartitionItem061 | None = ... + +@dataclass(kw_only=True) +class PartitionItem061(_SerdeShape): + "Dataclass for PartitionItem061 structure." + + value: str | None = ... + next: ___models_PartitionItem062 | None = ... + +@dataclass(kw_only=True) +class PartitionItem062(_SerdeShape): + "Dataclass for PartitionItem062 structure." + + value: str | None = ... + next: ___models_PartitionItem063 | None = ... + +@dataclass(kw_only=True) +class PartitionItem063(_SerdeShape): + "Dataclass for PartitionItem063 structure." + + value: str | None = ... + next: ___models_PartitionItem064 | None = ... + +@dataclass(kw_only=True) +class PartitionItem064(_SerdeShape): + "Dataclass for PartitionItem064 structure." + + value: str | None = ... + next: ___models_PartitionItem065 | None = ... + +@dataclass(kw_only=True) +class PartitionItem065(_SerdeShape): + "Dataclass for PartitionItem065 structure." + + value: str | None = ... + next: ___models_PartitionItem066 | None = ... + +@dataclass(kw_only=True) +class PartitionItem066(_SerdeShape): + "Dataclass for PartitionItem066 structure." + + value: str | None = ... + next: ___models_PartitionItem067 | None = ... + +@dataclass(kw_only=True) +class PartitionItem067(_SerdeShape): + "Dataclass for PartitionItem067 structure." + + value: str | None = ... + next: ___models_PartitionItem068 | None = ... + +@dataclass(kw_only=True) +class PartitionItem068(_SerdeShape): + "Dataclass for PartitionItem068 structure." + + value: str | None = ... + next: ___models_PartitionItem069 | None = ... + +@dataclass(kw_only=True) +class PartitionItem069(_SerdeShape): + "Dataclass for PartitionItem069 structure." + + value: str | None = ... + next: ___models_PartitionItem070 | None = ... + +@dataclass(kw_only=True) +class PartitionItem070(_SerdeShape): + "Dataclass for PartitionItem070 structure." + + value: str | None = ... + next: ___models_PartitionItem071 | None = ... + +@dataclass(kw_only=True) +class PartitionItem071(_SerdeShape): + "Dataclass for PartitionItem071 structure." + + value: str | None = ... + next: ___models_PartitionItem072 | None = ... + +@dataclass(kw_only=True) +class PartitionItem072(_SerdeShape): + "Dataclass for PartitionItem072 structure." + + value: str | None = ... + next: ___models_PartitionItem073 | None = ... + +@dataclass(kw_only=True) +class PartitionItem073(_SerdeShape): + "Dataclass for PartitionItem073 structure." + + value: str | None = ... + next: ___models_PartitionItem074 | None = ... + +@dataclass(kw_only=True) +class PartitionItem074(_SerdeShape): + "Dataclass for PartitionItem074 structure." + + value: str | None = ... + next: ___models_PartitionItem075 | None = ... + +@dataclass(kw_only=True) +class PartitionItem075(_SerdeShape): + "Dataclass for PartitionItem075 structure." + + value: str | None = ... + next: ___models_PartitionItem076 | None = ... + +@dataclass(kw_only=True) +class PartitionItem076(_SerdeShape): + "Dataclass for PartitionItem076 structure." + + value: str | None = ... + next: ___models_PartitionItem077 | None = ... + +@dataclass(kw_only=True) +class PartitionItem077(_SerdeShape): + "Dataclass for PartitionItem077 structure." + + value: str | None = ... + next: ___models_PartitionItem078 | None = ... + +@dataclass(kw_only=True) +class PartitionItem078(_SerdeShape): + "Dataclass for PartitionItem078 structure." + + value: str | None = ... + next: ___models_PartitionItem079 | None = ... + +@dataclass(kw_only=True) +class PartitionItem079(_SerdeShape): + "Dataclass for PartitionItem079 structure." + + value: str | None = ... + next: ___models_PartitionItem080 | None = ... + +@dataclass(kw_only=True) +class PartitionItem080(_SerdeShape): + "Dataclass for PartitionItem080 structure." + + value: str | None = ... + next: ___models_PartitionItem081 | None = ... + +@dataclass(kw_only=True) +class PartitionItem081(_SerdeShape): + "Dataclass for PartitionItem081 structure." + + value: str | None = ... + next: ___models_PartitionItem082 | None = ... + +@dataclass(kw_only=True) +class PartitionItem082(_SerdeShape): + "Dataclass for PartitionItem082 structure." + + value: str | None = ... + next: ___models_PartitionItem083 | None = ... + +@dataclass(kw_only=True) +class PartitionItem083(_SerdeShape): + "Dataclass for PartitionItem083 structure." + + value: str | None = ... + next: ___models_PartitionItem084 | None = ... + +@dataclass(kw_only=True) +class PartitionItem084(_SerdeShape): + "Dataclass for PartitionItem084 structure." + + value: str | None = ... + next: ___models_PartitionItem085 | None = ... + +@dataclass(kw_only=True) +class PartitionItem085(_SerdeShape): + "Dataclass for PartitionItem085 structure." + + value: str | None = ... + next: ___models_PartitionItem086 | None = ... + +@dataclass(kw_only=True) +class PartitionItem086(_SerdeShape): + "Dataclass for PartitionItem086 structure." + + value: str | None = ... + next: ___models_PartitionItem087 | None = ... + +@dataclass(kw_only=True) +class PartitionItem087(_SerdeShape): + "Dataclass for PartitionItem087 structure." + + value: str | None = ... + next: ___models_PartitionItem088 | None = ... + +@dataclass(kw_only=True) +class PartitionItem088(_SerdeShape): + "Dataclass for PartitionItem088 structure." + + value: str | None = ... + next: ___models_PartitionItem089 | None = ... + +@dataclass(kw_only=True) +class PartitionItem089(_SerdeShape): + "Dataclass for PartitionItem089 structure." + + value: str | None = ... + next: ___models_PartitionItem090 | None = ... + +@dataclass(kw_only=True) +class PartitionItem090(_SerdeShape): + "Dataclass for PartitionItem090 structure." + + value: str | None = ... + next: ___models_PartitionItem091 | None = ... + +@dataclass(kw_only=True) +class PartitionItem091(_SerdeShape): + "Dataclass for PartitionItem091 structure." + + value: str | None = ... + next: ___models_PartitionItem092 | None = ... + +@dataclass(kw_only=True) +class PartitionItem092(_SerdeShape): + "Dataclass for PartitionItem092 structure." + + value: str | None = ... + next: ___models_PartitionItem093 | None = ... + +@dataclass(kw_only=True) +class PartitionItem093(_SerdeShape): + "Dataclass for PartitionItem093 structure." + + value: str | None = ... + next: ___models_PartitionItem094 | None = ... + +@dataclass(kw_only=True) +class PartitionItem094(_SerdeShape): + "Dataclass for PartitionItem094 structure." + + value: str | None = ... + next: ___models_PartitionItem095 | None = ... + +@dataclass(kw_only=True) +class PartitionItem095(_SerdeShape): + "Dataclass for PartitionItem095 structure." + + value: str | None = ... + next: ___models_PartitionItem096 | None = ... + +@dataclass(kw_only=True) +class PartitionItem096(_SerdeShape): + "Dataclass for PartitionItem096 structure." + + value: str | None = ... + next: ___models_PartitionItem097 | None = ... + +@dataclass(kw_only=True) +class PartitionItem097(_SerdeShape): + "Dataclass for PartitionItem097 structure." + + value: str | None = ... + next: ___models_PartitionItem098 | None = ... + +@dataclass(kw_only=True) +class PartitionItem098(_SerdeShape): + "Dataclass for PartitionItem098 structure." + + value: str | None = ... + next: ___models_PartitionItem099 | None = ... + +@dataclass(kw_only=True) +class PartitionItem099(_SerdeShape): + "Dataclass for PartitionItem099 structure." + + value: str | None = ... + next: ___models_PartitionItem100 | None = ... + +@dataclass(kw_only=True) +class PartitionItem100(_SerdeShape): + "Dataclass for PartitionItem100 structure." + + value: str | None = ... + next: ___models_PartitionItem101 | None = ... + +@dataclass(kw_only=True) +class PartitionItem101(_SerdeShape): + "Dataclass for PartitionItem101 structure." + + value: str | None = ... + next: ___models_PartitionItem102 | None = ... + +@dataclass(kw_only=True) +class PartitionItem102(_SerdeShape): + "Dataclass for PartitionItem102 structure." + + value: str | None = ... + next: ___models_PartitionItem103 | None = ... + +@dataclass(kw_only=True) +class PartitionItem103(_SerdeShape): + "Dataclass for PartitionItem103 structure." + + value: str | None = ... + next: ___models_PartitionItem104 | None = ... + +@dataclass(kw_only=True) +class PartitionItem104(_SerdeShape): + "Dataclass for PartitionItem104 structure." + + value: str | None = ... + next: ___models_PartitionItem105 | None = ... + +@dataclass(kw_only=True) +class PartitionItem105(_SerdeShape): + "Dataclass for PartitionItem105 structure." + + value: str | None = ... + next: ___models_PartitionItem106 | None = ... + +@dataclass(kw_only=True) +class PartitionItem106(_SerdeShape): + "Dataclass for PartitionItem106 structure." + + value: str | None = ... + next: ___models_PartitionItem107 | None = ... + +@dataclass(kw_only=True) +class PartitionItem107(_SerdeShape): + "Dataclass for PartitionItem107 structure." + + value: str | None = ... + next: ___models_PartitionItem108 | None = ... + +@dataclass(kw_only=True) +class PartitionItem108(_SerdeShape): + "Dataclass for PartitionItem108 structure." + + value: str | None = ... + next: ___models_PartitionItem109 | None = ... + +@dataclass(kw_only=True) +class PartitionItem109(_SerdeShape): + "Dataclass for PartitionItem109 structure." + + value: str | None = ... + next: ___models_PartitionItem110 | None = ... + +@dataclass(kw_only=True) +class PartitionItem110(_SerdeShape): + "Dataclass for PartitionItem110 structure." + + value: str | None = ... + next: ___models_PartitionItem111 | None = ... + +@dataclass(kw_only=True) +class PartitionItem111(_SerdeShape): + "Dataclass for PartitionItem111 structure." + + value: str | None = ... + next: ___models_PartitionItem112 | None = ... + +@dataclass(kw_only=True) +class PartitionItem112(_SerdeShape): + "Dataclass for PartitionItem112 structure." + + value: str | None = ... + next: ___models_PartitionItem113 | None = ... + +@dataclass(kw_only=True) +class PartitionItem113(_SerdeShape): + "Dataclass for PartitionItem113 structure." + + value: str | None = ... + next: ___models_PartitionItem114 | None = ... + +@dataclass(kw_only=True) +class PartitionItem114(_SerdeShape): + "Dataclass for PartitionItem114 structure." + + value: str | None = ... + next: ___models_PartitionItem115 | None = ... + +@dataclass(kw_only=True) +class PartitionItem115(_SerdeShape): + "Dataclass for PartitionItem115 structure." + + value: str | None = ... + next: ___models_PartitionItem116 | None = ... + +@dataclass(kw_only=True) +class PartitionItem116(_SerdeShape): + "Dataclass for PartitionItem116 structure." + + value: str | None = ... + next: ___models_PartitionItem117 | None = ... + +@dataclass(kw_only=True) +class PartitionItem117(_SerdeShape): + "Dataclass for PartitionItem117 structure." + + value: str | None = ... + next: ___models_PartitionItem118 | None = ... + +@dataclass(kw_only=True) +class PartitionItem118(_SerdeShape): + "Dataclass for PartitionItem118 structure." + + value: str | None = ... + next: ___models_PartitionItem119 | None = ... + +@dataclass(kw_only=True) +class PartitionItem119(_SerdeShape): + "Dataclass for PartitionItem119 structure." + + value: str | None = ... + next: ___models_PartitionItem120 | None = ... + +@dataclass(kw_only=True) +class PartitionItem120(_SerdeShape): + "Dataclass for PartitionItem120 structure." + + value: str | None = ... + next: ___models_PartitionItem121 | None = ... + +@dataclass(kw_only=True) +class PartitionItem121(_SerdeShape): + "Dataclass for PartitionItem121 structure." + + value: str | None = ... + next: ___models_PartitionItem122 | None = ... + +@dataclass(kw_only=True) +class PartitionItem122(_SerdeShape): + "Dataclass for PartitionItem122 structure." + + value: str | None = ... + next: ___models_PartitionItem123 | None = ... + +@dataclass(kw_only=True) +class PartitionItem123(_SerdeShape): + "Dataclass for PartitionItem123 structure." + + value: str | None = ... + next: ___models_PartitionItem124 | None = ... + +@dataclass(kw_only=True) +class PartitionItem124(_SerdeShape): + "Dataclass for PartitionItem124 structure." + + value: str | None = ... + next: ___models_PartitionItem125 | None = ... + +@dataclass(kw_only=True) +class PartitionItem125(_SerdeShape): + "Dataclass for PartitionItem125 structure." + + value: str | None = ... + next: ___models_PartitionItem126 | None = ... + +@dataclass(kw_only=True) +class PartitionItem126(_SerdeShape): + "Dataclass for PartitionItem126 structure." + + value: str | None = ... + next: ___models_PartitionItem127 | None = ... + +@dataclass(kw_only=True) +class PartitionItem127(_SerdeShape): + "Dataclass for PartitionItem127 structure." + + value: str | None = ... + next: ___models_PartitionItem128 | None = ... + +@dataclass(kw_only=True) +class PartitionItem128(_SerdeShape): + "Dataclass for PartitionItem128 structure." + + value: str | None = ... + next: ___models_PartitionItem129 | None = ... + +@dataclass(kw_only=True) +class PartitionItem129(_SerdeShape): + "Dataclass for PartitionItem129 structure." + + value: str | None = ... + next: ___models_PartitionItem130 | None = ... + +@dataclass(kw_only=True) +class PartitionItem130(_SerdeShape): + "Dataclass for PartitionItem130 structure." + + value: str | None = ... + next: ___models_PartitionItem131 | None = ... + +@dataclass(kw_only=True) +class PartitionItem131(_SerdeShape): + "Dataclass for PartitionItem131 structure." + + value: str | None = ... + next: ___models_PartitionItem132 | None = ... + +@dataclass(kw_only=True) +class PartitionItem132(_SerdeShape): + "Dataclass for PartitionItem132 structure." + + value: str | None = ... + next: ___models_PartitionItem133 | None = ... + +@dataclass(kw_only=True) +class PartitionItem133(_SerdeShape): + "Dataclass for PartitionItem133 structure." + + value: str | None = ... + next: ___models_PartitionItem134 | None = ... + +@dataclass(kw_only=True) +class PartitionItem134(_SerdeShape): + "Dataclass for PartitionItem134 structure." + + value: str | None = ... + next: ___models_PartitionItem135 | None = ... + +@dataclass(kw_only=True) +class PartitionItem135(_SerdeShape): + "Dataclass for PartitionItem135 structure." + + value: str | None = ... + next: ___models_PartitionItem136 | None = ... + +@dataclass(kw_only=True) +class PartitionItem136(_SerdeShape): + "Dataclass for PartitionItem136 structure." + + value: str | None = ... + next: ___models_PartitionItem137 | None = ... + +@dataclass(kw_only=True) +class PartitionItem137(_SerdeShape): + "Dataclass for PartitionItem137 structure." + + value: str | None = ... + next: ___models_PartitionItem138 | None = ... + +@dataclass(kw_only=True) +class PartitionItem138(_SerdeShape): + "Dataclass for PartitionItem138 structure." + + value: str | None = ... + next: ___models_PartitionItem139 | None = ... + +@dataclass(kw_only=True) +class PartitionItem139(_SerdeShape): + "Dataclass for PartitionItem139 structure." + + value: str | None = ... + next: ___models_PartitionItem140 | None = ... + +@dataclass(kw_only=True) +class PartitionItem140(_SerdeShape): + "Dataclass for PartitionItem140 structure." + + value: str | None = ... + next: ___models_PartitionItem141 | None = ... + +@dataclass(kw_only=True) +class PartitionItem141(_SerdeShape): + "Dataclass for PartitionItem141 structure." + + value: str | None = ... + next: ___models_PartitionItem142 | None = ... + +@dataclass(kw_only=True) +class PartitionItem142(_SerdeShape): + "Dataclass for PartitionItem142 structure." + + value: str | None = ... + next: ___models_PartitionItem143 | None = ... + +@dataclass(kw_only=True) +class PartitionItem143(_SerdeShape): + "Dataclass for PartitionItem143 structure." + + value: str | None = ... + next: ___models_PartitionItem144 | None = ... + +@dataclass(kw_only=True) +class PartitionItem144(_SerdeShape): + "Dataclass for PartitionItem144 structure." + + value: str | None = ... + next: ___models_PartitionItem145 | None = ... + +@dataclass(kw_only=True) +class PartitionItem145(_SerdeShape): + "Dataclass for PartitionItem145 structure." + + value: str | None = ... + next: ___models_PartitionItem146 | None = ... + +@dataclass(kw_only=True) +class PartitionItem146(_SerdeShape): + "Dataclass for PartitionItem146 structure." + + value: str | None = ... + next: ___models_PartitionItem147 | None = ... + +@dataclass(kw_only=True) +class PartitionItem147(_SerdeShape): + "Dataclass for PartitionItem147 structure." + + value: str | None = ... + next: ___models_PartitionItem148 | None = ... + +@dataclass(kw_only=True) +class PartitionItem148(_SerdeShape): + "Dataclass for PartitionItem148 structure." + + value: str | None = ... + next: ___models_PartitionItem149 | None = ... + +@dataclass(kw_only=True) +class PartitionItem149(_SerdeShape): + "Dataclass for PartitionItem149 structure." + + value: str | None = ... + next: ___models_PartitionItem150 | None = ... + +@dataclass(kw_only=True) +class PartitionItem150(_SerdeShape): + "Dataclass for PartitionItem150 structure." + + value: str | None = ... + next: ___models_PartitionItem151 | None = ... + +@dataclass(kw_only=True) +class PartitionItem151(_SerdeShape): + "Dataclass for PartitionItem151 structure." + + value: str | None = ... + next: ___models_PartitionItem152 | None = ... + +@dataclass(kw_only=True) +class PartitionItem152(_SerdeShape): + "Dataclass for PartitionItem152 structure." + + value: str | None = ... + next: ___models_PartitionItem153 | None = ... + +@dataclass(kw_only=True) +class PartitionItem153(_SerdeShape): + "Dataclass for PartitionItem153 structure." + + value: str | None = ... + next: ___models_PartitionItem154 | None = ... + +@dataclass(kw_only=True) +class PartitionItem154(_SerdeShape): + "Dataclass for PartitionItem154 structure." + + value: str | None = ... + next: ___models_PartitionItem155 | None = ... + +@dataclass(kw_only=True) +class PartitionItem155(_SerdeShape): + "Dataclass for PartitionItem155 structure." + + value: str | None = ... + next: ___models_PartitionItem156 | None = ... + +@dataclass(kw_only=True) +class PartitionItem156(_SerdeShape): + "Dataclass for PartitionItem156 structure." + + value: str | None = ... + next: ___models_PartitionItem157 | None = ... + +@dataclass(kw_only=True) +class PartitionItem157(_SerdeShape): + "Dataclass for PartitionItem157 structure." + + value: str | None = ... + next: ___models_PartitionItem158 | None = ... + +@dataclass(kw_only=True) +class PartitionItem158(_SerdeShape): + "Dataclass for PartitionItem158 structure." + + value: str | None = ... + next: ___models_PartitionItem159 | None = ... + +@dataclass(kw_only=True) +class PartitionItem159(_SerdeShape): + "Dataclass for PartitionItem159 structure." + + value: str | None = ... + next: ___models_PartitionItem160 | None = ... + +@dataclass(kw_only=True) +class PartitionItem160(_SerdeShape): + "Dataclass for PartitionItem160 structure." + + value: str | None = ... + next: ___models_PartitionItem161 | None = ... + +@dataclass(kw_only=True) +class PartitionItem161(_SerdeShape): + "Dataclass for PartitionItem161 structure." + + value: str | None = ... + next: ___models_PartitionItem162 | None = ... + +@dataclass(kw_only=True) +class PartitionItem162(_SerdeShape): + "Dataclass for PartitionItem162 structure." + + value: str | None = ... + next: ___models_PartitionItem163 | None = ... + +@dataclass(kw_only=True) +class PartitionItem163(_SerdeShape): + "Dataclass for PartitionItem163 structure." + + value: str | None = ... + next: ___models_PartitionItem164 | None = ... + +@dataclass(kw_only=True) +class PartitionItem164(_SerdeShape): + "Dataclass for PartitionItem164 structure." + + value: str | None = ... + next: ___models_PartitionItem165 | None = ... + +@dataclass(kw_only=True) +class PartitionItem165(_SerdeShape): + "Dataclass for PartitionItem165 structure." + + value: str | None = ... + next: ___models_PartitionItem166 | None = ... + +@dataclass(kw_only=True) +class PartitionItem166(_SerdeShape): + "Dataclass for PartitionItem166 structure." + + value: str | None = ... + next: ___models_PartitionItem167 | None = ... + +@dataclass(kw_only=True) +class PartitionItem167(_SerdeShape): + "Dataclass for PartitionItem167 structure." + + value: str | None = ... + next: ___models_PartitionItem168 | None = ... + +@dataclass(kw_only=True) +class PartitionItem168(_SerdeShape): + "Dataclass for PartitionItem168 structure." + + value: str | None = ... + next: ___models_PartitionItem169 | None = ... + +@dataclass(kw_only=True) +class PartitionItem169(_SerdeShape): + "Dataclass for PartitionItem169 structure." + + value: str | None = ... + next: ___models_PartitionItem170 | None = ... + +@dataclass(kw_only=True) +class PartitionItem170(_SerdeShape): + "Dataclass for PartitionItem170 structure." + + value: str | None = ... + next: ___models_PartitionItem171 | None = ... + +@dataclass(kw_only=True) +class PartitionItem171(_SerdeShape): + "Dataclass for PartitionItem171 structure." + + value: str | None = ... + next: ___models_PartitionItem172 | None = ... + +@dataclass(kw_only=True) +class PartitionItem172(_SerdeShape): + "Dataclass for PartitionItem172 structure." + + value: str | None = ... + next: ___models_PartitionItem173 | None = ... + +@dataclass(kw_only=True) +class PartitionItem173(_SerdeShape): + "Dataclass for PartitionItem173 structure." + + value: str | None = ... + next: ___models_PartitionItem174 | None = ... + +@dataclass(kw_only=True) +class PartitionItem174(_SerdeShape): + "Dataclass for PartitionItem174 structure." + + value: str | None = ... + next: ___models_PartitionItem175 | None = ... + +@dataclass(kw_only=True) +class PartitionItem175(_SerdeShape): + "Dataclass for PartitionItem175 structure." + + value: str | None = ... + next: ___models_PartitionItem176 | None = ... + +@dataclass(kw_only=True) +class PartitionItem176(_SerdeShape): + "Dataclass for PartitionItem176 structure." + + value: str | None = ... + next: ___models_PartitionItem177 | None = ... + +@dataclass(kw_only=True) +class PartitionItem177(_SerdeShape): + "Dataclass for PartitionItem177 structure." + + value: str | None = ... + next: ___models_PartitionItem178 | None = ... + +@dataclass(kw_only=True) +class PartitionItem178(_SerdeShape): + "Dataclass for PartitionItem178 structure." + + value: str | None = ... + next: ___models_PartitionItem179 | None = ... + +@dataclass(kw_only=True) +class PartitionItem179(_SerdeShape): + "Dataclass for PartitionItem179 structure." + + value: str | None = ... + next: ___models_PartitionItem180 | None = ... + +@dataclass(kw_only=True) +class PartitionItem180(_SerdeShape): + "Dataclass for PartitionItem180 structure." + + value: str | None = ... + next: ___models_PartitionItem181 | None = ... + +@dataclass(kw_only=True) +class PartitionItem181(_SerdeShape): + "Dataclass for PartitionItem181 structure." + + value: str | None = ... + next: ___models_PartitionItem182 | None = ... + +@dataclass(kw_only=True) +class PartitionItem182(_SerdeShape): + "Dataclass for PartitionItem182 structure." + + value: str | None = ... + next: ___models_PartitionItem183 | None = ... + +@dataclass(kw_only=True) +class PartitionItem183(_SerdeShape): + "Dataclass for PartitionItem183 structure." + + value: str | None = ... + next: ___models_PartitionItem184 | None = ... + +@dataclass(kw_only=True) +class PartitionItem184(_SerdeShape): + "Dataclass for PartitionItem184 structure." + + value: str | None = ... + next: ___models_PartitionItem185 | None = ... + +@dataclass(kw_only=True) +class PartitionItem185(_SerdeShape): + "Dataclass for PartitionItem185 structure." + + value: str | None = ... + next: ___models_PartitionItem186 | None = ... + +@dataclass(kw_only=True) +class PartitionItem186(_SerdeShape): + "Dataclass for PartitionItem186 structure." + + value: str | None = ... + next: ___models_PartitionItem187 | None = ... + +@dataclass(kw_only=True) +class PartitionItem187(_SerdeShape): + "Dataclass for PartitionItem187 structure." + + value: str | None = ... + next: ___models_PartitionItem188 | None = ... + +@dataclass(kw_only=True) +class PartitionItem188(_SerdeShape): + "Dataclass for PartitionItem188 structure." + + value: str | None = ... + next: ___models_PartitionItem189 | None = ... + +@dataclass(kw_only=True) +class PartitionItem189(_SerdeShape): + "Dataclass for PartitionItem189 structure." + + value: str | None = ... + next: ___models_PartitionItem190 | None = ... + +@dataclass(kw_only=True) +class PartitionItem190(_SerdeShape): + "Dataclass for PartitionItem190 structure." + + value: str | None = ... + next: ___models_PartitionItem191 | None = ... + +@dataclass(kw_only=True) +class PartitionItem191(_SerdeShape): + "Dataclass for PartitionItem191 structure." + + value: str | None = ... + next: ___models_PartitionItem192 | None = ... + +@dataclass(kw_only=True) +class PartitionItem192(_SerdeShape): + "Dataclass for PartitionItem192 structure." + + value: str | None = ... + next: ___models_PartitionItem193 | None = ... + +@dataclass(kw_only=True) +class PartitionItem193(_SerdeShape): + "Dataclass for PartitionItem193 structure." + + value: str | None = ... + next: ___models_PartitionItem194 | None = ... + +@dataclass(kw_only=True) +class PartitionItem194(_SerdeShape): + "Dataclass for PartitionItem194 structure." + + value: str | None = ... + next: ___models_PartitionItem195 | None = ... + +@dataclass(kw_only=True) +class PartitionItem195(_SerdeShape): + "Dataclass for PartitionItem195 structure." + + value: str | None = ... + next: ___models_PartitionItem196 | None = ... + +@dataclass(kw_only=True) +class PartitionItem196(_SerdeShape): + "Dataclass for PartitionItem196 structure." + + value: str | None = ... + next: ___models_PartitionItem197 | None = ... + +@dataclass(kw_only=True) +class PartitionItem197(_SerdeShape): + "Dataclass for PartitionItem197 structure." + + value: str | None = ... + next: ___models_PartitionItem198 | None = ... + +@dataclass(kw_only=True) +class PartitionItem198(_SerdeShape): + "Dataclass for PartitionItem198 structure." + + value: str | None = ... + next: ___models_PartitionItem199 | None = ... + +@dataclass(kw_only=True) +class PartitionItem199(_SerdeShape): + "Dataclass for PartitionItem199 structure." + + value: str | None = ... + next: ___models_PartitionItem200 | None = ... + +@dataclass(kw_only=True) +class PartitionItem200(_SerdeShape): + "Dataclass for PartitionItem200 structure." + + value: str | None = ... + next: ___models_PartitionItem201 | None = ... + +@dataclass(kw_only=True) +class PartitionItem201(_SerdeShape): + "Dataclass for PartitionItem201 structure." + + value: str | None = ... + next: ___models_PartitionItem202 | None = ... + +@dataclass(kw_only=True) +class PartitionItem202(_SerdeShape): + "Dataclass for PartitionItem202 structure." + + value: str | None = ... + next: ___models_PartitionItem203 | None = ... + +@dataclass(kw_only=True) +class PartitionItem203(_SerdeShape): + "Dataclass for PartitionItem203 structure." + + value: str | None = ... + next: ___models_PartitionItem204 | None = ... + +@dataclass(kw_only=True) +class PartitionItem204(_SerdeShape): + "Dataclass for PartitionItem204 structure." + + value: str | None = ... + next: ___models_PartitionItem205 | None = ... + +@dataclass(kw_only=True) +class PartitionItem205(_SerdeShape): + "Dataclass for PartitionItem205 structure." + + value: str | None = ... + next: ___models_PartitionItem206 | None = ... + +@dataclass(kw_only=True) +class PartitionItem206(_SerdeShape): + "Dataclass for PartitionItem206 structure." + + value: str | None = ... + next: ___models_PartitionItem207 | None = ... + +@dataclass(kw_only=True) +class PartitionItem207(_SerdeShape): + "Dataclass for PartitionItem207 structure." + + value: str | None = ... + next: ___models_PartitionItem208 | None = ... + +@dataclass(kw_only=True) +class PartitionItem208(_SerdeShape): + "Dataclass for PartitionItem208 structure." + + value: str | None = ... + next: ___models_PartitionItem209 | None = ... + +@dataclass(kw_only=True) +class PartitionItem209(_SerdeShape): + "Dataclass for PartitionItem209 structure." + + value: str | None = ... + next: ___models_PartitionItem210 | None = ... + +@dataclass(kw_only=True) +class PartitionItem210(_SerdeShape): + "Dataclass for PartitionItem210 structure." + + value: str | None = ... + next: ___models_PartitionItem211 | None = ... + +@dataclass(kw_only=True) +class PartitionItem211(_SerdeShape): + "Dataclass for PartitionItem211 structure." + + value: str | None = ... + next: ___models_PartitionItem212 | None = ... + +@dataclass(kw_only=True) +class PartitionItem212(_SerdeShape): + "Dataclass for PartitionItem212 structure." + + value: str | None = ... + next: ___models_PartitionItem213 | None = ... + +@dataclass(kw_only=True) +class PartitionItem213(_SerdeShape): + "Dataclass for PartitionItem213 structure." + + value: str | None = ... + next: ___models_PartitionItem214 | None = ... + +@dataclass(kw_only=True) +class PartitionItem214(_SerdeShape): + "Dataclass for PartitionItem214 structure." + + value: str | None = ... + next: ___models_PartitionItem215 | None = ... + +@dataclass(kw_only=True) +class PartitionItem215(_SerdeShape): + "Dataclass for PartitionItem215 structure." + + value: str | None = ... + next: ___models_PartitionItem216 | None = ... + +@dataclass(kw_only=True) +class PartitionItem216(_SerdeShape): + "Dataclass for PartitionItem216 structure." + + value: str | None = ... + next: ___models_PartitionItem217 | None = ... + +@dataclass(kw_only=True) +class PartitionItem217(_SerdeShape): + "Dataclass for PartitionItem217 structure." + + value: str | None = ... + next: ___models_PartitionItem218 | None = ... + +@dataclass(kw_only=True) +class PartitionItem218(_SerdeShape): + "Dataclass for PartitionItem218 structure." + + value: str | None = ... + next: ___models_PartitionItem219 | None = ... + +@dataclass(kw_only=True) +class PartitionItem219(_SerdeShape): + "Dataclass for PartitionItem219 structure." + + value: str | None = ... + next: ___models_PartitionItem220 | None = ... + +@dataclass(kw_only=True) +class PartitionItem220(_SerdeShape): + "Dataclass for PartitionItem220 structure." + + value: str | None = ... + next: ___models_PartitionItem221 | None = ... + +@dataclass(kw_only=True) +class PartitionItem221(_SerdeShape): + "Dataclass for PartitionItem221 structure." + + value: str | None = ... + next: ___models_PartitionItem222 | None = ... + +@dataclass(kw_only=True) +class PartitionItem222(_SerdeShape): + "Dataclass for PartitionItem222 structure." + + value: str | None = ... + next: ___models_PartitionItem223 | None = ... + +@dataclass(kw_only=True) +class PartitionItem223(_SerdeShape): + "Dataclass for PartitionItem223 structure." + + value: str | None = ... + next: ___models_PartitionItem224 | None = ... + +@dataclass(kw_only=True) +class PartitionItem224(_SerdeShape): + "Dataclass for PartitionItem224 structure." + + value: str | None = ... + next: ___models_PartitionItem225 | None = ... + +@dataclass(kw_only=True) +class PartitionItem225(_SerdeShape): + "Dataclass for PartitionItem225 structure." + + value: str | None = ... + next: ___models_PartitionItem226 | None = ... + +@dataclass(kw_only=True) +class PartitionItem226(_SerdeShape): + "Dataclass for PartitionItem226 structure." + + value: str | None = ... + next: ___models_PartitionItem227 | None = ... + +@dataclass(kw_only=True) +class PartitionItem227(_SerdeShape): + "Dataclass for PartitionItem227 structure." + + value: str | None = ... + next: ___models_PartitionItem228 | None = ... + +@dataclass(kw_only=True) +class PartitionItem228(_SerdeShape): + "Dataclass for PartitionItem228 structure." + + value: str | None = ... + next: ___models_PartitionItem229 | None = ... + +@dataclass(kw_only=True) +class PartitionItem229(_SerdeShape): + "Dataclass for PartitionItem229 structure." + + value: str | None = ... + next: ___models_PartitionItem230 | None = ... + +@dataclass(kw_only=True) +class PartitionItem230(_SerdeShape): + "Dataclass for PartitionItem230 structure." + + value: str | None = ... + next: ___models_PartitionItem231 | None = ... + +@dataclass(kw_only=True) +class PartitionItem231(_SerdeShape): + "Dataclass for PartitionItem231 structure." + + value: str | None = ... + next: ___models_PartitionItem232 | None = ... + +@dataclass(kw_only=True) +class PartitionItem232(_SerdeShape): + "Dataclass for PartitionItem232 structure." + + value: str | None = ... + next: ___models_PartitionItem233 | None = ... + +@dataclass(kw_only=True) +class PartitionItem233(_SerdeShape): + "Dataclass for PartitionItem233 structure." + + value: str | None = ... + next: ___models_PartitionItem234 | None = ... + +@dataclass(kw_only=True) +class PartitionItem234(_SerdeShape): + "Dataclass for PartitionItem234 structure." + + value: str | None = ... + next: ___models_PartitionItem235 | None = ... + +@dataclass(kw_only=True) +class PartitionItem235(_SerdeShape): + "Dataclass for PartitionItem235 structure." + + value: str | None = ... + next: ___models_PartitionItem236 | None = ... + +@dataclass(kw_only=True) +class PartitionItem236(_SerdeShape): + "Dataclass for PartitionItem236 structure." + + value: str | None = ... + next: ___models_PartitionItem237 | None = ... + +@dataclass(kw_only=True) +class PartitionItem237(_SerdeShape): + "Dataclass for PartitionItem237 structure." + + value: str | None = ... + next: ___models_PartitionItem238 | None = ... + +@dataclass(kw_only=True) +class PartitionItem238(_SerdeShape): + "Dataclass for PartitionItem238 structure." + + value: str | None = ... + next: ___models_PartitionItem239 | None = ... + +@dataclass(kw_only=True) +class PartitionItem239(_SerdeShape): + "Dataclass for PartitionItem239 structure." + + value: str | None = ... + next: ___models_PartitionItem240 | None = ... + +@dataclass(kw_only=True) +class PartitionItem240(_SerdeShape): + "Dataclass for PartitionItem240 structure." + + value: str | None = ... + next: ___models_PartitionItem241 | None = ... + +@dataclass(kw_only=True) +class PartitionItem241(_SerdeShape): + "Dataclass for PartitionItem241 structure." + + value: str | None = ... + next: PartitionItem242 | None = ... diff --git a/codegen-output-py/partitioned-types/src/partitioned_types/_private/models_1.pyi b/codegen-output-py/partitioned-types/src/partitioned_types/_private/models_1.pyi new file mode 100644 index 000000000..4152be04f --- /dev/null +++ b/codegen-output-py/partitioned-types/src/partitioned_types/_private/models_1.pyi @@ -0,0 +1,180 @@ +from dataclasses import dataclass + +from ..models import ( + PartitionItem243 as ___models_PartitionItem243, +) +from ..models import ( + PartitionItem244 as ___models_PartitionItem244, +) +from ..models import ( + PartitionItem245 as ___models_PartitionItem245, +) +from ..models import ( + PartitionItem246 as ___models_PartitionItem246, +) +from ..models import ( + PartitionItem247 as ___models_PartitionItem247, +) +from ..models import ( + PartitionItem248 as ___models_PartitionItem248, +) +from ..models import ( + PartitionItem249 as ___models_PartitionItem249, +) +from ..models import ( + PartitionItem250 as ___models_PartitionItem250, +) +from ..models import ( + PartitionItem251 as ___models_PartitionItem251, +) +from ..models import ( + PartitionItem252 as ___models_PartitionItem252, +) +from ..models import ( + PartitionItem253 as ___models_PartitionItem253, +) +from ..models import ( + PartitionItem254 as ___models_PartitionItem254, +) +from ..models import ( + PartitionItem255 as ___models_PartitionItem255, +) +from ..models import ( + PartitionItem256 as ___models_PartitionItem256, +) +from ..models import ( + PartitionItem257 as ___models_PartitionItem257, +) +from ..models import ( + PartitionItem258 as ___models_PartitionItem258, +) +from ..models import ( + PartitionItem259 as ___models_PartitionItem259, +) +from ..models import _SerdeShape # pyright: ignore[reportPrivateUsage] + +@dataclass(kw_only=True) +class PartitionItem242(_SerdeShape): + "Dataclass for PartitionItem242 structure." + + value: str | None = ... + next: ___models_PartitionItem243 | None = ... + +@dataclass(kw_only=True) +class PartitionItem243(_SerdeShape): + "Dataclass for PartitionItem243 structure." + + value: str | None = ... + next: ___models_PartitionItem244 | None = ... + +@dataclass(kw_only=True) +class PartitionItem244(_SerdeShape): + "Dataclass for PartitionItem244 structure." + + value: str | None = ... + next: ___models_PartitionItem245 | None = ... + +@dataclass(kw_only=True) +class PartitionItem245(_SerdeShape): + "Dataclass for PartitionItem245 structure." + + value: str | None = ... + next: ___models_PartitionItem246 | None = ... + +@dataclass(kw_only=True) +class PartitionItem246(_SerdeShape): + "Dataclass for PartitionItem246 structure." + + value: str | None = ... + next: ___models_PartitionItem247 | None = ... + +@dataclass(kw_only=True) +class PartitionItem247(_SerdeShape): + "Dataclass for PartitionItem247 structure." + + value: str | None = ... + next: ___models_PartitionItem248 | None = ... + +@dataclass(kw_only=True) +class PartitionItem248(_SerdeShape): + "Dataclass for PartitionItem248 structure." + + value: str | None = ... + next: ___models_PartitionItem249 | None = ... + +@dataclass(kw_only=True) +class PartitionItem249(_SerdeShape): + "Dataclass for PartitionItem249 structure." + + value: str | None = ... + next: ___models_PartitionItem250 | None = ... + +@dataclass(kw_only=True) +class PartitionItem250(_SerdeShape): + "Dataclass for PartitionItem250 structure." + + value: str | None = ... + next: ___models_PartitionItem251 | None = ... + +@dataclass(kw_only=True) +class PartitionItem251(_SerdeShape): + "Dataclass for PartitionItem251 structure." + + value: str | None = ... + next: ___models_PartitionItem252 | None = ... + +@dataclass(kw_only=True) +class PartitionItem252(_SerdeShape): + "Dataclass for PartitionItem252 structure." + + value: str | None = ... + next: ___models_PartitionItem253 | None = ... + +@dataclass(kw_only=True) +class PartitionItem253(_SerdeShape): + "Dataclass for PartitionItem253 structure." + + value: str | None = ... + next: ___models_PartitionItem254 | None = ... + +@dataclass(kw_only=True) +class PartitionItem254(_SerdeShape): + "Dataclass for PartitionItem254 structure." + + value: str | None = ... + next: ___models_PartitionItem255 | None = ... + +@dataclass(kw_only=True) +class PartitionItem255(_SerdeShape): + "Dataclass for PartitionItem255 structure." + + value: str | None = ... + next: ___models_PartitionItem256 | None = ... + +@dataclass(kw_only=True) +class PartitionItem256(_SerdeShape): + "Dataclass for PartitionItem256 structure." + + value: str | None = ... + next: ___models_PartitionItem257 | None = ... + +@dataclass(kw_only=True) +class PartitionItem257(_SerdeShape): + "Dataclass for PartitionItem257 structure." + + value: str | None = ... + next: ___models_PartitionItem258 | None = ... + +@dataclass(kw_only=True) +class PartitionItem258(_SerdeShape): + "Dataclass for PartitionItem258 structure." + + value: str | None = ... + next: ___models_PartitionItem259 | None = ... + +@dataclass(kw_only=True) +class PartitionItem259(_SerdeShape): + "Dataclass for PartitionItem259 structure." + + value: str | None = ... + next: ___models_PartitionItem258 | None = ... diff --git a/codegen-output-py/partitioned-types/src/partitioned_types/_private/schemas.py b/codegen-output-py/partitioned-types/src/partitioned_types/_private/schemas.py new file mode 100644 index 000000000..f5986918e --- /dev/null +++ b/codegen-output-py/partitioned-types/src/partitioned_types/_private/schemas.py @@ -0,0 +1,299 @@ +from importlib import import_module + +_PARTITION_NAMES: tuple[tuple[str, ...], ...] = ( + ( + "PARTITION_ITEM257", + "PARTITION_ITEM256", + "PARTITION_ITEM255", + "PARTITION_ITEM254", + "PARTITION_ITEM253", + "PARTITION_ITEM252", + "PARTITION_ITEM251", + "PARTITION_ITEM250", + "PARTITION_ITEM249", + "PARTITION_ITEM248", + "PARTITION_ITEM247", + "PARTITION_ITEM246", + "PARTITION_ITEM245", + "PARTITION_ITEM244", + "PARTITION_ITEM243", + "PARTITION_ITEM242", + "PARTITION_ITEM241", + "PARTITION_ITEM240", + "PARTITION_ITEM239", + "PARTITION_ITEM238", + "PARTITION_ITEM237", + "PARTITION_ITEM236", + "PARTITION_ITEM235", + "PARTITION_ITEM234", + "PARTITION_ITEM233", + "PARTITION_ITEM232", + "PARTITION_ITEM231", + "PARTITION_ITEM230", + "PARTITION_ITEM229", + "PARTITION_ITEM228", + "PARTITION_ITEM227", + "PARTITION_ITEM226", + "PARTITION_ITEM225", + "PARTITION_ITEM224", + "PARTITION_ITEM223", + "PARTITION_ITEM222", + "PARTITION_ITEM221", + "PARTITION_ITEM220", + "PARTITION_ITEM219", + "PARTITION_ITEM218", + "PARTITION_ITEM217", + "PARTITION_ITEM216", + "PARTITION_ITEM215", + "PARTITION_ITEM214", + "PARTITION_ITEM213", + "PARTITION_ITEM212", + "PARTITION_ITEM211", + "PARTITION_ITEM210", + "PARTITION_ITEM209", + "PARTITION_ITEM208", + "PARTITION_ITEM207", + "PARTITION_ITEM206", + "PARTITION_ITEM205", + "PARTITION_ITEM204", + "PARTITION_ITEM203", + "PARTITION_ITEM202", + "PARTITION_ITEM201", + "PARTITION_ITEM200", + "PARTITION_ITEM199", + "PARTITION_ITEM198", + "PARTITION_ITEM197", + "PARTITION_ITEM196", + "PARTITION_ITEM195", + "PARTITION_ITEM194", + "PARTITION_ITEM193", + "PARTITION_ITEM192", + "PARTITION_ITEM191", + "PARTITION_ITEM190", + "PARTITION_ITEM189", + "PARTITION_ITEM188", + "PARTITION_ITEM187", + "PARTITION_ITEM186", + "PARTITION_ITEM185", + "PARTITION_ITEM184", + "PARTITION_ITEM183", + "PARTITION_ITEM182", + "PARTITION_ITEM181", + "PARTITION_ITEM180", + "PARTITION_ITEM179", + "PARTITION_ITEM178", + "PARTITION_ITEM177", + "PARTITION_ITEM176", + "PARTITION_ITEM175", + "PARTITION_ITEM174", + "PARTITION_ITEM173", + "PARTITION_ITEM172", + "PARTITION_ITEM171", + "PARTITION_ITEM170", + "PARTITION_ITEM169", + "PARTITION_ITEM168", + "PARTITION_ITEM167", + ), + ( + "PARTITION_ITEM166", + "PARTITION_ITEM165", + "PARTITION_ITEM164", + "PARTITION_ITEM163", + "PARTITION_ITEM162", + "PARTITION_ITEM161", + "PARTITION_ITEM160", + "PARTITION_ITEM159", + "PARTITION_ITEM158", + "PARTITION_ITEM157", + "PARTITION_ITEM156", + "PARTITION_ITEM155", + "PARTITION_ITEM154", + "PARTITION_ITEM153", + "PARTITION_ITEM152", + "PARTITION_ITEM151", + "PARTITION_ITEM150", + "PARTITION_ITEM149", + "PARTITION_ITEM148", + "PARTITION_ITEM147", + "PARTITION_ITEM146", + "PARTITION_ITEM145", + "PARTITION_ITEM144", + "PARTITION_ITEM143", + "PARTITION_ITEM142", + "PARTITION_ITEM141", + "PARTITION_ITEM140", + "PARTITION_ITEM139", + "PARTITION_ITEM138", + "PARTITION_ITEM137", + "PARTITION_ITEM136", + "PARTITION_ITEM135", + "PARTITION_ITEM134", + "PARTITION_ITEM133", + "PARTITION_ITEM132", + "PARTITION_ITEM131", + "PARTITION_ITEM130", + "PARTITION_ITEM129", + "PARTITION_ITEM128", + "PARTITION_ITEM127", + "PARTITION_ITEM126", + "PARTITION_ITEM125", + "PARTITION_ITEM124", + "PARTITION_ITEM123", + "PARTITION_ITEM122", + "PARTITION_ITEM121", + "PARTITION_ITEM120", + "PARTITION_ITEM119", + "PARTITION_ITEM118", + "PARTITION_ITEM117", + "PARTITION_ITEM116", + "PARTITION_ITEM115", + "PARTITION_ITEM114", + "PARTITION_ITEM113", + "PARTITION_ITEM112", + "PARTITION_ITEM111", + "PARTITION_ITEM110", + "PARTITION_ITEM109", + "PARTITION_ITEM108", + "PARTITION_ITEM107", + "PARTITION_ITEM106", + "PARTITION_ITEM105", + "PARTITION_ITEM104", + "PARTITION_ITEM103", + "PARTITION_ITEM102", + "PARTITION_ITEM101", + "PARTITION_ITEM100", + "PARTITION_ITEM099", + "PARTITION_ITEM098", + "PARTITION_ITEM097", + "PARTITION_ITEM096", + "PARTITION_ITEM095", + "PARTITION_ITEM094", + "PARTITION_ITEM093", + "PARTITION_ITEM092", + "PARTITION_ITEM091", + "PARTITION_ITEM090", + "PARTITION_ITEM089", + "PARTITION_ITEM088", + "PARTITION_ITEM087", + "PARTITION_ITEM086", + "PARTITION_ITEM085", + "PARTITION_ITEM084", + "PARTITION_ITEM083", + "PARTITION_ITEM082", + "PARTITION_ITEM081", + "PARTITION_ITEM080", + "PARTITION_ITEM079", + "PARTITION_ITEM078", + "PARTITION_ITEM077", + ), + ( + "PARTITION_ITEM076", + "PARTITION_ITEM075", + "PARTITION_ITEM074", + "PARTITION_ITEM073", + "PARTITION_ITEM072", + "PARTITION_ITEM071", + "PARTITION_ITEM070", + "PARTITION_ITEM069", + "PARTITION_ITEM068", + "PARTITION_ITEM067", + "PARTITION_ITEM066", + "PARTITION_ITEM065", + "PARTITION_ITEM064", + "PARTITION_ITEM063", + "PARTITION_ITEM062", + "PARTITION_ITEM061", + "PARTITION_ITEM060", + "PARTITION_ITEM059", + "PARTITION_ITEM058", + "PARTITION_ITEM057", + "PARTITION_ITEM056", + "PARTITION_ITEM055", + "PARTITION_ITEM054", + "PARTITION_ITEM053", + "PARTITION_ITEM052", + "PARTITION_ITEM051", + "PARTITION_ITEM050", + "PARTITION_ITEM049", + "PARTITION_ITEM048", + "PARTITION_ITEM047", + "PARTITION_ITEM046", + "PARTITION_ITEM045", + "PARTITION_ITEM044", + "PARTITION_ITEM043", + "PARTITION_ITEM042", + "PARTITION_ITEM041", + "PARTITION_ITEM040", + "PARTITION_ITEM039", + "PARTITION_ITEM038", + "PARTITION_ITEM037", + "PARTITION_ITEM036", + "PARTITION_ITEM035", + "PARTITION_ITEM034", + "PARTITION_ITEM033", + "PARTITION_ITEM032", + "PARTITION_ITEM031", + "PARTITION_ITEM030", + "PARTITION_ITEM029", + "PARTITION_ITEM028", + "PARTITION_ITEM027", + "PARTITION_ITEM026", + "PARTITION_ITEM025", + "PARTITION_ITEM024", + "PARTITION_ITEM023", + "PARTITION_ITEM022", + "PARTITION_ITEM021", + "PARTITION_ITEM020", + "PARTITION_ITEM019", + "PARTITION_ITEM018", + "PARTITION_ITEM017", + "PARTITION_ITEM016", + "PARTITION_ITEM015", + "PARTITION_ITEM014", + "PARTITION_ITEM013", + "PARTITION_ITEM012", + "PARTITION_ITEM011", + "PARTITION_ITEM010", + "PARTITION_ITEM009", + "PARTITION_ITEM008", + "PARTITION_ITEM007", + "PARTITION_ITEM006", + "PARTITION_ITEM005", + "PARTITION_ITEM004", + "PARTITION_ITEM003", + "PARTITION_ITEM002", + "PARTITION_ITEM001", + "PARTITION_ITEM000", + "GET_EXAMPLE_INPUT", + "GET_EXAMPLE_OUTPUT", + "TAG_LIST", + "ATTRIBUTES", + "EXAMPLE_VALUE", + "STATUS", + "CODE", + "RENAMED_EXAMPLE", + "EVENT_STREAM", + "EXAMPLE_ERROR", + "PARTITION_ITEM258", + "PARTITION_ITEM259", + ), +) +_PARTITIONS = { + name: index for index, names in enumerate(_PARTITION_NAMES) for name in names +} +del _PARTITION_NAMES + + +def __getattr__(name: str): + try: + partition = _PARTITIONS[name] + except KeyError as error: + raise AttributeError(name) from error + module = import_module(f".schemas_{partition}", __package__) + value = getattr(module, name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *_PARTITIONS}) diff --git a/codegen-output-py/partitioned-types/src/partitioned_types/_private/schemas_0.py b/codegen-output-py/partitioned-types/src/partitioned_types/_private/schemas_0.py new file mode 100644 index 000000000..f6a40d6ab --- /dev/null +++ b/codegen-output-py/partitioned-types/src/partitioned_types/_private/schemas_0.py @@ -0,0 +1,1463 @@ +from smithy_core._schema_compact import StaticSchema + +from . import schemas + +n0 = "example" +_s0 = "PartitionItem257" +_s1 = "value" +_s2 = "next" +_s3 = "PartitionItem256" +_s4 = "PartitionItem255" +_s5 = "PartitionItem254" +_s6 = "PartitionItem253" +_s7 = "PartitionItem252" +_s8 = "PartitionItem251" +_s9 = "PartitionItem250" +_s10 = "PartitionItem249" +_s11 = "PartitionItem248" +_s12 = "PartitionItem247" +_s13 = "PartitionItem246" +_s14 = "PartitionItem245" +_s15 = "PartitionItem244" +_s16 = "PartitionItem243" +_s17 = "PartitionItem242" +_s18 = "PartitionItem241" +_s19 = "PartitionItem240" +_s20 = "PartitionItem239" +_s21 = "PartitionItem238" +_s22 = "PartitionItem237" +_s23 = "PartitionItem236" +_s24 = "PartitionItem235" +_s25 = "PartitionItem234" +_s26 = "PartitionItem233" +_s27 = "PartitionItem232" +_s28 = "PartitionItem231" +_s29 = "PartitionItem230" +_s30 = "PartitionItem229" +_s31 = "PartitionItem228" +_s32 = "PartitionItem227" +_s33 = "PartitionItem226" +_s34 = "PartitionItem225" +_s35 = "PartitionItem224" +_s36 = "PartitionItem223" +_s37 = "PartitionItem222" +_s38 = "PartitionItem221" +_s39 = "PartitionItem220" +_s40 = "PartitionItem219" +_s41 = "PartitionItem218" +_s42 = "PartitionItem217" +_s43 = "PartitionItem216" +_s44 = "PartitionItem215" +_s45 = "PartitionItem214" +_s46 = "PartitionItem213" +_s47 = "PartitionItem212" +_s48 = "PartitionItem211" +_s49 = "PartitionItem210" +_s50 = "PartitionItem209" +_s51 = "PartitionItem208" +_s52 = "PartitionItem207" +_s53 = "PartitionItem206" +_s54 = "PartitionItem205" +_s55 = "PartitionItem204" +_s56 = "PartitionItem203" +_s57 = "PartitionItem202" +_s58 = "PartitionItem201" +_s59 = "PartitionItem200" +_s60 = "PartitionItem199" +_s61 = "PartitionItem198" +_s62 = "PartitionItem197" +_s63 = "PartitionItem196" +_s64 = "PartitionItem195" +_s65 = "PartitionItem194" +_s66 = "PartitionItem193" +_s67 = "PartitionItem192" +_s68 = "PartitionItem191" +_s69 = "PartitionItem190" +_s70 = "PartitionItem189" +_s71 = "PartitionItem188" +_s72 = "PartitionItem187" +_s73 = "PartitionItem186" +_s74 = "PartitionItem185" +_s75 = "PartitionItem184" +_s76 = "PartitionItem183" +_s77 = "PartitionItem182" +_s78 = "PartitionItem181" +_s79 = "PartitionItem180" +_s80 = "PartitionItem179" +_s81 = "PartitionItem178" +_s82 = "PartitionItem177" +_s83 = "PartitionItem176" +_s84 = "PartitionItem175" +_s85 = "PartitionItem174" +_s86 = "PartitionItem173" +_s87 = "PartitionItem172" +_s88 = "PartitionItem171" +_s89 = "PartitionItem170" +_s90 = "PartitionItem169" +_s91 = "PartitionItem168" +_s92 = "PartitionItem167" + +PARTITION_ITEM257: StaticSchema = ( + 18, + n0, + _s0, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (lambda: schemas.PARTITION_ITEM258, 0), + ), +) + +PARTITION_ITEM256: StaticSchema = ( + 18, + n0, + _s3, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM257, 0), + ), +) + +PARTITION_ITEM255: StaticSchema = ( + 18, + n0, + _s4, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM256, 0), + ), +) + +PARTITION_ITEM254: StaticSchema = ( + 18, + n0, + _s5, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM255, 0), + ), +) + +PARTITION_ITEM253: StaticSchema = ( + 18, + n0, + _s6, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM254, 0), + ), +) + +PARTITION_ITEM252: StaticSchema = ( + 18, + n0, + _s7, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM253, 0), + ), +) + +PARTITION_ITEM251: StaticSchema = ( + 18, + n0, + _s8, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM252, 0), + ), +) + +PARTITION_ITEM250: StaticSchema = ( + 18, + n0, + _s9, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM251, 0), + ), +) + +PARTITION_ITEM249: StaticSchema = ( + 18, + n0, + _s10, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM250, 0), + ), +) + +PARTITION_ITEM248: StaticSchema = ( + 18, + n0, + _s11, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM249, 0), + ), +) + +PARTITION_ITEM247: StaticSchema = ( + 18, + n0, + _s12, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM248, 0), + ), +) + +PARTITION_ITEM246: StaticSchema = ( + 18, + n0, + _s13, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM247, 0), + ), +) + +PARTITION_ITEM245: StaticSchema = ( + 18, + n0, + _s14, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM246, 0), + ), +) + +PARTITION_ITEM244: StaticSchema = ( + 18, + n0, + _s15, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM245, 0), + ), +) + +PARTITION_ITEM243: StaticSchema = ( + 18, + n0, + _s16, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM244, 0), + ), +) + +PARTITION_ITEM242: StaticSchema = ( + 18, + n0, + _s17, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM243, 0), + ), +) + +PARTITION_ITEM241: StaticSchema = ( + 18, + n0, + _s18, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM242, 0), + ), +) + +PARTITION_ITEM240: StaticSchema = ( + 18, + n0, + _s19, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM241, 0), + ), +) + +PARTITION_ITEM239: StaticSchema = ( + 18, + n0, + _s20, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM240, 0), + ), +) + +PARTITION_ITEM238: StaticSchema = ( + 18, + n0, + _s21, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM239, 0), + ), +) + +PARTITION_ITEM237: StaticSchema = ( + 18, + n0, + _s22, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM238, 0), + ), +) + +PARTITION_ITEM236: StaticSchema = ( + 18, + n0, + _s23, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM237, 0), + ), +) + +PARTITION_ITEM235: StaticSchema = ( + 18, + n0, + _s24, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM236, 0), + ), +) + +PARTITION_ITEM234: StaticSchema = ( + 18, + n0, + _s25, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM235, 0), + ), +) + +PARTITION_ITEM233: StaticSchema = ( + 18, + n0, + _s26, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM234, 0), + ), +) + +PARTITION_ITEM232: StaticSchema = ( + 18, + n0, + _s27, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM233, 0), + ), +) + +PARTITION_ITEM231: StaticSchema = ( + 18, + n0, + _s28, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM232, 0), + ), +) + +PARTITION_ITEM230: StaticSchema = ( + 18, + n0, + _s29, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM231, 0), + ), +) + +PARTITION_ITEM229: StaticSchema = ( + 18, + n0, + _s30, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM230, 0), + ), +) + +PARTITION_ITEM228: StaticSchema = ( + 18, + n0, + _s31, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM229, 0), + ), +) + +PARTITION_ITEM227: StaticSchema = ( + 18, + n0, + _s32, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM228, 0), + ), +) + +PARTITION_ITEM226: StaticSchema = ( + 18, + n0, + _s33, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM227, 0), + ), +) + +PARTITION_ITEM225: StaticSchema = ( + 18, + n0, + _s34, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM226, 0), + ), +) + +PARTITION_ITEM224: StaticSchema = ( + 18, + n0, + _s35, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM225, 0), + ), +) + +PARTITION_ITEM223: StaticSchema = ( + 18, + n0, + _s36, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM224, 0), + ), +) + +PARTITION_ITEM222: StaticSchema = ( + 18, + n0, + _s37, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM223, 0), + ), +) + +PARTITION_ITEM221: StaticSchema = ( + 18, + n0, + _s38, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM222, 0), + ), +) + +PARTITION_ITEM220: StaticSchema = ( + 18, + n0, + _s39, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM221, 0), + ), +) + +PARTITION_ITEM219: StaticSchema = ( + 18, + n0, + _s40, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM220, 0), + ), +) + +PARTITION_ITEM218: StaticSchema = ( + 18, + n0, + _s41, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM219, 0), + ), +) + +PARTITION_ITEM217: StaticSchema = ( + 18, + n0, + _s42, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM218, 0), + ), +) + +PARTITION_ITEM216: StaticSchema = ( + 18, + n0, + _s43, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM217, 0), + ), +) + +PARTITION_ITEM215: StaticSchema = ( + 18, + n0, + _s44, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM216, 0), + ), +) + +PARTITION_ITEM214: StaticSchema = ( + 18, + n0, + _s45, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM215, 0), + ), +) + +PARTITION_ITEM213: StaticSchema = ( + 18, + n0, + _s46, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM214, 0), + ), +) + +PARTITION_ITEM212: StaticSchema = ( + 18, + n0, + _s47, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM213, 0), + ), +) + +PARTITION_ITEM211: StaticSchema = ( + 18, + n0, + _s48, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM212, 0), + ), +) + +PARTITION_ITEM210: StaticSchema = ( + 18, + n0, + _s49, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM211, 0), + ), +) + +PARTITION_ITEM209: StaticSchema = ( + 18, + n0, + _s50, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM210, 0), + ), +) + +PARTITION_ITEM208: StaticSchema = ( + 18, + n0, + _s51, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM209, 0), + ), +) + +PARTITION_ITEM207: StaticSchema = ( + 18, + n0, + _s52, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM208, 0), + ), +) + +PARTITION_ITEM206: StaticSchema = ( + 18, + n0, + _s53, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM207, 0), + ), +) + +PARTITION_ITEM205: StaticSchema = ( + 18, + n0, + _s54, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM206, 0), + ), +) + +PARTITION_ITEM204: StaticSchema = ( + 18, + n0, + _s55, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM205, 0), + ), +) + +PARTITION_ITEM203: StaticSchema = ( + 18, + n0, + _s56, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM204, 0), + ), +) + +PARTITION_ITEM202: StaticSchema = ( + 18, + n0, + _s57, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM203, 0), + ), +) + +PARTITION_ITEM201: StaticSchema = ( + 18, + n0, + _s58, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM202, 0), + ), +) + +PARTITION_ITEM200: StaticSchema = ( + 18, + n0, + _s59, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM201, 0), + ), +) + +PARTITION_ITEM199: StaticSchema = ( + 18, + n0, + _s60, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM200, 0), + ), +) + +PARTITION_ITEM198: StaticSchema = ( + 18, + n0, + _s61, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM199, 0), + ), +) + +PARTITION_ITEM197: StaticSchema = ( + 18, + n0, + _s62, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM198, 0), + ), +) + +PARTITION_ITEM196: StaticSchema = ( + 18, + n0, + _s63, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM197, 0), + ), +) + +PARTITION_ITEM195: StaticSchema = ( + 18, + n0, + _s64, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM196, 0), + ), +) + +PARTITION_ITEM194: StaticSchema = ( + 18, + n0, + _s65, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM195, 0), + ), +) + +PARTITION_ITEM193: StaticSchema = ( + 18, + n0, + _s66, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM194, 0), + ), +) + +PARTITION_ITEM192: StaticSchema = ( + 18, + n0, + _s67, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM193, 0), + ), +) + +PARTITION_ITEM191: StaticSchema = ( + 18, + n0, + _s68, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM192, 0), + ), +) + +PARTITION_ITEM190: StaticSchema = ( + 18, + n0, + _s69, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM191, 0), + ), +) + +PARTITION_ITEM189: StaticSchema = ( + 18, + n0, + _s70, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM190, 0), + ), +) + +PARTITION_ITEM188: StaticSchema = ( + 18, + n0, + _s71, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM189, 0), + ), +) + +PARTITION_ITEM187: StaticSchema = ( + 18, + n0, + _s72, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM188, 0), + ), +) + +PARTITION_ITEM186: StaticSchema = ( + 18, + n0, + _s73, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM187, 0), + ), +) + +PARTITION_ITEM185: StaticSchema = ( + 18, + n0, + _s74, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM186, 0), + ), +) + +PARTITION_ITEM184: StaticSchema = ( + 18, + n0, + _s75, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM185, 0), + ), +) + +PARTITION_ITEM183: StaticSchema = ( + 18, + n0, + _s76, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM184, 0), + ), +) + +PARTITION_ITEM182: StaticSchema = ( + 18, + n0, + _s77, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM183, 0), + ), +) + +PARTITION_ITEM181: StaticSchema = ( + 18, + n0, + _s78, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM182, 0), + ), +) + +PARTITION_ITEM180: StaticSchema = ( + 18, + n0, + _s79, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM181, 0), + ), +) + +PARTITION_ITEM179: StaticSchema = ( + 18, + n0, + _s80, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM180, 0), + ), +) + +PARTITION_ITEM178: StaticSchema = ( + 18, + n0, + _s81, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM179, 0), + ), +) + +PARTITION_ITEM177: StaticSchema = ( + 18, + n0, + _s82, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM178, 0), + ), +) + +PARTITION_ITEM176: StaticSchema = ( + 18, + n0, + _s83, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM177, 0), + ), +) + +PARTITION_ITEM175: StaticSchema = ( + 18, + n0, + _s84, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM176, 0), + ), +) + +PARTITION_ITEM174: StaticSchema = ( + 18, + n0, + _s85, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM175, 0), + ), +) + +PARTITION_ITEM173: StaticSchema = ( + 18, + n0, + _s86, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM174, 0), + ), +) + +PARTITION_ITEM172: StaticSchema = ( + 18, + n0, + _s87, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM173, 0), + ), +) + +PARTITION_ITEM171: StaticSchema = ( + 18, + n0, + _s88, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM172, 0), + ), +) + +PARTITION_ITEM170: StaticSchema = ( + 18, + n0, + _s89, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM171, 0), + ), +) + +PARTITION_ITEM169: StaticSchema = ( + 18, + n0, + _s90, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM170, 0), + ), +) + +PARTITION_ITEM168: StaticSchema = ( + 18, + n0, + _s91, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM169, 0), + ), +) + +PARTITION_ITEM167: StaticSchema = ( + 18, + n0, + _s92, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM168, 0), + ), +) diff --git a/codegen-output-py/partitioned-types/src/partitioned_types/_private/schemas_1.py b/codegen-output-py/partitioned-types/src/partitioned_types/_private/schemas_1.py new file mode 100644 index 000000000..147cd400b --- /dev/null +++ b/codegen-output-py/partitioned-types/src/partitioned_types/_private/schemas_1.py @@ -0,0 +1,1447 @@ +from smithy_core._schema_compact import StaticSchema + +from . import schemas + +n0 = "example" +_s1 = "value" +_s2 = "next" +_s93 = "PartitionItem166" +_s94 = "PartitionItem165" +_s95 = "PartitionItem164" +_s96 = "PartitionItem163" +_s97 = "PartitionItem162" +_s98 = "PartitionItem161" +_s99 = "PartitionItem160" +_s100 = "PartitionItem159" +_s101 = "PartitionItem158" +_s102 = "PartitionItem157" +_s103 = "PartitionItem156" +_s104 = "PartitionItem155" +_s105 = "PartitionItem154" +_s106 = "PartitionItem153" +_s107 = "PartitionItem152" +_s108 = "PartitionItem151" +_s109 = "PartitionItem150" +_s110 = "PartitionItem149" +_s111 = "PartitionItem148" +_s112 = "PartitionItem147" +_s113 = "PartitionItem146" +_s114 = "PartitionItem145" +_s115 = "PartitionItem144" +_s116 = "PartitionItem143" +_s117 = "PartitionItem142" +_s118 = "PartitionItem141" +_s119 = "PartitionItem140" +_s120 = "PartitionItem139" +_s121 = "PartitionItem138" +_s122 = "PartitionItem137" +_s123 = "PartitionItem136" +_s124 = "PartitionItem135" +_s125 = "PartitionItem134" +_s126 = "PartitionItem133" +_s127 = "PartitionItem132" +_s128 = "PartitionItem131" +_s129 = "PartitionItem130" +_s130 = "PartitionItem129" +_s131 = "PartitionItem128" +_s132 = "PartitionItem127" +_s133 = "PartitionItem126" +_s134 = "PartitionItem125" +_s135 = "PartitionItem124" +_s136 = "PartitionItem123" +_s137 = "PartitionItem122" +_s138 = "PartitionItem121" +_s139 = "PartitionItem120" +_s140 = "PartitionItem119" +_s141 = "PartitionItem118" +_s142 = "PartitionItem117" +_s143 = "PartitionItem116" +_s144 = "PartitionItem115" +_s145 = "PartitionItem114" +_s146 = "PartitionItem113" +_s147 = "PartitionItem112" +_s148 = "PartitionItem111" +_s149 = "PartitionItem110" +_s150 = "PartitionItem109" +_s151 = "PartitionItem108" +_s152 = "PartitionItem107" +_s153 = "PartitionItem106" +_s154 = "PartitionItem105" +_s155 = "PartitionItem104" +_s156 = "PartitionItem103" +_s157 = "PartitionItem102" +_s158 = "PartitionItem101" +_s159 = "PartitionItem100" +_s160 = "PartitionItem099" +_s161 = "PartitionItem098" +_s162 = "PartitionItem097" +_s163 = "PartitionItem096" +_s164 = "PartitionItem095" +_s165 = "PartitionItem094" +_s166 = "PartitionItem093" +_s167 = "PartitionItem092" +_s168 = "PartitionItem091" +_s169 = "PartitionItem090" +_s170 = "PartitionItem089" +_s171 = "PartitionItem088" +_s172 = "PartitionItem087" +_s173 = "PartitionItem086" +_s174 = "PartitionItem085" +_s175 = "PartitionItem084" +_s176 = "PartitionItem083" +_s177 = "PartitionItem082" +_s178 = "PartitionItem081" +_s179 = "PartitionItem080" +_s180 = "PartitionItem079" +_s181 = "PartitionItem078" +_s182 = "PartitionItem077" + +PARTITION_ITEM166: StaticSchema = ( + 18, + n0, + _s93, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (lambda: schemas.PARTITION_ITEM167, 0), + ), +) + +PARTITION_ITEM165: StaticSchema = ( + 18, + n0, + _s94, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM166, 0), + ), +) + +PARTITION_ITEM164: StaticSchema = ( + 18, + n0, + _s95, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM165, 0), + ), +) + +PARTITION_ITEM163: StaticSchema = ( + 18, + n0, + _s96, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM164, 0), + ), +) + +PARTITION_ITEM162: StaticSchema = ( + 18, + n0, + _s97, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM163, 0), + ), +) + +PARTITION_ITEM161: StaticSchema = ( + 18, + n0, + _s98, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM162, 0), + ), +) + +PARTITION_ITEM160: StaticSchema = ( + 18, + n0, + _s99, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM161, 0), + ), +) + +PARTITION_ITEM159: StaticSchema = ( + 18, + n0, + _s100, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM160, 0), + ), +) + +PARTITION_ITEM158: StaticSchema = ( + 18, + n0, + _s101, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM159, 0), + ), +) + +PARTITION_ITEM157: StaticSchema = ( + 18, + n0, + _s102, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM158, 0), + ), +) + +PARTITION_ITEM156: StaticSchema = ( + 18, + n0, + _s103, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM157, 0), + ), +) + +PARTITION_ITEM155: StaticSchema = ( + 18, + n0, + _s104, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM156, 0), + ), +) + +PARTITION_ITEM154: StaticSchema = ( + 18, + n0, + _s105, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM155, 0), + ), +) + +PARTITION_ITEM153: StaticSchema = ( + 18, + n0, + _s106, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM154, 0), + ), +) + +PARTITION_ITEM152: StaticSchema = ( + 18, + n0, + _s107, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM153, 0), + ), +) + +PARTITION_ITEM151: StaticSchema = ( + 18, + n0, + _s108, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM152, 0), + ), +) + +PARTITION_ITEM150: StaticSchema = ( + 18, + n0, + _s109, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM151, 0), + ), +) + +PARTITION_ITEM149: StaticSchema = ( + 18, + n0, + _s110, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM150, 0), + ), +) + +PARTITION_ITEM148: StaticSchema = ( + 18, + n0, + _s111, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM149, 0), + ), +) + +PARTITION_ITEM147: StaticSchema = ( + 18, + n0, + _s112, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM148, 0), + ), +) + +PARTITION_ITEM146: StaticSchema = ( + 18, + n0, + _s113, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM147, 0), + ), +) + +PARTITION_ITEM145: StaticSchema = ( + 18, + n0, + _s114, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM146, 0), + ), +) + +PARTITION_ITEM144: StaticSchema = ( + 18, + n0, + _s115, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM145, 0), + ), +) + +PARTITION_ITEM143: StaticSchema = ( + 18, + n0, + _s116, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM144, 0), + ), +) + +PARTITION_ITEM142: StaticSchema = ( + 18, + n0, + _s117, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM143, 0), + ), +) + +PARTITION_ITEM141: StaticSchema = ( + 18, + n0, + _s118, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM142, 0), + ), +) + +PARTITION_ITEM140: StaticSchema = ( + 18, + n0, + _s119, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM141, 0), + ), +) + +PARTITION_ITEM139: StaticSchema = ( + 18, + n0, + _s120, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM140, 0), + ), +) + +PARTITION_ITEM138: StaticSchema = ( + 18, + n0, + _s121, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM139, 0), + ), +) + +PARTITION_ITEM137: StaticSchema = ( + 18, + n0, + _s122, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM138, 0), + ), +) + +PARTITION_ITEM136: StaticSchema = ( + 18, + n0, + _s123, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM137, 0), + ), +) + +PARTITION_ITEM135: StaticSchema = ( + 18, + n0, + _s124, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM136, 0), + ), +) + +PARTITION_ITEM134: StaticSchema = ( + 18, + n0, + _s125, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM135, 0), + ), +) + +PARTITION_ITEM133: StaticSchema = ( + 18, + n0, + _s126, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM134, 0), + ), +) + +PARTITION_ITEM132: StaticSchema = ( + 18, + n0, + _s127, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM133, 0), + ), +) + +PARTITION_ITEM131: StaticSchema = ( + 18, + n0, + _s128, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM132, 0), + ), +) + +PARTITION_ITEM130: StaticSchema = ( + 18, + n0, + _s129, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM131, 0), + ), +) + +PARTITION_ITEM129: StaticSchema = ( + 18, + n0, + _s130, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM130, 0), + ), +) + +PARTITION_ITEM128: StaticSchema = ( + 18, + n0, + _s131, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM129, 0), + ), +) + +PARTITION_ITEM127: StaticSchema = ( + 18, + n0, + _s132, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM128, 0), + ), +) + +PARTITION_ITEM126: StaticSchema = ( + 18, + n0, + _s133, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM127, 0), + ), +) + +PARTITION_ITEM125: StaticSchema = ( + 18, + n0, + _s134, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM126, 0), + ), +) + +PARTITION_ITEM124: StaticSchema = ( + 18, + n0, + _s135, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM125, 0), + ), +) + +PARTITION_ITEM123: StaticSchema = ( + 18, + n0, + _s136, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM124, 0), + ), +) + +PARTITION_ITEM122: StaticSchema = ( + 18, + n0, + _s137, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM123, 0), + ), +) + +PARTITION_ITEM121: StaticSchema = ( + 18, + n0, + _s138, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM122, 0), + ), +) + +PARTITION_ITEM120: StaticSchema = ( + 18, + n0, + _s139, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM121, 0), + ), +) + +PARTITION_ITEM119: StaticSchema = ( + 18, + n0, + _s140, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM120, 0), + ), +) + +PARTITION_ITEM118: StaticSchema = ( + 18, + n0, + _s141, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM119, 0), + ), +) + +PARTITION_ITEM117: StaticSchema = ( + 18, + n0, + _s142, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM118, 0), + ), +) + +PARTITION_ITEM116: StaticSchema = ( + 18, + n0, + _s143, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM117, 0), + ), +) + +PARTITION_ITEM115: StaticSchema = ( + 18, + n0, + _s144, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM116, 0), + ), +) + +PARTITION_ITEM114: StaticSchema = ( + 18, + n0, + _s145, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM115, 0), + ), +) + +PARTITION_ITEM113: StaticSchema = ( + 18, + n0, + _s146, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM114, 0), + ), +) + +PARTITION_ITEM112: StaticSchema = ( + 18, + n0, + _s147, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM113, 0), + ), +) + +PARTITION_ITEM111: StaticSchema = ( + 18, + n0, + _s148, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM112, 0), + ), +) + +PARTITION_ITEM110: StaticSchema = ( + 18, + n0, + _s149, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM111, 0), + ), +) + +PARTITION_ITEM109: StaticSchema = ( + 18, + n0, + _s150, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM110, 0), + ), +) + +PARTITION_ITEM108: StaticSchema = ( + 18, + n0, + _s151, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM109, 0), + ), +) + +PARTITION_ITEM107: StaticSchema = ( + 18, + n0, + _s152, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM108, 0), + ), +) + +PARTITION_ITEM106: StaticSchema = ( + 18, + n0, + _s153, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM107, 0), + ), +) + +PARTITION_ITEM105: StaticSchema = ( + 18, + n0, + _s154, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM106, 0), + ), +) + +PARTITION_ITEM104: StaticSchema = ( + 18, + n0, + _s155, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM105, 0), + ), +) + +PARTITION_ITEM103: StaticSchema = ( + 18, + n0, + _s156, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM104, 0), + ), +) + +PARTITION_ITEM102: StaticSchema = ( + 18, + n0, + _s157, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM103, 0), + ), +) + +PARTITION_ITEM101: StaticSchema = ( + 18, + n0, + _s158, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM102, 0), + ), +) + +PARTITION_ITEM100: StaticSchema = ( + 18, + n0, + _s159, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM101, 0), + ), +) + +PARTITION_ITEM099: StaticSchema = ( + 18, + n0, + _s160, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM100, 0), + ), +) + +PARTITION_ITEM098: StaticSchema = ( + 18, + n0, + _s161, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM099, 0), + ), +) + +PARTITION_ITEM097: StaticSchema = ( + 18, + n0, + _s162, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM098, 0), + ), +) + +PARTITION_ITEM096: StaticSchema = ( + 18, + n0, + _s163, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM097, 0), + ), +) + +PARTITION_ITEM095: StaticSchema = ( + 18, + n0, + _s164, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM096, 0), + ), +) + +PARTITION_ITEM094: StaticSchema = ( + 18, + n0, + _s165, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM095, 0), + ), +) + +PARTITION_ITEM093: StaticSchema = ( + 18, + n0, + _s166, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM094, 0), + ), +) + +PARTITION_ITEM092: StaticSchema = ( + 18, + n0, + _s167, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM093, 0), + ), +) + +PARTITION_ITEM091: StaticSchema = ( + 18, + n0, + _s168, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM092, 0), + ), +) + +PARTITION_ITEM090: StaticSchema = ( + 18, + n0, + _s169, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM091, 0), + ), +) + +PARTITION_ITEM089: StaticSchema = ( + 18, + n0, + _s170, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM090, 0), + ), +) + +PARTITION_ITEM088: StaticSchema = ( + 18, + n0, + _s171, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM089, 0), + ), +) + +PARTITION_ITEM087: StaticSchema = ( + 18, + n0, + _s172, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM088, 0), + ), +) + +PARTITION_ITEM086: StaticSchema = ( + 18, + n0, + _s173, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM087, 0), + ), +) + +PARTITION_ITEM085: StaticSchema = ( + 18, + n0, + _s174, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM086, 0), + ), +) + +PARTITION_ITEM084: StaticSchema = ( + 18, + n0, + _s175, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM085, 0), + ), +) + +PARTITION_ITEM083: StaticSchema = ( + 18, + n0, + _s176, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM084, 0), + ), +) + +PARTITION_ITEM082: StaticSchema = ( + 18, + n0, + _s177, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM083, 0), + ), +) + +PARTITION_ITEM081: StaticSchema = ( + 18, + n0, + _s178, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM082, 0), + ), +) + +PARTITION_ITEM080: StaticSchema = ( + 18, + n0, + _s179, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM081, 0), + ), +) + +PARTITION_ITEM079: StaticSchema = ( + 18, + n0, + _s180, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM080, 0), + ), +) + +PARTITION_ITEM078: StaticSchema = ( + 18, + n0, + _s181, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM079, 0), + ), +) + +PARTITION_ITEM077: StaticSchema = ( + 18, + n0, + _s182, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM078, 0), + ), +) diff --git a/codegen-output-py/partitioned-types/src/partitioned_types/_private/schemas_2.py b/codegen-output-py/partitioned-types/src/partitioned_types/_private/schemas_2.py new file mode 100644 index 000000000..e5e0fbcbd --- /dev/null +++ b/codegen-output-py/partitioned-types/src/partitioned_types/_private/schemas_2.py @@ -0,0 +1,1462 @@ +from smithy_core._schema_compact import StaticSchema + +from . import schemas + +n0 = "example" +_s1 = "value" +_s2 = "next" +_s183 = "PartitionItem076" +_s184 = "PartitionItem075" +_s185 = "PartitionItem074" +_s186 = "PartitionItem073" +_s187 = "PartitionItem072" +_s188 = "PartitionItem071" +_s189 = "PartitionItem070" +_s190 = "PartitionItem069" +_s191 = "PartitionItem068" +_s192 = "PartitionItem067" +_s193 = "PartitionItem066" +_s194 = "PartitionItem065" +_s195 = "PartitionItem064" +_s196 = "PartitionItem063" +_s197 = "PartitionItem062" +_s198 = "PartitionItem061" +_s199 = "PartitionItem060" +_s200 = "PartitionItem059" +_s201 = "PartitionItem058" +_s202 = "PartitionItem057" +_s203 = "PartitionItem056" +_s204 = "PartitionItem055" +_s205 = "PartitionItem054" +_s206 = "PartitionItem053" +_s207 = "PartitionItem052" +_s208 = "PartitionItem051" +_s209 = "PartitionItem050" +_s210 = "PartitionItem049" +_s211 = "PartitionItem048" +_s212 = "PartitionItem047" +_s213 = "PartitionItem046" +_s214 = "PartitionItem045" +_s215 = "PartitionItem044" +_s216 = "PartitionItem043" +_s217 = "PartitionItem042" +_s218 = "PartitionItem041" +_s219 = "PartitionItem040" +_s220 = "PartitionItem039" +_s221 = "PartitionItem038" +_s222 = "PartitionItem037" +_s223 = "PartitionItem036" +_s224 = "PartitionItem035" +_s225 = "PartitionItem034" +_s226 = "PartitionItem033" +_s227 = "PartitionItem032" +_s228 = "PartitionItem031" +_s229 = "PartitionItem030" +_s230 = "PartitionItem029" +_s231 = "PartitionItem028" +_s232 = "PartitionItem027" +_s233 = "PartitionItem026" +_s234 = "PartitionItem025" +_s235 = "PartitionItem024" +_s236 = "PartitionItem023" +_s237 = "PartitionItem022" +_s238 = "PartitionItem021" +_s239 = "PartitionItem020" +_s240 = "PartitionItem019" +_s241 = "PartitionItem018" +_s242 = "PartitionItem017" +_s243 = "PartitionItem016" +_s244 = "PartitionItem015" +_s245 = "PartitionItem014" +_s246 = "PartitionItem013" +_s247 = "PartitionItem012" +_s248 = "PartitionItem011" +_s249 = "PartitionItem010" +_s250 = "PartitionItem009" +_s251 = "PartitionItem008" +_s252 = "PartitionItem007" +_s253 = "PartitionItem006" +_s254 = "PartitionItem005" +_s255 = "PartitionItem004" +_s256 = "PartitionItem003" +_s257 = "PartitionItem002" +_s258 = "PartitionItem001" +_s259 = "PartitionItem000" +_s260 = "GetExampleInput" +_s261 = "smithy.api#input" +_s262 = "id" +_s263 = "partitioned" +_s264 = "TagList" +_s265 = "member" +_s266 = "Attributes" +_s267 = "key" +_s268 = "Value" +_s269 = "text" +_s270 = "number" +_s271 = "empty" +_s272 = "Status" +_s273 = "ACTIVE" +_s274 = "smithy.api#enumValue" +_s275 = "active" +_s276 = "INACTIVE" +_s277 = "inactive" +_s278 = "Code" +_s279 = "OK" +_s280 = "NOT_FOUND" +_s281 = "Example" +_s282 = "name" +_s283 = "count" +_s284 = "tags" +_s285 = "attributes" +_s286 = "choice" +_s287 = "status" +_s288 = "code" +_s289 = "EventStream" +_s290 = "smithy.api#streaming" +_s291 = "GetExampleOutput" +_s292 = "smithy.api#output" +_s293 = "events" +_s294 = "ExampleError" +_s295 = "smithy.api#error" +_s296 = "client" +_s297 = "message" +_s298 = "retryAfterSeconds" +_s299 = "PartitionItem258" +_s300 = "PartitionItem259" + +PARTITION_ITEM076: StaticSchema = ( + 18, + n0, + _s183, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (lambda: schemas.PARTITION_ITEM077, 0), + ), +) + +PARTITION_ITEM075: StaticSchema = ( + 18, + n0, + _s184, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM076, 0), + ), +) + +PARTITION_ITEM074: StaticSchema = ( + 18, + n0, + _s185, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM075, 0), + ), +) + +PARTITION_ITEM073: StaticSchema = ( + 18, + n0, + _s186, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM074, 0), + ), +) + +PARTITION_ITEM072: StaticSchema = ( + 18, + n0, + _s187, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM073, 0), + ), +) + +PARTITION_ITEM071: StaticSchema = ( + 18, + n0, + _s188, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM072, 0), + ), +) + +PARTITION_ITEM070: StaticSchema = ( + 18, + n0, + _s189, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM071, 0), + ), +) + +PARTITION_ITEM069: StaticSchema = ( + 18, + n0, + _s190, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM070, 0), + ), +) + +PARTITION_ITEM068: StaticSchema = ( + 18, + n0, + _s191, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM069, 0), + ), +) + +PARTITION_ITEM067: StaticSchema = ( + 18, + n0, + _s192, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM068, 0), + ), +) + +PARTITION_ITEM066: StaticSchema = ( + 18, + n0, + _s193, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM067, 0), + ), +) + +PARTITION_ITEM065: StaticSchema = ( + 18, + n0, + _s194, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM066, 0), + ), +) + +PARTITION_ITEM064: StaticSchema = ( + 18, + n0, + _s195, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM065, 0), + ), +) + +PARTITION_ITEM063: StaticSchema = ( + 18, + n0, + _s196, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM064, 0), + ), +) + +PARTITION_ITEM062: StaticSchema = ( + 18, + n0, + _s197, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM063, 0), + ), +) + +PARTITION_ITEM061: StaticSchema = ( + 18, + n0, + _s198, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM062, 0), + ), +) + +PARTITION_ITEM060: StaticSchema = ( + 18, + n0, + _s199, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM061, 0), + ), +) + +PARTITION_ITEM059: StaticSchema = ( + 18, + n0, + _s200, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM060, 0), + ), +) + +PARTITION_ITEM058: StaticSchema = ( + 18, + n0, + _s201, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM059, 0), + ), +) + +PARTITION_ITEM057: StaticSchema = ( + 18, + n0, + _s202, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM058, 0), + ), +) + +PARTITION_ITEM056: StaticSchema = ( + 18, + n0, + _s203, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM057, 0), + ), +) + +PARTITION_ITEM055: StaticSchema = ( + 18, + n0, + _s204, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM056, 0), + ), +) + +PARTITION_ITEM054: StaticSchema = ( + 18, + n0, + _s205, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM055, 0), + ), +) + +PARTITION_ITEM053: StaticSchema = ( + 18, + n0, + _s206, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM054, 0), + ), +) + +PARTITION_ITEM052: StaticSchema = ( + 18, + n0, + _s207, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM053, 0), + ), +) + +PARTITION_ITEM051: StaticSchema = ( + 18, + n0, + _s208, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM052, 0), + ), +) + +PARTITION_ITEM050: StaticSchema = ( + 18, + n0, + _s209, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM051, 0), + ), +) + +PARTITION_ITEM049: StaticSchema = ( + 18, + n0, + _s210, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM050, 0), + ), +) + +PARTITION_ITEM048: StaticSchema = ( + 18, + n0, + _s211, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM049, 0), + ), +) + +PARTITION_ITEM047: StaticSchema = ( + 18, + n0, + _s212, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM048, 0), + ), +) + +PARTITION_ITEM046: StaticSchema = ( + 18, + n0, + _s213, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM047, 0), + ), +) + +PARTITION_ITEM045: StaticSchema = ( + 18, + n0, + _s214, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM046, 0), + ), +) + +PARTITION_ITEM044: StaticSchema = ( + 18, + n0, + _s215, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM045, 0), + ), +) + +PARTITION_ITEM043: StaticSchema = ( + 18, + n0, + _s216, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM044, 0), + ), +) + +PARTITION_ITEM042: StaticSchema = ( + 18, + n0, + _s217, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM043, 0), + ), +) + +PARTITION_ITEM041: StaticSchema = ( + 18, + n0, + _s218, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM042, 0), + ), +) + +PARTITION_ITEM040: StaticSchema = ( + 18, + n0, + _s219, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM041, 0), + ), +) + +PARTITION_ITEM039: StaticSchema = ( + 18, + n0, + _s220, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM040, 0), + ), +) + +PARTITION_ITEM038: StaticSchema = ( + 18, + n0, + _s221, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM039, 0), + ), +) + +PARTITION_ITEM037: StaticSchema = ( + 18, + n0, + _s222, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM038, 0), + ), +) + +PARTITION_ITEM036: StaticSchema = ( + 18, + n0, + _s223, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM037, 0), + ), +) + +PARTITION_ITEM035: StaticSchema = ( + 18, + n0, + _s224, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM036, 0), + ), +) + +PARTITION_ITEM034: StaticSchema = ( + 18, + n0, + _s225, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM035, 0), + ), +) + +PARTITION_ITEM033: StaticSchema = ( + 18, + n0, + _s226, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM034, 0), + ), +) + +PARTITION_ITEM032: StaticSchema = ( + 18, + n0, + _s227, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM033, 0), + ), +) + +PARTITION_ITEM031: StaticSchema = ( + 18, + n0, + _s228, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM032, 0), + ), +) + +PARTITION_ITEM030: StaticSchema = ( + 18, + n0, + _s229, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM031, 0), + ), +) + +PARTITION_ITEM029: StaticSchema = ( + 18, + n0, + _s230, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM030, 0), + ), +) + +PARTITION_ITEM028: StaticSchema = ( + 18, + n0, + _s231, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM029, 0), + ), +) + +PARTITION_ITEM027: StaticSchema = ( + 18, + n0, + _s232, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM028, 0), + ), +) + +PARTITION_ITEM026: StaticSchema = ( + 18, + n0, + _s233, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM027, 0), + ), +) + +PARTITION_ITEM025: StaticSchema = ( + 18, + n0, + _s234, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM026, 0), + ), +) + +PARTITION_ITEM024: StaticSchema = ( + 18, + n0, + _s235, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM025, 0), + ), +) + +PARTITION_ITEM023: StaticSchema = ( + 18, + n0, + _s236, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM024, 0), + ), +) + +PARTITION_ITEM022: StaticSchema = ( + 18, + n0, + _s237, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM023, 0), + ), +) + +PARTITION_ITEM021: StaticSchema = ( + 18, + n0, + _s238, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM022, 0), + ), +) + +PARTITION_ITEM020: StaticSchema = ( + 18, + n0, + _s239, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM021, 0), + ), +) + +PARTITION_ITEM019: StaticSchema = ( + 18, + n0, + _s240, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM020, 0), + ), +) + +PARTITION_ITEM018: StaticSchema = ( + 18, + n0, + _s241, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM019, 0), + ), +) + +PARTITION_ITEM017: StaticSchema = ( + 18, + n0, + _s242, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM018, 0), + ), +) + +PARTITION_ITEM016: StaticSchema = ( + 18, + n0, + _s243, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM017, 0), + ), +) + +PARTITION_ITEM015: StaticSchema = ( + 18, + n0, + _s244, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM016, 0), + ), +) + +PARTITION_ITEM014: StaticSchema = ( + 18, + n0, + _s245, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM015, 0), + ), +) + +PARTITION_ITEM013: StaticSchema = ( + 18, + n0, + _s246, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM014, 0), + ), +) + +PARTITION_ITEM012: StaticSchema = ( + 18, + n0, + _s247, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM013, 0), + ), +) + +PARTITION_ITEM011: StaticSchema = ( + 18, + n0, + _s248, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM012, 0), + ), +) + +PARTITION_ITEM010: StaticSchema = ( + 18, + n0, + _s249, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM011, 0), + ), +) + +PARTITION_ITEM009: StaticSchema = ( + 18, + n0, + _s250, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM010, 0), + ), +) + +PARTITION_ITEM008: StaticSchema = ( + 18, + n0, + _s251, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM009, 0), + ), +) + +PARTITION_ITEM007: StaticSchema = ( + 18, + n0, + _s252, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM008, 0), + ), +) + +PARTITION_ITEM006: StaticSchema = ( + 18, + n0, + _s253, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM007, 0), + ), +) + +PARTITION_ITEM005: StaticSchema = ( + 18, + n0, + _s254, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM006, 0), + ), +) + +PARTITION_ITEM004: StaticSchema = ( + 18, + n0, + _s255, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM005, 0), + ), +) + +PARTITION_ITEM003: StaticSchema = ( + 18, + n0, + _s256, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM004, 0), + ), +) + +PARTITION_ITEM002: StaticSchema = ( + 18, + n0, + _s257, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM003, 0), + ), +) + +PARTITION_ITEM001: StaticSchema = ( + 18, + n0, + _s258, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM002, 0), + ), +) + +PARTITION_ITEM000: StaticSchema = ( + 18, + n0, + _s259, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM001, 0), + ), +) + +GET_EXAMPLE_INPUT: StaticSchema = ( + 18, + n0, + _s260, + {_s261: None}, + ( + _s262, + _s263, + ), + ( + (3, 1), + (PARTITION_ITEM000, 0), + ), +) + +GET_EXAMPLE_OUTPUT: StaticSchema = ( + 18, + n0, + _s291, + {_s292: None}, + ( + n0, + _s1, + _s293, + ), + ( + (lambda: RENAMED_EXAMPLE, 0), + (lambda: EXAMPLE_VALUE, 0), + (lambda: EVENT_STREAM, 0), + ), +) + +TAG_LIST: StaticSchema = ( + 16, + n0, + _s264, + 0, + (_s265,), + ((3, 0),), +) + +ATTRIBUTES: StaticSchema = ( + 17, + n0, + _s266, + 0, + ( + _s267, + _s1, + ), + ( + (3, 0), + (13, 0), + ), +) + +EXAMPLE_VALUE: StaticSchema = ( + 19, + n0, + _s268, + 0, + ( + _s269, + _s270, + _s271, + ), + ( + (3, 0), + (7, 0), + (-1, 0), + ), +) + +STATUS: StaticSchema = ( + 14, + n0, + _s272, + 0, + ( + _s273, + _s276, + ), + ( + (-1, {_s274: _s275}), + (-1, {_s274: _s277}), + ), +) + +CODE: StaticSchema = ( + 15, + n0, + _s278, + 0, + ( + _s279, + _s280, + ), + ( + (-1, {_s274: 200}), + (-1, {_s274: 404}), + ), +) + +RENAMED_EXAMPLE: StaticSchema = ( + 18, + n0, + _s281, + 0, + ( + _s282, + _s283, + _s284, + _s285, + _s286, + _s287, + _s288, + ), + ( + (3, 1), + (-5, 0), + (TAG_LIST, 0), + (ATTRIBUTES, 0), + (EXAMPLE_VALUE, 0), + (STATUS, 0), + (CODE, 0), + ), +) + +EVENT_STREAM: StaticSchema = ( + 19, + n0, + _s289, + {_s290: None}, + (n0,), + ((RENAMED_EXAMPLE, 0),), +) + +EXAMPLE_ERROR: StaticSchema = ( + 18, + n0, + _s294, + {_s295: _s296}, + ( + _s297, + _s298, + ), + ( + (3, 0), + (7, 0), + ), +) + +PARTITION_ITEM258: StaticSchema = ( + 18, + n0, + _s299, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (lambda: PARTITION_ITEM259, 0), + ), +) + +PARTITION_ITEM259: StaticSchema = ( + 18, + n0, + _s300, + 0, + ( + _s1, + _s2, + ), + ( + (3, 0), + (PARTITION_ITEM258, 0), + ), +) diff --git a/codegen-output-py/partitioned-types/src/partitioned_types/models.py b/codegen-output-py/partitioned-types/src/partitioned_types/models.py new file mode 100644 index 000000000..3ef128f5d --- /dev/null +++ b/codegen-output-py/partitioned-types/src/partitioned_types/models.py @@ -0,0 +1,597 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "GetExampleInput": "GET_EXAMPLE_INPUT", + "GetExampleOutput": "GET_EXAMPLE_OUTPUT", + "ExampleError": "EXAMPLE_ERROR", + "RenamedExample": "RENAMED_EXAMPLE", + "ExampleValue": "EXAMPLE_VALUE", + "ExampleValueText": "EXAMPLE_VALUE", + "ExampleValueNumber": "EXAMPLE_VALUE", + "ExampleValueEmpty": "EXAMPLE_VALUE", + "ExampleValueUnknown": "EXAMPLE_VALUE", + "EventStream": "EVENT_STREAM", + "EventStreamExample": "EVENT_STREAM", + "EventStreamUnknown": "EVENT_STREAM", + "Status": "STATUS", + "Code": "CODE", + "PartitionItem000": "PARTITION_ITEM000", + "PartitionItem001": "PARTITION_ITEM001", + "PartitionItem002": "PARTITION_ITEM002", + "PartitionItem003": "PARTITION_ITEM003", + "PartitionItem004": "PARTITION_ITEM004", + "PartitionItem005": "PARTITION_ITEM005", + "PartitionItem006": "PARTITION_ITEM006", + "PartitionItem007": "PARTITION_ITEM007", + "PartitionItem008": "PARTITION_ITEM008", + "PartitionItem009": "PARTITION_ITEM009", + "PartitionItem010": "PARTITION_ITEM010", + "PartitionItem011": "PARTITION_ITEM011", + "PartitionItem012": "PARTITION_ITEM012", + "PartitionItem013": "PARTITION_ITEM013", + "PartitionItem014": "PARTITION_ITEM014", + "PartitionItem015": "PARTITION_ITEM015", + "PartitionItem016": "PARTITION_ITEM016", + "PartitionItem017": "PARTITION_ITEM017", + "PartitionItem018": "PARTITION_ITEM018", + "PartitionItem019": "PARTITION_ITEM019", + "PartitionItem020": "PARTITION_ITEM020", + "PartitionItem021": "PARTITION_ITEM021", + "PartitionItem022": "PARTITION_ITEM022", + "PartitionItem023": "PARTITION_ITEM023", + "PartitionItem024": "PARTITION_ITEM024", + "PartitionItem025": "PARTITION_ITEM025", + "PartitionItem026": "PARTITION_ITEM026", + "PartitionItem027": "PARTITION_ITEM027", + "PartitionItem028": "PARTITION_ITEM028", + "PartitionItem029": "PARTITION_ITEM029", + "PartitionItem030": "PARTITION_ITEM030", + "PartitionItem031": "PARTITION_ITEM031", + "PartitionItem032": "PARTITION_ITEM032", + "PartitionItem033": "PARTITION_ITEM033", + "PartitionItem034": "PARTITION_ITEM034", + "PartitionItem035": "PARTITION_ITEM035", + "PartitionItem036": "PARTITION_ITEM036", + "PartitionItem037": "PARTITION_ITEM037", + "PartitionItem038": "PARTITION_ITEM038", + "PartitionItem039": "PARTITION_ITEM039", + "PartitionItem040": "PARTITION_ITEM040", + "PartitionItem041": "PARTITION_ITEM041", + "PartitionItem042": "PARTITION_ITEM042", + "PartitionItem043": "PARTITION_ITEM043", + "PartitionItem044": "PARTITION_ITEM044", + "PartitionItem045": "PARTITION_ITEM045", + "PartitionItem046": "PARTITION_ITEM046", + "PartitionItem047": "PARTITION_ITEM047", + "PartitionItem048": "PARTITION_ITEM048", + "PartitionItem049": "PARTITION_ITEM049", + "PartitionItem050": "PARTITION_ITEM050", + "PartitionItem051": "PARTITION_ITEM051", + "PartitionItem052": "PARTITION_ITEM052", + "PartitionItem053": "PARTITION_ITEM053", + "PartitionItem054": "PARTITION_ITEM054", + "PartitionItem055": "PARTITION_ITEM055", + "PartitionItem056": "PARTITION_ITEM056", + "PartitionItem057": "PARTITION_ITEM057", + "PartitionItem058": "PARTITION_ITEM058", + "PartitionItem059": "PARTITION_ITEM059", + "PartitionItem060": "PARTITION_ITEM060", + "PartitionItem061": "PARTITION_ITEM061", + "PartitionItem062": "PARTITION_ITEM062", + "PartitionItem063": "PARTITION_ITEM063", + "PartitionItem064": "PARTITION_ITEM064", + "PartitionItem065": "PARTITION_ITEM065", + "PartitionItem066": "PARTITION_ITEM066", + "PartitionItem067": "PARTITION_ITEM067", + "PartitionItem068": "PARTITION_ITEM068", + "PartitionItem069": "PARTITION_ITEM069", + "PartitionItem070": "PARTITION_ITEM070", + "PartitionItem071": "PARTITION_ITEM071", + "PartitionItem072": "PARTITION_ITEM072", + "PartitionItem073": "PARTITION_ITEM073", + "PartitionItem074": "PARTITION_ITEM074", + "PartitionItem075": "PARTITION_ITEM075", + "PartitionItem076": "PARTITION_ITEM076", + "PartitionItem077": "PARTITION_ITEM077", + "PartitionItem078": "PARTITION_ITEM078", + "PartitionItem079": "PARTITION_ITEM079", + "PartitionItem080": "PARTITION_ITEM080", + "PartitionItem081": "PARTITION_ITEM081", + "PartitionItem082": "PARTITION_ITEM082", + "PartitionItem083": "PARTITION_ITEM083", + "PartitionItem084": "PARTITION_ITEM084", + "PartitionItem085": "PARTITION_ITEM085", + "PartitionItem086": "PARTITION_ITEM086", + "PartitionItem087": "PARTITION_ITEM087", + "PartitionItem088": "PARTITION_ITEM088", + "PartitionItem089": "PARTITION_ITEM089", + "PartitionItem090": "PARTITION_ITEM090", + "PartitionItem091": "PARTITION_ITEM091", + "PartitionItem092": "PARTITION_ITEM092", + "PartitionItem093": "PARTITION_ITEM093", + "PartitionItem094": "PARTITION_ITEM094", + "PartitionItem095": "PARTITION_ITEM095", + "PartitionItem096": "PARTITION_ITEM096", + "PartitionItem097": "PARTITION_ITEM097", + "PartitionItem098": "PARTITION_ITEM098", + "PartitionItem099": "PARTITION_ITEM099", + "PartitionItem100": "PARTITION_ITEM100", + "PartitionItem101": "PARTITION_ITEM101", + "PartitionItem102": "PARTITION_ITEM102", + "PartitionItem103": "PARTITION_ITEM103", + "PartitionItem104": "PARTITION_ITEM104", + "PartitionItem105": "PARTITION_ITEM105", + "PartitionItem106": "PARTITION_ITEM106", + "PartitionItem107": "PARTITION_ITEM107", + "PartitionItem108": "PARTITION_ITEM108", + "PartitionItem109": "PARTITION_ITEM109", + "PartitionItem110": "PARTITION_ITEM110", + "PartitionItem111": "PARTITION_ITEM111", + "PartitionItem112": "PARTITION_ITEM112", + "PartitionItem113": "PARTITION_ITEM113", + "PartitionItem114": "PARTITION_ITEM114", + "PartitionItem115": "PARTITION_ITEM115", + "PartitionItem116": "PARTITION_ITEM116", + "PartitionItem117": "PARTITION_ITEM117", + "PartitionItem118": "PARTITION_ITEM118", + "PartitionItem119": "PARTITION_ITEM119", + "PartitionItem120": "PARTITION_ITEM120", + "PartitionItem121": "PARTITION_ITEM121", + "PartitionItem122": "PARTITION_ITEM122", + "PartitionItem123": "PARTITION_ITEM123", + "PartitionItem124": "PARTITION_ITEM124", + "PartitionItem125": "PARTITION_ITEM125", + "PartitionItem126": "PARTITION_ITEM126", + "PartitionItem127": "PARTITION_ITEM127", + "PartitionItem128": "PARTITION_ITEM128", + "PartitionItem129": "PARTITION_ITEM129", + "PartitionItem130": "PARTITION_ITEM130", + "PartitionItem131": "PARTITION_ITEM131", + "PartitionItem132": "PARTITION_ITEM132", + "PartitionItem133": "PARTITION_ITEM133", + "PartitionItem134": "PARTITION_ITEM134", + "PartitionItem135": "PARTITION_ITEM135", + "PartitionItem136": "PARTITION_ITEM136", + "PartitionItem137": "PARTITION_ITEM137", + "PartitionItem138": "PARTITION_ITEM138", + "PartitionItem139": "PARTITION_ITEM139", + "PartitionItem140": "PARTITION_ITEM140", + "PartitionItem141": "PARTITION_ITEM141", + "PartitionItem142": "PARTITION_ITEM142", + "PartitionItem143": "PARTITION_ITEM143", + "PartitionItem144": "PARTITION_ITEM144", + "PartitionItem145": "PARTITION_ITEM145", + "PartitionItem146": "PARTITION_ITEM146", + "PartitionItem147": "PARTITION_ITEM147", + "PartitionItem148": "PARTITION_ITEM148", + "PartitionItem149": "PARTITION_ITEM149", + "PartitionItem150": "PARTITION_ITEM150", + "PartitionItem151": "PARTITION_ITEM151", + "PartitionItem152": "PARTITION_ITEM152", + "PartitionItem153": "PARTITION_ITEM153", + "PartitionItem154": "PARTITION_ITEM154", + "PartitionItem155": "PARTITION_ITEM155", + "PartitionItem156": "PARTITION_ITEM156", + "PartitionItem157": "PARTITION_ITEM157", + "PartitionItem158": "PARTITION_ITEM158", + "PartitionItem159": "PARTITION_ITEM159", + "PartitionItem160": "PARTITION_ITEM160", + "PartitionItem161": "PARTITION_ITEM161", + "PartitionItem162": "PARTITION_ITEM162", + "PartitionItem163": "PARTITION_ITEM163", + "PartitionItem164": "PARTITION_ITEM164", + "PartitionItem165": "PARTITION_ITEM165", + "PartitionItem166": "PARTITION_ITEM166", + "PartitionItem167": "PARTITION_ITEM167", + "PartitionItem168": "PARTITION_ITEM168", + "PartitionItem169": "PARTITION_ITEM169", + "PartitionItem170": "PARTITION_ITEM170", + "PartitionItem171": "PARTITION_ITEM171", + "PartitionItem172": "PARTITION_ITEM172", + "PartitionItem173": "PARTITION_ITEM173", + "PartitionItem174": "PARTITION_ITEM174", + "PartitionItem175": "PARTITION_ITEM175", + "PartitionItem176": "PARTITION_ITEM176", + "PartitionItem177": "PARTITION_ITEM177", + "PartitionItem178": "PARTITION_ITEM178", + "PartitionItem179": "PARTITION_ITEM179", + "PartitionItem180": "PARTITION_ITEM180", + "PartitionItem181": "PARTITION_ITEM181", + "PartitionItem182": "PARTITION_ITEM182", + "PartitionItem183": "PARTITION_ITEM183", + "PartitionItem184": "PARTITION_ITEM184", + "PartitionItem185": "PARTITION_ITEM185", + "PartitionItem186": "PARTITION_ITEM186", + "PartitionItem187": "PARTITION_ITEM187", + "PartitionItem188": "PARTITION_ITEM188", + "PartitionItem189": "PARTITION_ITEM189", + "PartitionItem190": "PARTITION_ITEM190", + "PartitionItem191": "PARTITION_ITEM191", + "PartitionItem192": "PARTITION_ITEM192", + "PartitionItem193": "PARTITION_ITEM193", + "PartitionItem194": "PARTITION_ITEM194", + "PartitionItem195": "PARTITION_ITEM195", + "PartitionItem196": "PARTITION_ITEM196", + "PartitionItem197": "PARTITION_ITEM197", + "PartitionItem198": "PARTITION_ITEM198", + "PartitionItem199": "PARTITION_ITEM199", + "PartitionItem200": "PARTITION_ITEM200", + "PartitionItem201": "PARTITION_ITEM201", + "PartitionItem202": "PARTITION_ITEM202", + "PartitionItem203": "PARTITION_ITEM203", + "PartitionItem204": "PARTITION_ITEM204", + "PartitionItem205": "PARTITION_ITEM205", + "PartitionItem206": "PARTITION_ITEM206", + "PartitionItem207": "PARTITION_ITEM207", + "PartitionItem208": "PARTITION_ITEM208", + "PartitionItem209": "PARTITION_ITEM209", + "PartitionItem210": "PARTITION_ITEM210", + "PartitionItem211": "PARTITION_ITEM211", + "PartitionItem212": "PARTITION_ITEM212", + "PartitionItem213": "PARTITION_ITEM213", + "PartitionItem214": "PARTITION_ITEM214", + "PartitionItem215": "PARTITION_ITEM215", + "PartitionItem216": "PARTITION_ITEM216", + "PartitionItem217": "PARTITION_ITEM217", + "PartitionItem218": "PARTITION_ITEM218", + "PartitionItem219": "PARTITION_ITEM219", + "PartitionItem220": "PARTITION_ITEM220", + "PartitionItem221": "PARTITION_ITEM221", + "PartitionItem222": "PARTITION_ITEM222", + "PartitionItem223": "PARTITION_ITEM223", + "PartitionItem224": "PARTITION_ITEM224", + "PartitionItem225": "PARTITION_ITEM225", + "PartitionItem226": "PARTITION_ITEM226", + "PartitionItem227": "PARTITION_ITEM227", + "PartitionItem228": "PARTITION_ITEM228", + "PartitionItem229": "PARTITION_ITEM229", + "PartitionItem230": "PARTITION_ITEM230", + "PartitionItem231": "PARTITION_ITEM231", + "PartitionItem232": "PARTITION_ITEM232", + "PartitionItem233": "PARTITION_ITEM233", + "PartitionItem234": "PARTITION_ITEM234", + "PartitionItem235": "PARTITION_ITEM235", + "PartitionItem236": "PARTITION_ITEM236", + "PartitionItem237": "PARTITION_ITEM237", + "PartitionItem238": "PARTITION_ITEM238", + "PartitionItem239": "PARTITION_ITEM239", + "PartitionItem240": "PARTITION_ITEM240", + "PartitionItem241": "PARTITION_ITEM241", + "PartitionItem242": "PARTITION_ITEM242", + "PartitionItem243": "PARTITION_ITEM243", + "PartitionItem244": "PARTITION_ITEM244", + "PartitionItem245": "PARTITION_ITEM245", + "PartitionItem246": "PARTITION_ITEM246", + "PartitionItem247": "PARTITION_ITEM247", + "PartitionItem248": "PARTITION_ITEM248", + "PartitionItem249": "PARTITION_ITEM249", + "PartitionItem250": "PARTITION_ITEM250", + "PartitionItem251": "PARTITION_ITEM251", + "PartitionItem252": "PARTITION_ITEM252", + "PartitionItem253": "PARTITION_ITEM253", + "PartitionItem254": "PARTITION_ITEM254", + "PartitionItem255": "PARTITION_ITEM255", + "PartitionItem256": "PARTITION_ITEM256", + "PartitionItem257": "PARTITION_ITEM257", + "PartitionItem258": "PARTITION_ITEM258", + "PartitionItem259": "PARTITION_ITEM259", +} + +_RENAMES = { + "RenamedExample": "RENAMED_EXAMPLE", + "ExampleValue": "EXAMPLE_VALUE", +} + +_TARGET_NAMES = { + "example#Example": "RenamedExample", + "example#Value": "ExampleValue", +} + +_MODEL_NAMES = (*tuple(_MODEL_INDEX), "Unit") +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "Code", + "EventStream", + "ExampleError", + "ExampleValue", + "GetExampleInput", + "GetExampleOutput", + "PartitionItem000", + "PartitionItem001", + "PartitionItem002", + "PartitionItem003", + "PartitionItem004", + "PartitionItem005", + "PartitionItem006", + "PartitionItem007", + "PartitionItem008", + "PartitionItem009", + "PartitionItem010", + "PartitionItem011", + "PartitionItem012", + "PartitionItem013", + "PartitionItem014", + "PartitionItem015", + "PartitionItem016", + "PartitionItem017", + "PartitionItem018", + "PartitionItem019", + "PartitionItem020", + "PartitionItem021", + "PartitionItem022", + "PartitionItem023", + "PartitionItem024", + "PartitionItem025", + "PartitionItem026", + "PartitionItem027", + "PartitionItem028", + "PartitionItem029", + "PartitionItem030", + "PartitionItem031", + "PartitionItem032", + "PartitionItem033", + "PartitionItem034", + "PartitionItem035", + "PartitionItem036", + "PartitionItem037", + "PartitionItem038", + "PartitionItem039", + "PartitionItem040", + "PartitionItem041", + "PartitionItem042", + "PartitionItem043", + "PartitionItem044", + "PartitionItem045", + "PartitionItem046", + "PartitionItem047", + "PartitionItem048", + "PartitionItem049", + "PartitionItem050", + "PartitionItem051", + "PartitionItem052", + "PartitionItem053", + "PartitionItem054", + "PartitionItem055", + "PartitionItem056", + "PartitionItem057", + "PartitionItem058", + "PartitionItem059", + "PartitionItem060", + "PartitionItem061", + "PartitionItem062", + "PartitionItem063", + "PartitionItem064", + "PartitionItem065", + "PartitionItem066", + "PartitionItem067", + "PartitionItem068", + "PartitionItem069", + "PartitionItem070", + "PartitionItem071", + "PartitionItem072", + "PartitionItem073", + "PartitionItem074", + "PartitionItem075", + "PartitionItem076", + "PartitionItem077", + "PartitionItem078", + "PartitionItem079", + "PartitionItem080", + "PartitionItem081", + "PartitionItem082", + "PartitionItem083", + "PartitionItem084", + "PartitionItem085", + "PartitionItem086", + "PartitionItem087", + "PartitionItem088", + "PartitionItem089", + "PartitionItem090", + "PartitionItem091", + "PartitionItem092", + "PartitionItem093", + "PartitionItem094", + "PartitionItem095", + "PartitionItem096", + "PartitionItem097", + "PartitionItem098", + "PartitionItem099", + "PartitionItem100", + "PartitionItem101", + "PartitionItem102", + "PartitionItem103", + "PartitionItem104", + "PartitionItem105", + "PartitionItem106", + "PartitionItem107", + "PartitionItem108", + "PartitionItem109", + "PartitionItem110", + "PartitionItem111", + "PartitionItem112", + "PartitionItem113", + "PartitionItem114", + "PartitionItem115", + "PartitionItem116", + "PartitionItem117", + "PartitionItem118", + "PartitionItem119", + "PartitionItem120", + "PartitionItem121", + "PartitionItem122", + "PartitionItem123", + "PartitionItem124", + "PartitionItem125", + "PartitionItem126", + "PartitionItem127", + "PartitionItem128", + "PartitionItem129", + "PartitionItem130", + "PartitionItem131", + "PartitionItem132", + "PartitionItem133", + "PartitionItem134", + "PartitionItem135", + "PartitionItem136", + "PartitionItem137", + "PartitionItem138", + "PartitionItem139", + "PartitionItem140", + "PartitionItem141", + "PartitionItem142", + "PartitionItem143", + "PartitionItem144", + "PartitionItem145", + "PartitionItem146", + "PartitionItem147", + "PartitionItem148", + "PartitionItem149", + "PartitionItem150", + "PartitionItem151", + "PartitionItem152", + "PartitionItem153", + "PartitionItem154", + "PartitionItem155", + "PartitionItem156", + "PartitionItem157", + "PartitionItem158", + "PartitionItem159", + "PartitionItem160", + "PartitionItem161", + "PartitionItem162", + "PartitionItem163", + "PartitionItem164", + "PartitionItem165", + "PartitionItem166", + "PartitionItem167", + "PartitionItem168", + "PartitionItem169", + "PartitionItem170", + "PartitionItem171", + "PartitionItem172", + "PartitionItem173", + "PartitionItem174", + "PartitionItem175", + "PartitionItem176", + "PartitionItem177", + "PartitionItem178", + "PartitionItem179", + "PartitionItem180", + "PartitionItem181", + "PartitionItem182", + "PartitionItem183", + "PartitionItem184", + "PartitionItem185", + "PartitionItem186", + "PartitionItem187", + "PartitionItem188", + "PartitionItem189", + "PartitionItem190", + "PartitionItem191", + "PartitionItem192", + "PartitionItem193", + "PartitionItem194", + "PartitionItem195", + "PartitionItem196", + "PartitionItem197", + "PartitionItem198", + "PartitionItem199", + "PartitionItem200", + "PartitionItem201", + "PartitionItem202", + "PartitionItem203", + "PartitionItem204", + "PartitionItem205", + "PartitionItem206", + "PartitionItem207", + "PartitionItem208", + "PartitionItem209", + "PartitionItem210", + "PartitionItem211", + "PartitionItem212", + "PartitionItem213", + "PartitionItem214", + "PartitionItem215", + "PartitionItem216", + "PartitionItem217", + "PartitionItem218", + "PartitionItem219", + "PartitionItem220", + "PartitionItem221", + "PartitionItem222", + "PartitionItem223", + "PartitionItem224", + "PartitionItem225", + "PartitionItem226", + "PartitionItem227", + "PartitionItem228", + "PartitionItem229", + "PartitionItem230", + "PartitionItem231", + "PartitionItem232", + "PartitionItem233", + "PartitionItem234", + "PartitionItem235", + "PartitionItem236", + "PartitionItem237", + "PartitionItem238", + "PartitionItem239", + "PartitionItem240", + "PartitionItem241", + "PartitionItem242", + "PartitionItem243", + "PartitionItem244", + "PartitionItem245", + "PartitionItem246", + "PartitionItem247", + "PartitionItem248", + "PartitionItem249", + "PartitionItem250", + "PartitionItem251", + "PartitionItem252", + "PartitionItem253", + "PartitionItem254", + "PartitionItem255", + "PartitionItem256", + "PartitionItem257", + "PartitionItem258", + "PartitionItem259", + "RenamedExample", + "Status", + "Unit", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/partitioned-types/src/partitioned_types/models.pyi b/codegen-output-py/partitioned-types/src/partitioned_types/models.pyi new file mode 100644 index 000000000..68f5c1d9e --- /dev/null +++ b/codegen-output-py/partitioned-types/src/partitioned_types/models.pyi @@ -0,0 +1,582 @@ +from dataclasses import dataclass +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.exceptions import ModeledError +from smithy_core.serializers import ShapeSerializer + +from ._private.models_0 import ( + Code, + EventStream, + EventStreamExample, + EventStreamUnknown, + ExampleError, + ExampleValue, + ExampleValueEmpty, + ExampleValueNumber, + ExampleValueText, + ExampleValueUnknown, + GetExampleInput, + GetExampleOutput, + PartitionItem000, + PartitionItem001, + PartitionItem002, + PartitionItem003, + PartitionItem004, + PartitionItem005, + PartitionItem006, + PartitionItem007, + PartitionItem008, + PartitionItem009, + PartitionItem010, + PartitionItem011, + PartitionItem012, + PartitionItem013, + PartitionItem014, + PartitionItem015, + PartitionItem016, + PartitionItem017, + PartitionItem018, + PartitionItem019, + PartitionItem020, + PartitionItem021, + PartitionItem022, + PartitionItem023, + PartitionItem024, + PartitionItem025, + PartitionItem026, + PartitionItem027, + PartitionItem028, + PartitionItem029, + PartitionItem030, + PartitionItem031, + PartitionItem032, + PartitionItem033, + PartitionItem034, + PartitionItem035, + PartitionItem036, + PartitionItem037, + PartitionItem038, + PartitionItem039, + PartitionItem040, + PartitionItem041, + PartitionItem042, + PartitionItem043, + PartitionItem044, + PartitionItem045, + PartitionItem046, + PartitionItem047, + PartitionItem048, + PartitionItem049, + PartitionItem050, + PartitionItem051, + PartitionItem052, + PartitionItem053, + PartitionItem054, + PartitionItem055, + PartitionItem056, + PartitionItem057, + PartitionItem058, + PartitionItem059, + PartitionItem060, + PartitionItem061, + PartitionItem062, + PartitionItem063, + PartitionItem064, + PartitionItem065, + PartitionItem066, + PartitionItem067, + PartitionItem068, + PartitionItem069, + PartitionItem070, + PartitionItem071, + PartitionItem072, + PartitionItem073, + PartitionItem074, + PartitionItem075, + PartitionItem076, + PartitionItem077, + PartitionItem078, + PartitionItem079, + PartitionItem080, + PartitionItem081, + PartitionItem082, + PartitionItem083, + PartitionItem084, + PartitionItem085, + PartitionItem086, + PartitionItem087, + PartitionItem088, + PartitionItem089, + PartitionItem090, + PartitionItem091, + PartitionItem092, + PartitionItem093, + PartitionItem094, + PartitionItem095, + PartitionItem096, + PartitionItem097, + PartitionItem098, + PartitionItem099, + PartitionItem100, + PartitionItem101, + PartitionItem102, + PartitionItem103, + PartitionItem104, + PartitionItem105, + PartitionItem106, + PartitionItem107, + PartitionItem108, + PartitionItem109, + PartitionItem110, + PartitionItem111, + PartitionItem112, + PartitionItem113, + PartitionItem114, + PartitionItem115, + PartitionItem116, + PartitionItem117, + PartitionItem118, + PartitionItem119, + PartitionItem120, + PartitionItem121, + PartitionItem122, + PartitionItem123, + PartitionItem124, + PartitionItem125, + PartitionItem126, + PartitionItem127, + PartitionItem128, + PartitionItem129, + PartitionItem130, + PartitionItem131, + PartitionItem132, + PartitionItem133, + PartitionItem134, + PartitionItem135, + PartitionItem136, + PartitionItem137, + PartitionItem138, + PartitionItem139, + PartitionItem140, + PartitionItem141, + PartitionItem142, + PartitionItem143, + PartitionItem144, + PartitionItem145, + PartitionItem146, + PartitionItem147, + PartitionItem148, + PartitionItem149, + PartitionItem150, + PartitionItem151, + PartitionItem152, + PartitionItem153, + PartitionItem154, + PartitionItem155, + PartitionItem156, + PartitionItem157, + PartitionItem158, + PartitionItem159, + PartitionItem160, + PartitionItem161, + PartitionItem162, + PartitionItem163, + PartitionItem164, + PartitionItem165, + PartitionItem166, + PartitionItem167, + PartitionItem168, + PartitionItem169, + PartitionItem170, + PartitionItem171, + PartitionItem172, + PartitionItem173, + PartitionItem174, + PartitionItem175, + PartitionItem176, + PartitionItem177, + PartitionItem178, + PartitionItem179, + PartitionItem180, + PartitionItem181, + PartitionItem182, + PartitionItem183, + PartitionItem184, + PartitionItem185, + PartitionItem186, + PartitionItem187, + PartitionItem188, + PartitionItem189, + PartitionItem190, + PartitionItem191, + PartitionItem192, + PartitionItem193, + PartitionItem194, + PartitionItem195, + PartitionItem196, + PartitionItem197, + PartitionItem198, + PartitionItem199, + PartitionItem200, + PartitionItem201, + PartitionItem202, + PartitionItem203, + PartitionItem204, + PartitionItem205, + PartitionItem206, + PartitionItem207, + PartitionItem208, + PartitionItem209, + PartitionItem210, + PartitionItem211, + PartitionItem212, + PartitionItem213, + PartitionItem214, + PartitionItem215, + PartitionItem216, + PartitionItem217, + PartitionItem218, + PartitionItem219, + PartitionItem220, + PartitionItem221, + PartitionItem222, + PartitionItem223, + PartitionItem224, + PartitionItem225, + PartitionItem226, + PartitionItem227, + PartitionItem228, + PartitionItem229, + PartitionItem230, + PartitionItem231, + PartitionItem232, + PartitionItem233, + PartitionItem234, + PartitionItem235, + PartitionItem236, + PartitionItem237, + PartitionItem238, + PartitionItem239, + PartitionItem240, + PartitionItem241, + RenamedExample, + Status, +) +from ._private.models_1 import ( + PartitionItem242, + PartitionItem243, + PartitionItem244, + PartitionItem245, + PartitionItem246, + PartitionItem247, + PartitionItem248, + PartitionItem249, + PartitionItem250, + PartitionItem251, + PartitionItem252, + PartitionItem253, + PartitionItem254, + PartitionItem255, + PartitionItem256, + PartitionItem257, + PartitionItem258, + PartitionItem259, +) + +__all__ = [ + "Code", + "EventStream", + "EventStreamExample", + "EventStreamUnknown", + "ExampleError", + "ExampleValue", + "ExampleValueEmpty", + "ExampleValueNumber", + "ExampleValueText", + "ExampleValueUnknown", + "GetExampleInput", + "GetExampleOutput", + "PartitionItem000", + "PartitionItem001", + "PartitionItem002", + "PartitionItem003", + "PartitionItem004", + "PartitionItem005", + "PartitionItem006", + "PartitionItem007", + "PartitionItem008", + "PartitionItem009", + "PartitionItem010", + "PartitionItem011", + "PartitionItem012", + "PartitionItem013", + "PartitionItem014", + "PartitionItem015", + "PartitionItem016", + "PartitionItem017", + "PartitionItem018", + "PartitionItem019", + "PartitionItem020", + "PartitionItem021", + "PartitionItem022", + "PartitionItem023", + "PartitionItem024", + "PartitionItem025", + "PartitionItem026", + "PartitionItem027", + "PartitionItem028", + "PartitionItem029", + "PartitionItem030", + "PartitionItem031", + "PartitionItem032", + "PartitionItem033", + "PartitionItem034", + "PartitionItem035", + "PartitionItem036", + "PartitionItem037", + "PartitionItem038", + "PartitionItem039", + "PartitionItem040", + "PartitionItem041", + "PartitionItem042", + "PartitionItem043", + "PartitionItem044", + "PartitionItem045", + "PartitionItem046", + "PartitionItem047", + "PartitionItem048", + "PartitionItem049", + "PartitionItem050", + "PartitionItem051", + "PartitionItem052", + "PartitionItem053", + "PartitionItem054", + "PartitionItem055", + "PartitionItem056", + "PartitionItem057", + "PartitionItem058", + "PartitionItem059", + "PartitionItem060", + "PartitionItem061", + "PartitionItem062", + "PartitionItem063", + "PartitionItem064", + "PartitionItem065", + "PartitionItem066", + "PartitionItem067", + "PartitionItem068", + "PartitionItem069", + "PartitionItem070", + "PartitionItem071", + "PartitionItem072", + "PartitionItem073", + "PartitionItem074", + "PartitionItem075", + "PartitionItem076", + "PartitionItem077", + "PartitionItem078", + "PartitionItem079", + "PartitionItem080", + "PartitionItem081", + "PartitionItem082", + "PartitionItem083", + "PartitionItem084", + "PartitionItem085", + "PartitionItem086", + "PartitionItem087", + "PartitionItem088", + "PartitionItem089", + "PartitionItem090", + "PartitionItem091", + "PartitionItem092", + "PartitionItem093", + "PartitionItem094", + "PartitionItem095", + "PartitionItem096", + "PartitionItem097", + "PartitionItem098", + "PartitionItem099", + "PartitionItem100", + "PartitionItem101", + "PartitionItem102", + "PartitionItem103", + "PartitionItem104", + "PartitionItem105", + "PartitionItem106", + "PartitionItem107", + "PartitionItem108", + "PartitionItem109", + "PartitionItem110", + "PartitionItem111", + "PartitionItem112", + "PartitionItem113", + "PartitionItem114", + "PartitionItem115", + "PartitionItem116", + "PartitionItem117", + "PartitionItem118", + "PartitionItem119", + "PartitionItem120", + "PartitionItem121", + "PartitionItem122", + "PartitionItem123", + "PartitionItem124", + "PartitionItem125", + "PartitionItem126", + "PartitionItem127", + "PartitionItem128", + "PartitionItem129", + "PartitionItem130", + "PartitionItem131", + "PartitionItem132", + "PartitionItem133", + "PartitionItem134", + "PartitionItem135", + "PartitionItem136", + "PartitionItem137", + "PartitionItem138", + "PartitionItem139", + "PartitionItem140", + "PartitionItem141", + "PartitionItem142", + "PartitionItem143", + "PartitionItem144", + "PartitionItem145", + "PartitionItem146", + "PartitionItem147", + "PartitionItem148", + "PartitionItem149", + "PartitionItem150", + "PartitionItem151", + "PartitionItem152", + "PartitionItem153", + "PartitionItem154", + "PartitionItem155", + "PartitionItem156", + "PartitionItem157", + "PartitionItem158", + "PartitionItem159", + "PartitionItem160", + "PartitionItem161", + "PartitionItem162", + "PartitionItem163", + "PartitionItem164", + "PartitionItem165", + "PartitionItem166", + "PartitionItem167", + "PartitionItem168", + "PartitionItem169", + "PartitionItem170", + "PartitionItem171", + "PartitionItem172", + "PartitionItem173", + "PartitionItem174", + "PartitionItem175", + "PartitionItem176", + "PartitionItem177", + "PartitionItem178", + "PartitionItem179", + "PartitionItem180", + "PartitionItem181", + "PartitionItem182", + "PartitionItem183", + "PartitionItem184", + "PartitionItem185", + "PartitionItem186", + "PartitionItem187", + "PartitionItem188", + "PartitionItem189", + "PartitionItem190", + "PartitionItem191", + "PartitionItem192", + "PartitionItem193", + "PartitionItem194", + "PartitionItem195", + "PartitionItem196", + "PartitionItem197", + "PartitionItem198", + "PartitionItem199", + "PartitionItem200", + "PartitionItem201", + "PartitionItem202", + "PartitionItem203", + "PartitionItem204", + "PartitionItem205", + "PartitionItem206", + "PartitionItem207", + "PartitionItem208", + "PartitionItem209", + "PartitionItem210", + "PartitionItem211", + "PartitionItem212", + "PartitionItem213", + "PartitionItem214", + "PartitionItem215", + "PartitionItem216", + "PartitionItem217", + "PartitionItem218", + "PartitionItem219", + "PartitionItem220", + "PartitionItem221", + "PartitionItem222", + "PartitionItem223", + "PartitionItem224", + "PartitionItem225", + "PartitionItem226", + "PartitionItem227", + "PartitionItem228", + "PartitionItem229", + "PartitionItem230", + "PartitionItem231", + "PartitionItem232", + "PartitionItem233", + "PartitionItem234", + "PartitionItem235", + "PartitionItem236", + "PartitionItem237", + "PartitionItem238", + "PartitionItem239", + "PartitionItem240", + "PartitionItem241", + "PartitionItem242", + "PartitionItem243", + "PartitionItem244", + "PartitionItem245", + "PartitionItem246", + "PartitionItem247", + "PartitionItem248", + "PartitionItem249", + "PartitionItem250", + "PartitionItem251", + "PartitionItem252", + "PartitionItem253", + "PartitionItem254", + "PartitionItem255", + "PartitionItem256", + "PartitionItem257", + "PartitionItem258", + "PartitionItem259", + "RenamedExample", + "ServiceError", + "Status", + "Unit", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class Unit(_SerdeShape): + pass diff --git a/codegen-output-py/partitioned-types/src/partitioned_types/py.typed b/codegen-output-py/partitioned-types/src/partitioned_types/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/query-compatible-aws-json-1-0/.smithy-python-manifest.json b/codegen-output-py/query-compatible-aws-json-1-0/.smithy-python-manifest.json new file mode 100644 index 000000000..7fe11e102 --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0/.smithy-python-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "README.md": "9d9dc0e09a156d9f7690a98266d5ec9c0644da310a4906a8bf9c01597e72c931", + "pyproject.toml": "c95ce99f94867129f67812c1cfa3a3eb82f0a4e4c16c3b2f568e9667afa9827a", + "src/querycompatibleawsjson10/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/querycompatibleawsjson10/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/querycompatibleawsjson10/_private/schemas.py": "2f50162ef491662b8ce67108211e9e4720c37ba997d4fcdf5c686c7439f1660a", + "src/querycompatibleawsjson10/models.py": "d1e4cf7e66b6cc7211088bf97f26733ebe0e5ef9e3bb4a6e299147706fc25f57", + "src/querycompatibleawsjson10/models.pyi": "1a81b46fde33b8cf3ea25608e2d26f8369a8338c8a668c2383866945176c61a9", + "src/querycompatibleawsjson10/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/query-compatible-aws-json-1-0/README.md b/codegen-output-py/query-compatible-aws-json-1-0/README.md new file mode 100644 index 000000000..1eef64e0d --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0/README.md @@ -0,0 +1,5 @@ + + +## querycompatibleawsjson10 Types Package + +Native Python types for the query-compatible-aws-json-1-0 projection diff --git a/codegen-output-py/query-compatible-aws-json-1-0/pyproject.toml b/codegen-output-py/query-compatible-aws-json-1-0/pyproject.toml new file mode 100644 index 000000000..a123aef35 --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "querycompatibleawsjson10" +version = "0.0.1" +description = "Native Python types for the query-compatible-aws-json-1-0 projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "querycompatibleawsjson10"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/querycompatibleawsjson10", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/__init__.py b/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/_private/__init__.py b/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/_private/schemas.py b/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/_private/schemas.py new file mode 100644 index 000000000..240964a24 --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/_private/schemas.py @@ -0,0 +1,26 @@ +from smithy_core._schema_compact import StaticSchema + +n0 = "aws.protocoltests.json10" +_s0 = "CustomCodeError" +_s1 = "smithy.api#error" +_s2 = "client" +_s3 = "message" +_s4 = "NoCustomCodeError" + +CUSTOM_CODE_ERROR: StaticSchema = ( + 18, + n0, + _s0, + {_s1: _s2}, + (_s3,), + ((3, 0),), +) + +NO_CUSTOM_CODE_ERROR: StaticSchema = ( + 18, + n0, + _s4, + {_s1: _s2}, + (_s3,), + ((3, 0),), +) diff --git a/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/models.py b/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/models.py new file mode 100644 index 000000000..64278864a --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/models.py @@ -0,0 +1,52 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "CustomCodeError": "CUSTOM_CODE_ERROR", + "NoCustomCodeError": "NO_CUSTOM_CODE_ERROR", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "CustomCodeError", + "NoCustomCodeError", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/models.pyi b/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/models.pyi new file mode 100644 index 000000000..2bad63699 --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/models.pyi @@ -0,0 +1,53 @@ +from dataclasses import dataclass +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.serializers import ShapeSerializer + +__all__ = [ + "CustomCodeError", + "NoCustomCodeError", + "ServiceError", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class CustomCodeError(ServiceError, _SerdeShape): + "Dataclass for CustomCodeError structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class NoCustomCodeError(ServiceError, _SerdeShape): + "Dataclass for NoCustomCodeError structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ diff --git a/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/py.typed b/codegen-output-py/query-compatible-aws-json-1-0/src/querycompatibleawsjson10/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/query-compatible-rpcv2-cbor/.smithy-python-manifest.json b/codegen-output-py/query-compatible-rpcv2-cbor/.smithy-python-manifest.json new file mode 100644 index 000000000..068f1b83c --- /dev/null +++ b/codegen-output-py/query-compatible-rpcv2-cbor/.smithy-python-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "README.md": "ff19aa552a375f526c29baeaea614e7af167dea1461e78941b3375547b5d1e08", + "pyproject.toml": "e9517e685b25432e0cf8ac521fc6a421562f8d5b5403288a29e963bb165d0f33", + "src/querycompatiblerpcv2cbor/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/querycompatiblerpcv2cbor/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/querycompatiblerpcv2cbor/_private/schemas.py": "8bf49b97ee7af64900c0c5c2ebd4a41d740e2fa0a17c1be3f3d8f25a0d7d997c", + "src/querycompatiblerpcv2cbor/models.py": "d1e4cf7e66b6cc7211088bf97f26733ebe0e5ef9e3bb4a6e299147706fc25f57", + "src/querycompatiblerpcv2cbor/models.pyi": "1a81b46fde33b8cf3ea25608e2d26f8369a8338c8a668c2383866945176c61a9", + "src/querycompatiblerpcv2cbor/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/query-compatible-rpcv2-cbor/README.md b/codegen-output-py/query-compatible-rpcv2-cbor/README.md new file mode 100644 index 000000000..80479538a --- /dev/null +++ b/codegen-output-py/query-compatible-rpcv2-cbor/README.md @@ -0,0 +1,5 @@ + + +## querycompatiblerpcv2cbor Types Package + +Native Python types for the query-compatible-rpcv2-cbor projection diff --git a/codegen-output-py/query-compatible-rpcv2-cbor/pyproject.toml b/codegen-output-py/query-compatible-rpcv2-cbor/pyproject.toml new file mode 100644 index 000000000..e63dfda19 --- /dev/null +++ b/codegen-output-py/query-compatible-rpcv2-cbor/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "querycompatiblerpcv2cbor" +version = "0.0.1" +description = "Native Python types for the query-compatible-rpcv2-cbor projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "querycompatiblerpcv2cbor"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/querycompatiblerpcv2cbor", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/__init__.py b/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/_private/__init__.py b/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/_private/schemas.py b/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/_private/schemas.py new file mode 100644 index 000000000..c6371058d --- /dev/null +++ b/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/_private/schemas.py @@ -0,0 +1,26 @@ +from smithy_core._schema_compact import StaticSchema + +n0 = "aws.protocoltests.rpcv2cbor" +_s0 = "CustomCodeError" +_s1 = "smithy.api#error" +_s2 = "client" +_s3 = "message" +_s4 = "NoCustomCodeError" + +CUSTOM_CODE_ERROR: StaticSchema = ( + 18, + n0, + _s0, + {_s1: _s2}, + (_s3,), + ((3, 0),), +) + +NO_CUSTOM_CODE_ERROR: StaticSchema = ( + 18, + n0, + _s4, + {_s1: _s2}, + (_s3,), + ((3, 0),), +) diff --git a/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/models.py b/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/models.py new file mode 100644 index 000000000..64278864a --- /dev/null +++ b/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/models.py @@ -0,0 +1,52 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "CustomCodeError": "CUSTOM_CODE_ERROR", + "NoCustomCodeError": "NO_CUSTOM_CODE_ERROR", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "CustomCodeError", + "NoCustomCodeError", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/models.pyi b/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/models.pyi new file mode 100644 index 000000000..2bad63699 --- /dev/null +++ b/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/models.pyi @@ -0,0 +1,53 @@ +from dataclasses import dataclass +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.serializers import ShapeSerializer + +__all__ = [ + "CustomCodeError", + "NoCustomCodeError", + "ServiceError", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class CustomCodeError(ServiceError, _SerdeShape): + "Dataclass for CustomCodeError structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class NoCustomCodeError(ServiceError, _SerdeShape): + "Dataclass for NoCustomCodeError structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ diff --git a/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/py.typed b/codegen-output-py/query-compatible-rpcv2-cbor/src/querycompatiblerpcv2cbor/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/rest-json-1/.smithy-python-manifest.json b/codegen-output-py/rest-json-1/.smithy-python-manifest.json new file mode 100644 index 000000000..94c0f277c --- /dev/null +++ b/codegen-output-py/rest-json-1/.smithy-python-manifest.json @@ -0,0 +1,16 @@ +{ + "files": { + "README.md": "ab6bb388bf358acca8bbf97c7dc3d54def01226a5e189d2b4ab762072b82c2c6", + "pyproject.toml": "bcd2a9ccdcf9626c5ef3825e24d9b2a112bc9d9b74746ab3afd713e031e915c7", + "src/restjson/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/restjson/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/restjson/_private/schemas.py": "2001fd5788e5783a4c90ca5d86074c4fcb699633b4034931281da5d72ce4d4b8", + "src/restjson/_private/schemas_0.py": "182604613d3df3c24bc70da886afd1095e14e18d39bc5fd508439a1721db13b3", + "src/restjson/_private/schemas_1.py": "87d9ecab54acafdfa40e9633036e3944e61aef924a0766a576d7d7287d24647d", + "src/restjson/_private/schemas_2.py": "dc8532ce2dd4734ec88e61d6a26e0f6c45156aeb977f23855b2be53b5f882160", + "src/restjson/models.py": "06afe8074a8c93594e0d9a6899057c3afaf39ede3d7e709f452e3a984b2056f7", + "src/restjson/models.pyi": "c9bd690eb56c23e9a86d9409040a16cefa4423b4e74bb0076e23cd3a42c5ff8f", + "src/restjson/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/rest-json-1/README.md b/codegen-output-py/rest-json-1/README.md new file mode 100644 index 000000000..f2688a476 --- /dev/null +++ b/codegen-output-py/rest-json-1/README.md @@ -0,0 +1,5 @@ + + +## restjson Types Package + +Native Python types for the rest-json-1 projection diff --git a/codegen-output-py/rest-json-1/pyproject.toml b/codegen-output-py/rest-json-1/pyproject.toml new file mode 100644 index 000000000..d42c51f04 --- /dev/null +++ b/codegen-output-py/rest-json-1/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "restjson" +version = "0.0.1" +description = "Native Python types for the rest-json-1 projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "restjson"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/restjson", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/rest-json-1/src/restjson/__init__.py b/codegen-output-py/rest-json-1/src/restjson/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/rest-json-1/src/restjson/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/rest-json-1/src/restjson/_private/__init__.py b/codegen-output-py/rest-json-1/src/restjson/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/rest-json-1/src/restjson/_private/schemas.py b/codegen-output-py/rest-json-1/src/restjson/_private/schemas.py new file mode 100644 index 000000000..a65a0f2b7 --- /dev/null +++ b/codegen-output-py/rest-json-1/src/restjson/_private/schemas.py @@ -0,0 +1,234 @@ +from importlib import import_module + +_PARTITION_NAMES: tuple[tuple[str, ...], ...] = ( + ( + "STRING_LIST", + "STRING_SET", + "INTEGER_LIST", + "INTEGER_SET", + "DOUBLE_LIST", + "BOOLEAN_LIST", + "TIMESTAMP_LIST", + "FOO_ENUM", + "FOO_ENUM_LIST", + "INTEGER_ENUM", + "INTEGER_ENUM_LIST", + "STRING_LIST_MAP", + "ALL_QUERY_STRING_TYPES_INPUT", + "BLOB_PAYLOAD_EVENT", + "CLIENT_OPTIONAL_DEFAULTS", + "COMPLEX_NESTED_ERROR_DATA", + "COMPLEX_ERROR", + "CONSTANT_AND_VARIABLE_QUERY_STRING_INPUT", + "CONSTANT_QUERY_STRING_INPUT", + "CONTENT_TYPE_PARAMETERS_INPUT", + "CONTENT_TYPE_PARAMETERS_OUTPUT", + "DATE_TIME", + "DATETIME_OFFSETS_OUTPUT", + "TEST_STRING_LIST", + "DOCUMENT", + "TEST_STRING_MAP", + "TEST_ENUM", + "TEST_INT_ENUM", + "DEFAULTS", + "DENSE_BOOLEAN_MAP", + "DENSE_NUMBER_MAP", + "DENSE_SET_MAP", + "DENSE_STRING_MAP", + "GREETING_STRUCT", + "DENSE_STRUCT_MAP", + "FAREWELL", + "DIALOG", + "DIALOG_LIST", + "DIALOG_MAP", + "DOCUMENT_VALUED_MAP", + "DOCUMENT_TYPE_AS_MAP_VALUE_INPUT_OUTPUT", + "DOCUMENT_TYPE_AS_PAYLOAD_INPUT_OUTPUT", + "DOCUMENT_TYPE_INPUT_OUTPUT", + "HEADERS_EVENT", + "STRING_PAYLOAD_EVENT", + "PAYLOAD_STRUCTURE", + "STRUCTURE_PAYLOAD_EVENT", + "PAYLOAD_UNION", + "UNION_PAYLOAD_EVENT", + "HEADERS_AND_EXPLICIT_PAYLOAD_EVENT", + "HEADERS_AND_IMPLICIT_PAYLOAD_EVENT", + "ERROR_EVENT", + "EVENT_STREAM", + "DUPLEX_STREAM_INPUT", + "DUPLEX_STREAM_OUTPUT", + "DUPLEX_STREAM_WITH_DISTINCT_STREAMS_INPUT", + "DUPLEX_STREAM_WITH_DISTINCT_STREAMS_OUTPUT", + "SINGLETON_EVENT", + "SINGLETON_EVENT_STREAM", + "DUPLEX_STREAM_WITH_INITIAL_MESSAGES_INPUT", + "DUPLEX_STREAM_WITH_INITIAL_MESSAGES_OUTPUT", + "EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT", + "EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT", + "STRING_ENUM", + "ENUM_PAYLOAD_INPUT", + "FINITE_STREAMING_BLOB", + "FOO_ERROR", + "FRACTIONAL_SECONDS_OUTPUT", + "GREETING_WITH_ERRORS_OUTPUT", + "HOST_LABEL_INPUT", + "HTTP_CHECKSUM_REQUIRED_INPUT_OUTPUT", + "STRING_MAP", + "HTTP_EMPTY_PREFIX_HEADERS_INPUT", + "HTTP_EMPTY_PREFIX_HEADERS_OUTPUT", + "HTTP_PAYLOAD_TRAITS_INPUT_OUTPUT", + "TEXT_PLAIN_BLOB", + "NULL_AND_EMPTY_HEADERS_IO", + "SERVICE_UNAVAILABLE_ERROR", + ), + ( + "HTTP_PAYLOAD_TRAITS_WITH_MEDIA_TYPE_INPUT_OUTPUT", + "NESTED_PAYLOAD", + "HTTP_PAYLOAD_WITH_STRUCTURE_INPUT_OUTPUT", + "UNION_PAYLOAD", + "HTTP_PAYLOAD_WITH_UNION_INPUT_OUTPUT", + "HTTP_PREFIX_HEADERS_IN_RESPONSE_INPUT", + "HTTP_PREFIX_HEADERS_IN_RESPONSE_OUTPUT", + "HTTP_PREFIX_HEADERS_INPUT", + "HTTP_PREFIX_HEADERS_OUTPUT", + "QUERY_MAP", + "HTTP_QUERY_PARAMS_ONLY_INPUT", + "HTTP_REQUEST_WITH_FLOAT_LABELS_INPUT", + "HTTP_REQUEST_WITH_GREEDY_LABEL_IN_PATH_INPUT", + "EPOCH_SECONDS", + "HTTP_DATE", + "HTTP_REQUEST_WITH_LABELS_AND_TIMESTAMP_FORMAT_INPUT", + "HTTP_REQUEST_WITH_LABELS_INPUT", + "HTTP_REQUEST_WITH_REGEX_LITERAL_INPUT", + "HTTP_RESPONSE_CODE_OUTPUT", + "IGNORE_QUERY_PARAMS_IN_RESPONSE_OUTPUT", + "INPUT_AND_OUTPUT_WITH_HEADERS_IO", + "INPUT_STREAM_INPUT", + "INPUT_STREAM_WITH_INITIAL_REQUEST_INPUT", + "INVALID_GREETING", + "JSON_BLOBS_INPUT_OUTPUT", + "FOO_ENUM_SET", + "FOO_ENUM_MAP", + "JSON_ENUMS_INPUT_OUTPUT", + "JSON_HEADER_STRING", + "INTEGER_ENUM_SET", + "INTEGER_ENUM_MAP", + "JSON_INT_ENUMS_INPUT_OUTPUT", + "NESTED_STRING_LIST", + "STRUCTURE_LIST_MEMBER", + "STRUCTURE_LIST", + "JSON_LISTS_INPUT_OUTPUT", + "JSON_MAPS_INPUT_OUTPUT", + "JSON_TIMESTAMPS_INPUT_OUTPUT", + "JSON_VALUE", + "MALFORMED_ACCEPT_WITH_GENERIC_STRING_OUTPUT", + "JPEG_BLOB", + "MALFORMED_ACCEPT_WITH_PAYLOAD_OUTPUT", + "MALFORMED_BLOB_INPUT", + "MALFORMED_BOOLEAN_INPUT", + "MALFORMED_BYTE_INPUT", + "MALFORMED_CONTENT_TYPE_WITH_GENERIC_STRING_INPUT", + "MALFORMED_CONTENT_TYPE_WITH_PAYLOAD_INPUT", + "MALFORMED_CONTENT_TYPE_WITHOUT_BODY_EMPTY_INPUT_INPUT", + "MALFORMED_DOUBLE_INPUT", + "MALFORMED_FLOAT_INPUT", + "MALFORMED_INTEGER_INPUT", + "SIMPLE_LIST", + "MALFORMED_LIST_INPUT", + "MALFORMED_LONG_INPUT", + "SIMPLE_MAP", + "MALFORMED_MAP_INPUT", + "MALFORMED_REQUEST_BODY_INPUT", + "MALFORMED_SHORT_INPUT", + "MALFORMED_STRING_INPUT", + "MALFORMED_TIMESTAMP_BODY_DATE_TIME_INPUT", + "MALFORMED_TIMESTAMP_BODY_DEFAULT_INPUT", + "MALFORMED_TIMESTAMP_BODY_HTTP_DATE_INPUT", + "MALFORMED_TIMESTAMP_HEADER_DATE_TIME_INPUT", + "MALFORMED_TIMESTAMP_HEADER_DEFAULT_INPUT", + "MALFORMED_TIMESTAMP_HEADER_EPOCH_INPUT", + "MALFORMED_TIMESTAMP_PATH_DEFAULT_INPUT", + ), + ( + "MALFORMED_TIMESTAMP_PATH_EPOCH_INPUT", + "MALFORMED_TIMESTAMP_PATH_HTTP_DATE_INPUT", + "MALFORMED_TIMESTAMP_QUERY_DEFAULT_INPUT", + "MALFORMED_TIMESTAMP_QUERY_EPOCH_INPUT", + "MALFORMED_TIMESTAMP_QUERY_HTTP_DATE_INPUT", + "SIMPLE_UNION", + "MALFORMED_UNION_INPUT", + "MEDIA_TYPE_HEADER_INPUT", + "MEDIA_TYPE_HEADER_OUTPUT", + "RENAMED_GREETING", + "NESTED_UNION", + "MY_UNION", + "NO_INPUT_AND_OUTPUT_OUTPUT", + "OMITS_NULL_SERIALIZES_EMPTY_STRING_INPUT", + "OMITS_SERIALIZING_EMPTY_LISTS_INPUT", + "OPERATION_WITH_DEFAULTS_INPUT", + "OPERATION_WITH_DEFAULTS_OUTPUT", + "TOP_LEVEL", + "OPERATION_WITH_NESTED_STRUCTURE_INPUT", + "OPERATION_WITH_NESTED_STRUCTURE_OUTPUT", + "OUTPUT_STREAM_OUTPUT", + "OUTPUT_STREAM_WITH_INITIAL_RESPONSE_OUTPUT", + "PAYLOAD_CONFIG", + "PLAYER_ACTION", + "POST_PLAYER_ACTION_INPUT", + "POST_PLAYER_ACTION_OUTPUT", + "UNION_WITH_JSON_NAME", + "POST_UNION_WITH_JSON_NAME_INPUT", + "POST_UNION_WITH_JSON_NAME_OUTPUT", + "PUT_WITH_CONTENT_ENCODING_INPUT", + "QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL_INPUT", + "QUERY_PARAMS_AS_STRING_LIST_MAP_INPUT", + "QUERY_PRECEDENCE_INPUT", + "RECURSIVE_SHAPES_INPUT_OUTPUT", + "RESPONSE_CODE_HTTP_FALLBACK_INPUT_OUTPUT", + "RESPONSE_CODE_REQUIRED_OUTPUT", + "SIMPLE_SCALAR_PROPERTIES_INPUT_OUTPUT", + "SPARSE_BOOLEAN_MAP", + "SPARSE_STRING_LIST", + "SPARSE_SHORT_LIST", + "SPARSE_JSON_LISTS_INPUT_OUTPUT", + "SPARSE_STRUCT_MAP", + "SPARSE_NUMBER_MAP", + "SPARSE_STRING_MAP", + "SPARSE_SET_MAP", + "SPARSE_JSON_MAPS_INPUT_OUTPUT", + "STREAMING_BLOB", + "STREAMING_TEXT_PLAIN_BLOB", + "STREAMING_TRAITS_INPUT_OUTPUT", + "STREAMING_TRAITS_REQUIRE_LENGTH_INPUT", + "STREAMING_TRAITS_WITH_MEDIA_TYPE_INPUT_OUTPUT", + "STRING_PAYLOAD_INPUT", + "TEST_CONFIG", + "TEST_BODY_STRUCTURE_INPUT_OUTPUT", + "TEST_NO_PAYLOAD_INPUT_OUTPUT", + "TEST_PAYLOAD_BLOB_INPUT_OUTPUT", + "TEST_PAYLOAD_STRUCTURE_INPUT_OUTPUT", + "TIMESTAMP_FORMAT_HEADERS_IO", + "UNION_INPUT_OUTPUT", + "RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1", + "RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2", + ), +) +_PARTITIONS = { + name: index for index, names in enumerate(_PARTITION_NAMES) for name in names +} +del _PARTITION_NAMES + + +def __getattr__(name: str): + try: + partition = _PARTITIONS[name] + except KeyError as error: + raise AttributeError(name) from error + module = import_module(f".schemas_{partition}", __package__) + value = getattr(module, name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *_PARTITIONS}) diff --git a/codegen-output-py/rest-json-1/src/restjson/_private/schemas_0.py b/codegen-output-py/rest-json-1/src/restjson/_private/schemas_0.py new file mode 100644 index 000000000..df672391e --- /dev/null +++ b/codegen-output-py/rest-json-1/src/restjson/_private/schemas_0.py @@ -0,0 +1,1240 @@ +from types import MappingProxyType + +from smithy_core._schema_compact import StaticSchema + +n0 = "aws.protocoltests.shared" +_s0 = "StringList" +_s1 = "member" +_s2 = "StringSet" +_s3 = "IntegerList" +_s4 = "IntegerSet" +_s5 = "DoubleList" +_s6 = "BooleanList" +_s7 = "TimestampList" +_s8 = "FooEnum" +_s9 = "FOO" +_s10 = "smithy.api#enumValue" +_s11 = "Foo" +_s12 = "BAZ" +_s13 = "Baz" +_s14 = "BAR" +_s15 = "Bar" +_s16 = "ONE" +_s17 = "1" +_s18 = "ZERO" +_s19 = "0" +_s20 = "FooEnumList" +_s21 = "IntegerEnum" +_s22 = "A" +_s23 = "B" +_s24 = "C" +_s25 = "IntegerEnumList" +_s26 = "StringListMap" +_s27 = "key" +_s28 = "value" +n1 = "aws.protocoltests.restjson" +_s29 = "AllQueryStringTypesInput" +_s30 = "smithy.api#input" +_s31 = "queryString" +_s32 = "smithy.api#httpQuery" +_s33 = "String" +_s34 = "queryStringList" +_s35 = "queryStringSet" +_s36 = "queryByte" +_s37 = "Byte" +_s38 = "queryShort" +_s39 = "Short" +_s40 = "queryInteger" +_s41 = "Integer" +_s42 = "queryIntegerList" +_s43 = "queryIntegerSet" +_s44 = "queryLong" +_s45 = "Long" +_s46 = "queryFloat" +_s47 = "Float" +_s48 = "queryDouble" +_s49 = "Double" +_s50 = "queryDoubleList" +_s51 = "queryBoolean" +_s52 = "Boolean" +_s53 = "queryBooleanList" +_s54 = "queryTimestamp" +_s55 = "Timestamp" +_s56 = "queryTimestampList" +_s57 = "queryEnum" +_s58 = "Enum" +_s59 = "queryEnumList" +_s60 = "EnumList" +_s61 = "queryIntegerEnum" +_s62 = "queryIntegerEnumList" +_s63 = "queryParamsMapOfStringList" +_s64 = "BlobPayloadEvent" +_s65 = "payload" +_s66 = "smithy.api#eventPayload" +_s67 = "ClientOptionalDefaults" +_s68 = "smithy.api#default" +_s69 = "ComplexNestedErrorData" +_s70 = "smithy.api#jsonName" +_s71 = "Fooooo" +_s72 = "ComplexError" +_s73 = "smithy.api#error" +_s74 = "client" +_s75 = "smithy.api#httpError" +_s76 = "Header" +_s77 = "smithy.api#httpHeader" +_s78 = "X-Header" +_s79 = "TopLevel" +_s80 = "Nested" +_s81 = "ConstantAndVariableQueryStringInput" +_s82 = "baz" +_s83 = "maybeSet" +_s84 = "ConstantQueryStringInput" +_s85 = "hello" +_s86 = "ContentTypeParametersInput" +_s87 = "ContentTypeParametersOutput" +_s88 = "smithy.api#output" +_s89 = "DateTime" +_s90 = "smithy.api#timestampFormat" +_s91 = "date-time" +_s92 = "DatetimeOffsetsOutput" +_s93 = "datetime" +_s94 = "TestStringList" +_s95 = "Document" +_s96 = "TestStringMap" +_s97 = "TestEnum" +_s98 = "TestIntEnum" +_s99 = "TWO" +_s100 = "Defaults" +_s101 = "defaultString" +_s102 = "hi" +_s103 = "defaultBoolean" +_s104 = "defaultList" +_s105 = "defaultDocumentMap" +_s106 = "defaultDocumentString" +_s107 = "defaultDocumentBoolean" +_s108 = "defaultDocumentList" +_s109 = "defaultNullDocument" +_s110 = "defaultTimestamp" +_s111 = "defaultBlob" +_s112 = "YWJj" +_s113 = "defaultByte" +_s114 = "defaultShort" +_s115 = "defaultInteger" +_s116 = "defaultLong" +_s117 = "defaultFloat" +_s118 = "defaultDouble" +_s119 = "defaultMap" +_s120 = "defaultEnum" +_s121 = "defaultIntEnum" +_s122 = "emptyString" +_s123 = "" +_s124 = "falseBoolean" +_s125 = "emptyBlob" +_s126 = "zeroByte" +_s127 = "zeroShort" +_s128 = "zeroInteger" +_s129 = "zeroLong" +_s130 = "zeroFloat" +_s131 = "zeroDouble" +_s132 = "DenseBooleanMap" +_s133 = "DenseNumberMap" +_s134 = "DenseSetMap" +_s135 = "DenseStringMap" +_s136 = "GreetingStruct" +_s137 = "DenseStructMap" +_s138 = "Farewell" +_s139 = "phrase" +_s140 = "bye" +_s141 = "Dialog" +_s142 = "language" +_s143 = "greeting" +_s144 = "farewell" +_s145 = "DialogList" +_s146 = "DialogMap" +_s147 = "DocumentValuedMap" +_s148 = "DocumentTypeAsMapValueInputOutput" +_s149 = "docValuedMap" +_s150 = "DocumentTypeAsPayloadInputOutput" +_s151 = "documentValue" +_s152 = "DocumentTypeInputOutput" +_s153 = "stringValue" +_s154 = "HeadersEvent" +_s155 = "booleanHeader" +_s156 = "smithy.api#eventHeader" +_s157 = "byteHeader" +_s158 = "shortHeader" +_s159 = "intHeader" +_s160 = "longHeader" +_s161 = "blobHeader" +_s162 = "stringHeader" +_s163 = "timestampHeader" +_s164 = "StringPayloadEvent" +_s165 = "PayloadStructure" +_s166 = "structureMember" +_s167 = "StructurePayloadEvent" +_s168 = "PayloadUnion" +_s169 = "unionMember" +_s170 = "UnionPayloadEvent" +_s171 = "HeadersAndExplicitPayloadEvent" +_s172 = "header" +_s173 = "HeadersAndImplicitPayloadEvent" +_s174 = "ErrorEvent" +_s175 = "message" +_s176 = "EventStream" +_s177 = "smithy.api#streaming" +_s178 = "headers" +_s179 = "blobPayload" +_s180 = "stringPayload" +_s181 = "structurePayload" +_s182 = "unionPayload" +_s183 = "headersAndExplicitPayload" +_s184 = "headersAndImplicitPayload" +_s185 = "error" +_s186 = "DuplexStreamInput" +_s187 = "stream" +_s188 = "DuplexStreamOutput" +_s189 = "DuplexStreamWithDistinctStreamsInput" +_s190 = "SingletonEvent" +_s191 = "SingletonEventStream" +_s192 = "singleton" +_s193 = "DuplexStreamWithDistinctStreamsOutput" +_s194 = "DuplexStreamWithInitialMessagesInput" +_s195 = "initialRequestMember" +_s196 = "initial-request-member" +_s197 = "smithy.api#required" +_s198 = "DuplexStreamWithInitialMessagesOutput" +_s199 = "initialResponseMember" +_s200 = "initial-response-member" +_s201 = "EmptyInputAndEmptyOutputInput" +_s202 = "EmptyInputAndEmptyOutputOutput" +_s203 = "StringEnum" +_s204 = "V" +_s205 = "enumvalue" +_s206 = "EnumPayloadInput" +_s207 = "FiniteStreamingBlob" +_s208 = "smithy.api#requiresLength" +_s209 = "FooError" +_s210 = "server" +_s211 = "FractionalSecondsOutput" +_s212 = "GreetingWithErrorsOutput" +_s213 = "X-Greeting" +_s214 = "HostLabelInput" +_s215 = "label" +_s216 = "HttpChecksumRequiredInputOutput" +_s217 = "foo" +_s218 = "StringMap" +_s219 = "HttpEmptyPrefixHeadersInput" +_s220 = "prefixHeaders" +_s221 = "smithy.api#httpPrefixHeaders" +_s222 = "specificHeader" +_s223 = "HttpEmptyPrefixHeadersOutput" +_s224 = "HttpPayloadTraitsInputOutput" +_s225 = "X-Foo" +_s226 = "blob" +_s227 = "TextPlainBlob" +_s228 = "smithy.api#mediaType" +_s229 = "text/plain" +_s341 = "a" +_s342 = "b" +_s457 = "NullAndEmptyHeadersIO" +_s458 = "X-A" +_s459 = "X-B" +_s460 = "c" +_s461 = "X-C" +_s506 = "ServiceUnavailableError" + +STRING_LIST: StaticSchema = ( + 16, + n0, + _s0, + 0, + (_s1,), + ((3, 0),), +) + +STRING_SET: StaticSchema = ( + 16, + n0, + _s2, + 0, + (_s1,), + ((3, 0),), +) + +INTEGER_LIST: StaticSchema = ( + 16, + n0, + _s3, + 0, + (_s1,), + ((7, 0),), +) + +INTEGER_SET: StaticSchema = ( + 16, + n0, + _s4, + 0, + (_s1,), + ((7, 0),), +) + +DOUBLE_LIST: StaticSchema = ( + 16, + n0, + _s5, + 0, + (_s1,), + ((10, 0),), +) + +BOOLEAN_LIST: StaticSchema = ( + 16, + n0, + _s6, + 0, + (_s1,), + ((2, 0),), +) + +TIMESTAMP_LIST: StaticSchema = ( + 16, + n0, + _s7, + 0, + (_s1,), + ((4, 0),), +) + +FOO_ENUM: StaticSchema = ( + 14, + n0, + _s8, + 0, + ( + _s9, + _s12, + _s14, + _s16, + _s18, + ), + ( + (-1, {_s10: _s11}), + (-1, {_s10: _s13}), + (-1, {_s10: _s15}), + (-1, {_s10: _s17}), + (-1, {_s10: _s19}), + ), +) + +FOO_ENUM_LIST: StaticSchema = ( + 16, + n0, + _s20, + 0, + (_s1,), + ((FOO_ENUM, 0),), +) + +INTEGER_ENUM: StaticSchema = ( + 15, + n0, + _s21, + 0, + ( + _s22, + _s23, + _s24, + ), + ( + (-1, {_s10: 1}), + (-1, {_s10: 2}), + (-1, {_s10: 3}), + ), +) + +INTEGER_ENUM_LIST: StaticSchema = ( + 16, + n0, + _s25, + 0, + (_s1,), + ((INTEGER_ENUM, 0),), +) + +STRING_LIST_MAP: StaticSchema = ( + 17, + n0, + _s26, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (STRING_LIST, 0), + ), +) + +ALL_QUERY_STRING_TYPES_INPUT: StaticSchema = ( + 18, + n1, + _s29, + {_s30: None}, + ( + _s31, + _s34, + _s35, + _s36, + _s38, + _s40, + _s42, + _s43, + _s44, + _s46, + _s48, + _s50, + _s51, + _s53, + _s54, + _s56, + _s57, + _s59, + _s61, + _s62, + _s63, + ), + ( + (3, {_s32: _s33}), + (STRING_LIST, {_s32: _s0}), + (STRING_SET, {_s32: _s2}), + (5, {_s32: _s37}), + (6, {_s32: _s39}), + (7, {_s32: _s41}), + (INTEGER_LIST, {_s32: _s3}), + (INTEGER_SET, {_s32: _s4}), + (8, {_s32: _s45}), + (9, {_s32: _s47}), + (10, {_s32: _s49}), + (DOUBLE_LIST, {_s32: _s5}), + (2, {_s32: _s52}), + (BOOLEAN_LIST, {_s32: _s6}), + (4, {_s32: _s55}), + (TIMESTAMP_LIST, {_s32: _s7}), + (FOO_ENUM, {_s32: _s58}), + (FOO_ENUM_LIST, {_s32: _s60}), + (INTEGER_ENUM, {_s32: _s21}), + (INTEGER_ENUM_LIST, {_s32: _s25}), + (STRING_LIST_MAP, 1024), + ), +) + +BLOB_PAYLOAD_EVENT: StaticSchema = ( + 18, + n1, + _s64, + 0, + (_s65,), + ((1, {_s66: None}),), +) + +CLIENT_OPTIONAL_DEFAULTS: StaticSchema = ( + 18, + n1, + _s67, + 0, + (_s1,), + ((7, {_s68: 0}),), +) + +COMPLEX_NESTED_ERROR_DATA: StaticSchema = ( + 18, + n1, + _s69, + 0, + (_s11,), + ((3, {_s70: _s71}),), +) + +COMPLEX_ERROR: StaticSchema = ( + 18, + n1, + _s72, + {_s73: _s74, _s75: 403}, + ( + _s76, + _s79, + _s80, + ), + ( + (3, {_s77: _s78}), + (3, 0), + (COMPLEX_NESTED_ERROR_DATA, 0), + ), +) + +CONSTANT_AND_VARIABLE_QUERY_STRING_INPUT: StaticSchema = ( + 18, + n1, + _s81, + {_s30: None}, + ( + _s82, + _s83, + ), + ( + (3, {_s32: _s82}), + (3, {_s32: _s83}), + ), +) + +CONSTANT_QUERY_STRING_INPUT: StaticSchema = ( + 18, + n1, + _s84, + {_s30: None}, + (_s85,), + ((3, 9),), +) + +CONTENT_TYPE_PARAMETERS_INPUT: StaticSchema = ( + 18, + n1, + _s86, + {_s30: None}, + (_s28,), + ((7, 0),), +) + +CONTENT_TYPE_PARAMETERS_OUTPUT: StaticSchema = ( + 18, + n1, + _s87, + {_s88: None}, +) + +DATE_TIME: StaticSchema = ( + 4, + n0, + _s89, + {_s90: _s91}, +) + +DATETIME_OFFSETS_OUTPUT: StaticSchema = ( + 18, + n1, + _s92, + {_s88: None}, + (_s93,), + ((DATE_TIME, 0),), +) + +TEST_STRING_LIST: StaticSchema = ( + 16, + n1, + _s94, + 0, + (_s1,), + ((3, 0),), +) + +DOCUMENT: StaticSchema = ( + 13, + n1, + _s95, + 0, +) + +TEST_STRING_MAP: StaticSchema = ( + 17, + n1, + _s96, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (3, 0), + ), +) + +TEST_ENUM: StaticSchema = ( + 14, + n1, + _s97, + 0, + ( + _s9, + _s14, + _s12, + ), + ( + (-1, {_s10: _s9}), + (-1, {_s10: _s14}), + (-1, {_s10: _s12}), + ), +) + +TEST_INT_ENUM: StaticSchema = ( + 15, + n1, + _s98, + 0, + ( + _s16, + _s99, + ), + ( + (-1, {_s10: 1}), + (-1, {_s10: 2}), + ), +) + +DEFAULTS: StaticSchema = ( + 18, + n1, + _s100, + 0, + ( + _s101, + _s103, + _s104, + _s105, + _s106, + _s107, + _s108, + _s109, + _s110, + _s111, + _s113, + _s114, + _s115, + _s116, + _s117, + _s118, + _s119, + _s120, + _s121, + _s122, + _s124, + _s125, + _s126, + _s127, + _s128, + _s129, + _s130, + _s131, + ), + ( + (3, {_s68: _s102}), + (2, {_s68: True}), + (TEST_STRING_LIST, {_s68: ()}), + (DOCUMENT, {_s68: MappingProxyType[str, object]({})}), + (DOCUMENT, {_s68: _s102}), + (DOCUMENT, {_s68: True}), + (DOCUMENT, {_s68: ()}), + (DOCUMENT, {_s68: None}), + (4, {_s68: 0}), + (1, {_s68: _s112}), + (5, {_s68: 1}), + (6, {_s68: 1}), + (7, {_s68: 10}), + (8, {_s68: 100}), + (9, {_s68: 1.0}), + (10, {_s68: 1.0}), + (TEST_STRING_MAP, {_s68: MappingProxyType[str, object]({})}), + (TEST_ENUM, {_s68: _s9}), + (TEST_INT_ENUM, {_s68: 1}), + (3, {_s68: _s123}), + (2, {_s68: False}), + (1, {_s68: _s123}), + (5, {_s68: 0}), + (6, {_s68: 0}), + (7, {_s68: 0}), + (8, {_s68: 0}), + (9, {_s68: 0.0}), + (10, {_s68: 0.0}), + ), +) + +DENSE_BOOLEAN_MAP: StaticSchema = ( + 17, + n1, + _s132, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (2, 0), + ), +) + +DENSE_NUMBER_MAP: StaticSchema = ( + 17, + n1, + _s133, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (7, 0), + ), +) + +DENSE_SET_MAP: StaticSchema = ( + 17, + n1, + _s134, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (STRING_SET, 0), + ), +) + +DENSE_STRING_MAP: StaticSchema = ( + 17, + n1, + _s135, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (3, 0), + ), +) + +GREETING_STRUCT: StaticSchema = ( + 18, + n0, + _s136, + {_s30: None, _s88: None}, + (_s102,), + ((3, 0),), +) + +DENSE_STRUCT_MAP: StaticSchema = ( + 17, + n1, + _s137, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (GREETING_STRUCT, 0), + ), +) + +FAREWELL: StaticSchema = ( + 18, + n1, + _s138, + 0, + (_s139,), + ((3, {_s68: _s140}),), +) + +DIALOG: StaticSchema = ( + 18, + n1, + _s141, + 0, + ( + _s142, + _s143, + _s144, + ), + ( + (3, 0), + (3, {_s68: _s102}), + (FAREWELL, 0), + ), +) + +DIALOG_LIST: StaticSchema = ( + 16, + n1, + _s145, + 0, + (_s1,), + ((DIALOG, 0),), +) + +DIALOG_MAP: StaticSchema = ( + 17, + n1, + _s146, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (DIALOG, 0), + ), +) + +DOCUMENT_VALUED_MAP: StaticSchema = ( + 17, + n1, + _s147, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (DOCUMENT, 0), + ), +) + +DOCUMENT_TYPE_AS_MAP_VALUE_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s148, + {_s30: None, _s88: None}, + (_s149,), + ((DOCUMENT_VALUED_MAP, 0),), +) + +DOCUMENT_TYPE_AS_PAYLOAD_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s150, + {_s30: None, _s88: None}, + (_s151,), + ((DOCUMENT, 16),), +) + +DOCUMENT_TYPE_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s152, + {_s30: None, _s88: None}, + ( + _s153, + _s151, + ), + ( + (3, 0), + (DOCUMENT, 0), + ), +) + +HEADERS_EVENT: StaticSchema = ( + 18, + n1, + _s154, + 0, + ( + _s155, + _s157, + _s158, + _s159, + _s160, + _s161, + _s162, + _s163, + ), + ( + (2, {_s156: None}), + (5, {_s156: None}), + (6, {_s156: None}), + (7, {_s156: None}), + (8, {_s156: None}), + (1, {_s156: None}), + (3, {_s156: None}), + (DATE_TIME, {_s156: None}), + ), +) + +STRING_PAYLOAD_EVENT: StaticSchema = ( + 18, + n1, + _s164, + 0, + (_s65,), + ((3, {_s66: None}),), +) + +PAYLOAD_STRUCTURE: StaticSchema = ( + 18, + n1, + _s165, + 0, + (_s166,), + ((3, 0),), +) + +STRUCTURE_PAYLOAD_EVENT: StaticSchema = ( + 18, + n1, + _s167, + 0, + (_s65,), + ((PAYLOAD_STRUCTURE, {_s66: None}),), +) + +PAYLOAD_UNION: StaticSchema = ( + 19, + n1, + _s168, + 0, + (_s169,), + ((3, 0),), +) + +UNION_PAYLOAD_EVENT: StaticSchema = ( + 18, + n1, + _s170, + 0, + (_s65,), + ((PAYLOAD_UNION, {_s66: None}),), +) + +HEADERS_AND_EXPLICIT_PAYLOAD_EVENT: StaticSchema = ( + 18, + n1, + _s171, + 0, + ( + _s172, + _s65, + ), + ( + (3, {_s156: None}), + (PAYLOAD_STRUCTURE, {_s66: None}), + ), +) + +HEADERS_AND_IMPLICIT_PAYLOAD_EVENT: StaticSchema = ( + 18, + n1, + _s173, + 0, + ( + _s172, + _s65, + ), + ( + (3, {_s156: None}), + (3, 0), + ), +) + +ERROR_EVENT: StaticSchema = ( + 18, + n1, + _s174, + {_s73: _s74}, + (_s175,), + ((3, 0),), +) + +EVENT_STREAM: StaticSchema = ( + 19, + n1, + _s176, + {_s177: None}, + ( + _s178, + _s179, + _s180, + _s181, + _s182, + _s183, + _s184, + _s185, + ), + ( + (HEADERS_EVENT, 0), + (BLOB_PAYLOAD_EVENT, 0), + (STRING_PAYLOAD_EVENT, 0), + (STRUCTURE_PAYLOAD_EVENT, 0), + (UNION_PAYLOAD_EVENT, 0), + (HEADERS_AND_EXPLICIT_PAYLOAD_EVENT, 0), + (HEADERS_AND_IMPLICIT_PAYLOAD_EVENT, 0), + (ERROR_EVENT, 0), + ), +) + +DUPLEX_STREAM_INPUT: StaticSchema = ( + 18, + n1, + _s186, + {_s30: None}, + (_s187,), + ((EVENT_STREAM, 16),), +) + +DUPLEX_STREAM_OUTPUT: StaticSchema = ( + 18, + n1, + _s188, + {_s88: None}, + (_s187,), + ((EVENT_STREAM, 16),), +) + +DUPLEX_STREAM_WITH_DISTINCT_STREAMS_INPUT: StaticSchema = ( + 18, + n1, + _s189, + {_s30: None}, + (_s187,), + ((EVENT_STREAM, 16),), +) + +DUPLEX_STREAM_WITH_DISTINCT_STREAMS_OUTPUT: StaticSchema = ( + 18, + n1, + _s193, + {_s88: None}, + (_s187,), + ((lambda: SINGLETON_EVENT_STREAM, 16),), +) + +SINGLETON_EVENT: StaticSchema = ( + 18, + n1, + _s190, + 0, + (_s28,), + ((3, 0),), +) + +SINGLETON_EVENT_STREAM: StaticSchema = ( + 19, + n1, + _s191, + 0, + (_s192,), + ((SINGLETON_EVENT, 0),), +) + +DUPLEX_STREAM_WITH_INITIAL_MESSAGES_INPUT: StaticSchema = ( + 18, + n1, + _s194, + {_s30: None}, + ( + _s195, + _s187, + ), + ( + (3, {_s77: _s196, _s197: None}), + (EVENT_STREAM, 16), + ), +) + +DUPLEX_STREAM_WITH_INITIAL_MESSAGES_OUTPUT: StaticSchema = ( + 18, + n1, + _s198, + {_s88: None}, + ( + _s199, + _s187, + ), + ( + (3, {_s77: _s200, _s197: None}), + (EVENT_STREAM, 16), + ), +) + +EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT: StaticSchema = ( + 18, + n1, + _s201, + {_s30: None}, +) + +EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s202, + {_s88: None}, +) + +STRING_ENUM: StaticSchema = ( + 14, + n1, + _s203, + 0, + (_s204,), + ((-1, {_s10: _s205}),), +) + +ENUM_PAYLOAD_INPUT: StaticSchema = ( + 18, + n1, + _s206, + {_s30: None, _s88: None}, + (_s65,), + ((STRING_ENUM, 16),), +) + +FINITE_STREAMING_BLOB: StaticSchema = ( + 1, + n1, + _s207, + {_s177: None, _s208: None}, +) + +FOO_ERROR: StaticSchema = ( + 18, + n1, + _s209, + {_s73: _s210, _s75: 500}, +) + +FRACTIONAL_SECONDS_OUTPUT: StaticSchema = ( + 18, + n1, + _s211, + {_s88: None}, + (_s93,), + ((DATE_TIME, 0),), +) + +GREETING_WITH_ERRORS_OUTPUT: StaticSchema = ( + 18, + n1, + _s212, + {_s88: None}, + (_s143,), + ((3, {_s77: _s213}),), +) + +HOST_LABEL_INPUT: StaticSchema = ( + 18, + n1, + _s214, + {_s30: None}, + (_s215,), + ((3, 257),), +) + +HTTP_CHECKSUM_REQUIRED_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s216, + {_s30: None, _s88: None}, + (_s217,), + ((3, 0),), +) + +STRING_MAP: StaticSchema = ( + 17, + n0, + _s218, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (3, 0), + ), +) + +HTTP_EMPTY_PREFIX_HEADERS_INPUT: StaticSchema = ( + 18, + n1, + _s219, + {_s30: None}, + ( + _s220, + _s222, + ), + ( + (STRING_MAP, {_s221: _s123}), + (3, {_s77: _s85}), + ), +) + +HTTP_EMPTY_PREFIX_HEADERS_OUTPUT: StaticSchema = ( + 18, + n1, + _s223, + {_s88: None}, + ( + _s220, + _s222, + ), + ( + (STRING_MAP, {_s221: _s123}), + (3, {_s77: _s85}), + ), +) + +HTTP_PAYLOAD_TRAITS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s224, + {_s30: None, _s88: None}, + ( + _s217, + _s226, + ), + ( + (3, {_s77: _s225}), + (1, 16), + ), +) + +TEXT_PLAIN_BLOB: StaticSchema = ( + 1, + n0, + _s227, + {_s228: _s229}, +) + +NULL_AND_EMPTY_HEADERS_IO: StaticSchema = ( + 18, + n1, + _s457, + {_s30: None, _s88: None}, + ( + _s341, + _s342, + _s460, + ), + ( + (3, {_s77: _s458}), + (3, {_s77: _s459}), + (STRING_LIST, {_s77: _s461}), + ), +) + +SERVICE_UNAVAILABLE_ERROR: StaticSchema = ( + 18, + n1, + _s506, + {_s73: _s210, _s75: 500}, + (_s175,), + ((3, 0),), +) diff --git a/codegen-output-py/rest-json-1/src/restjson/_private/schemas_1.py b/codegen-output-py/rest-json-1/src/restjson/_private/schemas_1.py new file mode 100644 index 000000000..1a110df7a --- /dev/null +++ b/codegen-output-py/rest-json-1/src/restjson/_private/schemas_1.py @@ -0,0 +1,1113 @@ +from smithy_core._schema_compact import StaticSchema + +from . import schemas + +n0 = "aws.protocoltests.shared" +_s1 = "member" +_s27 = "key" +_s28 = "value" +n1 = "aws.protocoltests.restjson" +_s30 = "smithy.api#input" +_s32 = "smithy.api#httpQuery" +_s65 = "payload" +_s70 = "smithy.api#jsonName" +_s73 = "smithy.api#error" +_s74 = "client" +_s75 = "smithy.api#httpError" +_s77 = "smithy.api#httpHeader" +_s82 = "baz" +_s88 = "smithy.api#output" +_s90 = "smithy.api#timestampFormat" +_s91 = "date-time" +_s123 = "" +_s143 = "greeting" +_s172 = "header" +_s187 = "stream" +_s195 = "initialRequestMember" +_s196 = "initial-request-member" +_s197 = "smithy.api#required" +_s217 = "foo" +_s220 = "prefixHeaders" +_s221 = "smithy.api#httpPrefixHeaders" +_s225 = "X-Foo" +_s226 = "blob" +_s228 = "smithy.api#mediaType" +_s230 = "HttpPayloadTraitsWithMediaTypeInputOutput" +_s231 = "NestedPayload" +_s232 = "name" +_s233 = "HttpPayloadWithStructureInputOutput" +_s234 = "nested" +_s235 = "UnionPayload" +_s236 = "HttpPayloadWithUnionInputOutput" +_s237 = "HttpPrefixHeadersInResponseInput" +_s238 = "HttpPrefixHeadersInResponseOutput" +_s239 = "HttpPrefixHeadersInput" +_s240 = "x-foo" +_s241 = "fooMap" +_s242 = "x-foo-" +_s243 = "HttpPrefixHeadersOutput" +_s244 = "QueryMap" +_s245 = "HttpQueryParamsOnlyInput" +_s246 = "queryMap" +_s247 = "HttpRequestWithFloatLabelsInput" +_s248 = "float" +_s249 = "double" +_s250 = "HttpRequestWithGreedyLabelInPathInput" +_s251 = "EpochSeconds" +_s252 = "epoch-seconds" +_s253 = "HttpDate" +_s254 = "http-date" +_s255 = "HttpRequestWithLabelsAndTimestampFormatInput" +_s256 = "memberEpochSeconds" +_s257 = "smithy.api#httpLabel" +_s258 = "memberHttpDate" +_s259 = "memberDateTime" +_s260 = "defaultFormat" +_s261 = "targetEpochSeconds" +_s262 = "targetHttpDate" +_s263 = "targetDateTime" +_s264 = "HttpRequestWithLabelsInput" +_s265 = "string" +_s266 = "short" +_s267 = "integer" +_s268 = "long" +_s269 = "boolean" +_s270 = "timestamp" +_s271 = "HttpRequestWithRegexLiteralInput" +_s272 = "str" +_s273 = "HttpResponseCodeOutput" +_s274 = "Status" +_s275 = "IgnoreQueryParamsInResponseOutput" +_s276 = "InputAndOutputWithHeadersIO" +_s277 = "headerString" +_s278 = "X-String" +_s279 = "headerByte" +_s280 = "X-Byte" +_s281 = "headerShort" +_s282 = "X-Short" +_s283 = "headerInteger" +_s284 = "X-Integer" +_s285 = "headerLong" +_s286 = "X-Long" +_s287 = "headerFloat" +_s288 = "X-Float" +_s289 = "headerDouble" +_s290 = "X-Double" +_s291 = "headerTrueBool" +_s292 = "X-Boolean1" +_s293 = "headerFalseBool" +_s294 = "X-Boolean2" +_s295 = "headerStringList" +_s296 = "X-StringList" +_s297 = "headerStringSet" +_s298 = "X-StringSet" +_s299 = "headerIntegerList" +_s300 = "X-IntegerList" +_s301 = "headerBooleanList" +_s302 = "X-BooleanList" +_s303 = "headerTimestampList" +_s304 = "X-TimestampList" +_s305 = "headerEnum" +_s306 = "X-Enum" +_s307 = "headerEnumList" +_s308 = "X-EnumList" +_s309 = "headerIntegerEnum" +_s310 = "X-IntegerEnum" +_s311 = "headerIntegerEnumList" +_s312 = "X-IntegerEnumList" +_s313 = "InputStreamInput" +_s314 = "InputStreamWithInitialRequestInput" +_s315 = "InvalidGreeting" +_s316 = "Message" +_s317 = "JsonBlobsInputOutput" +_s318 = "data" +_s319 = "FooEnumSet" +_s320 = "FooEnumMap" +_s321 = "JsonEnumsInputOutput" +_s322 = "fooEnum1" +_s323 = "fooEnum2" +_s324 = "fooEnum3" +_s325 = "fooEnumList" +_s326 = "fooEnumSet" +_s327 = "fooEnumMap" +_s328 = "JsonHeaderString" +_s329 = "application/json" +_s330 = "IntegerEnumSet" +_s331 = "IntegerEnumMap" +_s332 = "JsonIntEnumsInputOutput" +_s333 = "integerEnum1" +_s334 = "integerEnum2" +_s335 = "integerEnum3" +_s336 = "integerEnumList" +_s337 = "integerEnumSet" +_s338 = "integerEnumMap" +_s339 = "NestedStringList" +_s340 = "StructureListMember" +_s341 = "a" +_s342 = "b" +_s343 = "other" +_s344 = "StructureList" +_s345 = "JsonListsInputOutput" +_s346 = "stringList" +_s347 = "stringSet" +_s348 = "integerList" +_s349 = "booleanList" +_s350 = "timestampList" +_s351 = "enumList" +_s352 = "intEnumList" +_s353 = "nestedStringList" +_s354 = "structureList" +_s355 = "myStructureList" +_s356 = "JsonMapsInputOutput" +_s357 = "denseStructMap" +_s358 = "denseNumberMap" +_s359 = "denseBooleanMap" +_s360 = "denseStringMap" +_s361 = "denseSetMap" +_s362 = "JsonTimestampsInputOutput" +_s363 = "normal" +_s364 = "dateTime" +_s365 = "dateTimeOnTarget" +_s366 = "epochSeconds" +_s367 = "epochSecondsOnTarget" +_s368 = "httpDate" +_s369 = "httpDateOnTarget" +_s370 = "JsonValue" +_s371 = "MalformedAcceptWithGenericStringOutput" +_s372 = "JpegBlob" +_s373 = "image/jpeg" +_s374 = "MalformedAcceptWithPayloadOutput" +_s375 = "MalformedBlobInput" +_s376 = "MalformedBooleanInput" +_s377 = "booleanInBody" +_s378 = "booleanInPath" +_s379 = "booleanInQuery" +_s380 = "booleanInHeader" +_s381 = "MalformedByteInput" +_s382 = "byteInBody" +_s383 = "byteInPath" +_s384 = "byteInQuery" +_s385 = "byteInHeader" +_s386 = "MalformedContentTypeWithGenericStringInput" +_s387 = "MalformedContentTypeWithPayloadInput" +_s388 = "MalformedContentTypeWithoutBodyEmptyInputInput" +_s389 = "MalformedDoubleInput" +_s390 = "doubleInBody" +_s391 = "doubleInPath" +_s392 = "doubleInQuery" +_s393 = "doubleInHeader" +_s394 = "MalformedFloatInput" +_s395 = "floatInBody" +_s396 = "floatInPath" +_s397 = "floatInQuery" +_s398 = "floatInHeader" +_s399 = "MalformedIntegerInput" +_s400 = "integerInBody" +_s401 = "integerInPath" +_s402 = "integerInQuery" +_s403 = "integerInHeader" +_s404 = "SimpleList" +_s405 = "MalformedListInput" +_s406 = "bodyList" +_s407 = "MalformedLongInput" +_s408 = "longInBody" +_s409 = "longInPath" +_s410 = "longInQuery" +_s411 = "longInHeader" +_s412 = "SimpleMap" +_s413 = "MalformedMapInput" +_s414 = "bodyMap" +_s415 = "MalformedRequestBodyInput" +_s416 = "int" +_s417 = "MalformedShortInput" +_s418 = "shortInBody" +_s419 = "shortInPath" +_s420 = "shortInQuery" +_s421 = "shortInHeader" +_s422 = "MalformedStringInput" +_s423 = "amz-media-typed-header" +_s424 = "MalformedTimestampBodyDateTimeInput" +_s425 = "MalformedTimestampBodyDefaultInput" +_s426 = "MalformedTimestampBodyHttpDateInput" +_s427 = "MalformedTimestampHeaderDateTimeInput" +_s428 = "MalformedTimestampHeaderDefaultInput" +_s429 = "MalformedTimestampHeaderEpochInput" +_s430 = "MalformedTimestampPathDefaultInput" + +HTTP_PAYLOAD_TRAITS_WITH_MEDIA_TYPE_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s230, + {_s30: None, _s88: None}, + ( + _s217, + _s226, + ), + ( + (3, {_s77: _s225}), + (lambda: schemas.TEXT_PLAIN_BLOB, 16), + ), +) + +NESTED_PAYLOAD: StaticSchema = ( + 18, + n1, + _s231, + 0, + ( + _s143, + _s232, + ), + ( + (3, 0), + (3, 0), + ), +) + +HTTP_PAYLOAD_WITH_STRUCTURE_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s233, + {_s30: None, _s88: None}, + (_s234,), + ((NESTED_PAYLOAD, 16),), +) + +UNION_PAYLOAD: StaticSchema = ( + 19, + n1, + _s235, + 0, + (_s143,), + ((3, 0),), +) + +HTTP_PAYLOAD_WITH_UNION_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s236, + {_s30: None, _s88: None}, + (_s234,), + ((UNION_PAYLOAD, 16),), +) + +HTTP_PREFIX_HEADERS_IN_RESPONSE_INPUT: StaticSchema = ( + 18, + n1, + _s237, + {_s30: None}, +) + +HTTP_PREFIX_HEADERS_IN_RESPONSE_OUTPUT: StaticSchema = ( + 18, + n1, + _s238, + {_s88: None}, + (_s220,), + ((lambda: schemas.STRING_MAP, {_s221: _s123}),), +) + +HTTP_PREFIX_HEADERS_INPUT: StaticSchema = ( + 18, + n1, + _s239, + {_s30: None}, + ( + _s217, + _s241, + ), + ( + (3, {_s77: _s240}), + (lambda: schemas.STRING_MAP, {_s221: _s242}), + ), +) + +HTTP_PREFIX_HEADERS_OUTPUT: StaticSchema = ( + 18, + n1, + _s243, + {_s88: None}, + ( + _s217, + _s241, + ), + ( + (3, {_s77: _s240}), + (lambda: schemas.STRING_MAP, {_s221: _s242}), + ), +) + +QUERY_MAP: StaticSchema = ( + 17, + n1, + _s244, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (3, 0), + ), +) + +HTTP_QUERY_PARAMS_ONLY_INPUT: StaticSchema = ( + 18, + n1, + _s245, + {_s30: None}, + (_s246,), + ((QUERY_MAP, 1024),), +) + +HTTP_REQUEST_WITH_FLOAT_LABELS_INPUT: StaticSchema = ( + 18, + n1, + _s247, + {_s30: None}, + ( + _s248, + _s249, + ), + ( + (9, 9), + (10, 9), + ), +) + +HTTP_REQUEST_WITH_GREEDY_LABEL_IN_PATH_INPUT: StaticSchema = ( + 18, + n1, + _s250, + {_s30: None}, + ( + _s217, + _s82, + ), + ( + (3, 9), + (3, 9), + ), +) + +EPOCH_SECONDS: StaticSchema = ( + 4, + n0, + _s251, + {_s90: _s252}, +) + +HTTP_DATE: StaticSchema = ( + 4, + n0, + _s253, + {_s90: _s254}, +) + +HTTP_REQUEST_WITH_LABELS_AND_TIMESTAMP_FORMAT_INPUT: StaticSchema = ( + 18, + n1, + _s255, + {_s30: None}, + ( + _s256, + _s258, + _s259, + _s260, + _s261, + _s262, + _s263, + ), + ( + (4, {_s90: _s252, _s257: None, _s197: None}), + (4, {_s90: _s254, _s257: None, _s197: None}), + (4, {_s90: _s91, _s257: None, _s197: None}), + (4, 9), + (EPOCH_SECONDS, 9), + (HTTP_DATE, 9), + (lambda: schemas.DATE_TIME, 9), + ), +) + +HTTP_REQUEST_WITH_LABELS_INPUT: StaticSchema = ( + 18, + n1, + _s264, + {_s30: None}, + ( + _s265, + _s266, + _s267, + _s268, + _s248, + _s249, + _s269, + _s270, + ), + ( + (3, 9), + (6, 9), + (7, 9), + (8, 9), + (9, 9), + (10, 9), + (2, 9), + (4, 9), + ), +) + +HTTP_REQUEST_WITH_REGEX_LITERAL_INPUT: StaticSchema = ( + 18, + n1, + _s271, + {_s30: None}, + (_s272,), + ((3, 9),), +) + +HTTP_RESPONSE_CODE_OUTPUT: StaticSchema = ( + 18, + n1, + _s273, + {_s88: None}, + (_s274,), + ((7, 128),), +) + +IGNORE_QUERY_PARAMS_IN_RESPONSE_OUTPUT: StaticSchema = ( + 18, + n1, + _s275, + {_s88: None}, + (_s82,), + ((3, {_s32: _s82}),), +) + +INPUT_AND_OUTPUT_WITH_HEADERS_IO: StaticSchema = ( + 18, + n1, + _s276, + {_s30: None, _s88: None}, + ( + _s277, + _s279, + _s281, + _s283, + _s285, + _s287, + _s289, + _s291, + _s293, + _s295, + _s297, + _s299, + _s301, + _s303, + _s305, + _s307, + _s309, + _s311, + ), + ( + (3, {_s77: _s278}), + (5, {_s77: _s280}), + (6, {_s77: _s282}), + (7, {_s77: _s284}), + (8, {_s77: _s286}), + (9, {_s77: _s288}), + (10, {_s77: _s290}), + (2, {_s77: _s292}), + (2, {_s77: _s294}), + (lambda: schemas.STRING_LIST, {_s77: _s296}), + (lambda: schemas.STRING_SET, {_s77: _s298}), + (lambda: schemas.INTEGER_LIST, {_s77: _s300}), + (lambda: schemas.BOOLEAN_LIST, {_s77: _s302}), + (lambda: schemas.TIMESTAMP_LIST, {_s77: _s304}), + (lambda: schemas.FOO_ENUM, {_s77: _s306}), + (lambda: schemas.FOO_ENUM_LIST, {_s77: _s308}), + (lambda: schemas.INTEGER_ENUM, {_s77: _s310}), + (lambda: schemas.INTEGER_ENUM_LIST, {_s77: _s312}), + ), +) + +INPUT_STREAM_INPUT: StaticSchema = ( + 18, + n1, + _s313, + {_s30: None}, + (_s187,), + ((lambda: schemas.EVENT_STREAM, 16),), +) + +INPUT_STREAM_WITH_INITIAL_REQUEST_INPUT: StaticSchema = ( + 18, + n1, + _s314, + {_s30: None}, + ( + _s195, + _s187, + ), + ( + (3, {_s77: _s196, _s197: None}), + (lambda: schemas.EVENT_STREAM, 16), + ), +) + +INVALID_GREETING: StaticSchema = ( + 18, + n1, + _s315, + {_s73: _s74, _s75: 400}, + (_s316,), + ((3, 0),), +) + +JSON_BLOBS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s317, + {_s30: None, _s88: None}, + (_s318,), + ((1, 0),), +) + +FOO_ENUM_SET: StaticSchema = ( + 16, + n0, + _s319, + 0, + (_s1,), + ((lambda: schemas.FOO_ENUM, 0),), +) + +FOO_ENUM_MAP: StaticSchema = ( + 17, + n0, + _s320, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (lambda: schemas.FOO_ENUM, 0), + ), +) + +JSON_ENUMS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s321, + {_s30: None, _s88: None}, + ( + _s322, + _s323, + _s324, + _s325, + _s326, + _s327, + ), + ( + (lambda: schemas.FOO_ENUM, 0), + (lambda: schemas.FOO_ENUM, 0), + (lambda: schemas.FOO_ENUM, 0), + (lambda: schemas.FOO_ENUM_LIST, 0), + (FOO_ENUM_SET, 0), + (FOO_ENUM_MAP, 0), + ), +) + +JSON_HEADER_STRING: StaticSchema = ( + 3, + n1, + _s328, + {_s228: _s329}, +) + +INTEGER_ENUM_SET: StaticSchema = ( + 16, + n0, + _s330, + 0, + (_s1,), + ((lambda: schemas.INTEGER_ENUM, 0),), +) + +INTEGER_ENUM_MAP: StaticSchema = ( + 17, + n0, + _s331, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (lambda: schemas.INTEGER_ENUM, 0), + ), +) + +JSON_INT_ENUMS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s332, + {_s30: None, _s88: None}, + ( + _s333, + _s334, + _s335, + _s336, + _s337, + _s338, + ), + ( + (lambda: schemas.INTEGER_ENUM, 0), + (lambda: schemas.INTEGER_ENUM, 0), + (lambda: schemas.INTEGER_ENUM, 0), + (lambda: schemas.INTEGER_ENUM_LIST, 0), + (INTEGER_ENUM_SET, 0), + (INTEGER_ENUM_MAP, 0), + ), +) + +NESTED_STRING_LIST: StaticSchema = ( + 16, + n0, + _s339, + 0, + (_s1,), + ((lambda: schemas.STRING_LIST, 0),), +) + +STRUCTURE_LIST_MEMBER: StaticSchema = ( + 18, + n1, + _s340, + 0, + ( + _s341, + _s342, + ), + ( + (3, {_s70: _s28}), + (3, {_s70: _s343}), + ), +) + +STRUCTURE_LIST: StaticSchema = ( + 16, + n1, + _s344, + 0, + (_s1,), + ((STRUCTURE_LIST_MEMBER, 0),), +) + +JSON_LISTS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s345, + {_s30: None, _s88: None}, + ( + _s346, + _s347, + _s348, + _s349, + _s350, + _s351, + _s352, + _s353, + _s354, + ), + ( + (lambda: schemas.STRING_LIST, 0), + (lambda: schemas.STRING_SET, 0), + (lambda: schemas.INTEGER_LIST, 0), + (lambda: schemas.BOOLEAN_LIST, 0), + (lambda: schemas.TIMESTAMP_LIST, 0), + (lambda: schemas.FOO_ENUM_LIST, 0), + (lambda: schemas.INTEGER_ENUM_LIST, 0), + (NESTED_STRING_LIST, 0), + (STRUCTURE_LIST, {_s70: _s355}), + ), +) + +JSON_MAPS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s356, + {_s30: None, _s88: None}, + ( + _s357, + _s358, + _s359, + _s360, + _s361, + ), + ( + (lambda: schemas.DENSE_STRUCT_MAP, 0), + (lambda: schemas.DENSE_NUMBER_MAP, 0), + (lambda: schemas.DENSE_BOOLEAN_MAP, 0), + (lambda: schemas.DENSE_STRING_MAP, 0), + (lambda: schemas.DENSE_SET_MAP, 0), + ), +) + +JSON_TIMESTAMPS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s362, + {_s30: None, _s88: None}, + ( + _s363, + _s364, + _s365, + _s366, + _s367, + _s368, + _s369, + ), + ( + (4, 0), + (4, {_s90: _s91}), + (lambda: schemas.DATE_TIME, 0), + (4, {_s90: _s252}), + (EPOCH_SECONDS, 0), + (4, {_s90: _s254}), + (HTTP_DATE, 0), + ), +) + +JSON_VALUE: StaticSchema = ( + 3, + n1, + _s370, + {_s228: _s329}, +) + +MALFORMED_ACCEPT_WITH_GENERIC_STRING_OUTPUT: StaticSchema = ( + 18, + n1, + _s371, + {_s88: None}, + (_s65,), + ((3, 16),), +) + +JPEG_BLOB: StaticSchema = ( + 1, + n0, + _s372, + {_s228: _s373}, +) + +MALFORMED_ACCEPT_WITH_PAYLOAD_OUTPUT: StaticSchema = ( + 18, + n1, + _s374, + {_s88: None}, + (_s65,), + ((JPEG_BLOB, 16),), +) + +MALFORMED_BLOB_INPUT: StaticSchema = ( + 18, + n1, + _s375, + {_s30: None}, + (_s226,), + ((1, 0),), +) + +MALFORMED_BOOLEAN_INPUT: StaticSchema = ( + 18, + n1, + _s376, + {_s30: None}, + ( + _s377, + _s378, + _s379, + _s380, + ), + ( + (2, 0), + (2, 9), + (2, {_s32: _s379}), + (2, {_s77: _s380}), + ), +) + +MALFORMED_BYTE_INPUT: StaticSchema = ( + 18, + n1, + _s381, + {_s30: None}, + ( + _s382, + _s383, + _s384, + _s385, + ), + ( + (5, 0), + (5, 9), + (5, {_s32: _s384}), + (5, {_s77: _s385}), + ), +) + +MALFORMED_CONTENT_TYPE_WITH_GENERIC_STRING_INPUT: StaticSchema = ( + 18, + n1, + _s386, + {_s30: None}, + (_s65,), + ((3, 16),), +) + +MALFORMED_CONTENT_TYPE_WITH_PAYLOAD_INPUT: StaticSchema = ( + 18, + n1, + _s387, + {_s30: None}, + (_s65,), + ((JPEG_BLOB, 16),), +) + +MALFORMED_CONTENT_TYPE_WITHOUT_BODY_EMPTY_INPUT_INPUT: StaticSchema = ( + 18, + n1, + _s388, + {_s30: None}, + (_s172,), + ((3, {_s77: _s172}),), +) + +MALFORMED_DOUBLE_INPUT: StaticSchema = ( + 18, + n1, + _s389, + {_s30: None}, + ( + _s390, + _s391, + _s392, + _s393, + ), + ( + (10, 0), + (10, 9), + (10, {_s32: _s392}), + (10, {_s77: _s393}), + ), +) + +MALFORMED_FLOAT_INPUT: StaticSchema = ( + 18, + n1, + _s394, + {_s30: None}, + ( + _s395, + _s396, + _s397, + _s398, + ), + ( + (9, 0), + (9, 9), + (9, {_s32: _s397}), + (9, {_s77: _s398}), + ), +) + +MALFORMED_INTEGER_INPUT: StaticSchema = ( + 18, + n1, + _s399, + {_s30: None}, + ( + _s400, + _s401, + _s402, + _s403, + ), + ( + (7, 0), + (7, 9), + (7, {_s32: _s402}), + (7, {_s77: _s403}), + ), +) + +SIMPLE_LIST: StaticSchema = ( + 16, + n1, + _s404, + 0, + (_s1,), + ((3, 0),), +) + +MALFORMED_LIST_INPUT: StaticSchema = ( + 18, + n1, + _s405, + {_s30: None}, + (_s406,), + ((SIMPLE_LIST, 0),), +) + +MALFORMED_LONG_INPUT: StaticSchema = ( + 18, + n1, + _s407, + {_s30: None}, + ( + _s408, + _s409, + _s410, + _s411, + ), + ( + (8, 0), + (8, 9), + (8, {_s32: _s410}), + (8, {_s77: _s411}), + ), +) + +SIMPLE_MAP: StaticSchema = ( + 17, + n1, + _s412, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (3, 0), + ), +) + +MALFORMED_MAP_INPUT: StaticSchema = ( + 18, + n1, + _s413, + {_s30: None}, + (_s414,), + ((SIMPLE_MAP, 0),), +) + +MALFORMED_REQUEST_BODY_INPUT: StaticSchema = ( + 18, + n1, + _s415, + {_s30: None}, + ( + _s416, + _s248, + ), + ( + (7, 0), + (9, 0), + ), +) + +MALFORMED_SHORT_INPUT: StaticSchema = ( + 18, + n1, + _s417, + {_s30: None}, + ( + _s418, + _s419, + _s420, + _s421, + ), + ( + (6, 0), + (6, 9), + (6, {_s32: _s420}), + (6, {_s77: _s421}), + ), +) + +MALFORMED_STRING_INPUT: StaticSchema = ( + 18, + n1, + _s422, + {_s30: None}, + (_s226,), + ((JSON_HEADER_STRING, {_s77: _s423}),), +) + +MALFORMED_TIMESTAMP_BODY_DATE_TIME_INPUT: StaticSchema = ( + 18, + n1, + _s424, + {_s30: None}, + (_s270,), + ((4, {_s90: _s91, _s197: None}),), +) + +MALFORMED_TIMESTAMP_BODY_DEFAULT_INPUT: StaticSchema = ( + 18, + n1, + _s425, + {_s30: None}, + (_s270,), + ((4, 1),), +) + +MALFORMED_TIMESTAMP_BODY_HTTP_DATE_INPUT: StaticSchema = ( + 18, + n1, + _s426, + {_s30: None}, + (_s270,), + ((4, {_s90: _s254, _s197: None}),), +) + +MALFORMED_TIMESTAMP_HEADER_DATE_TIME_INPUT: StaticSchema = ( + 18, + n1, + _s427, + {_s30: None}, + (_s270,), + ((4, {_s77: _s270, _s90: _s91, _s197: None}),), +) + +MALFORMED_TIMESTAMP_HEADER_DEFAULT_INPUT: StaticSchema = ( + 18, + n1, + _s428, + {_s30: None}, + (_s270,), + ((4, {_s77: _s270, _s197: None}),), +) + +MALFORMED_TIMESTAMP_HEADER_EPOCH_INPUT: StaticSchema = ( + 18, + n1, + _s429, + {_s30: None}, + (_s270,), + ((4, {_s77: _s270, _s90: _s252, _s197: None}),), +) + +MALFORMED_TIMESTAMP_PATH_DEFAULT_INPUT: StaticSchema = ( + 18, + n1, + _s430, + {_s30: None}, + (_s270,), + ((4, 9),), +) diff --git a/codegen-output-py/rest-json-1/src/restjson/_private/schemas_2.py b/codegen-output-py/rest-json-1/src/restjson/_private/schemas_2.py new file mode 100644 index 000000000..e7bf6619c --- /dev/null +++ b/codegen-output-py/rest-json-1/src/restjson/_private/schemas_2.py @@ -0,0 +1,1068 @@ +from types import MappingProxyType + +from smithy_core._schema_compact import StaticSchema + +from . import schemas + +n0 = "aws.protocoltests.shared" +_s0 = "StringList" +_s1 = "member" +_s3 = "IntegerList" +_s5 = "DoubleList" +_s6 = "BooleanList" +_s7 = "TimestampList" +_s9 = "FOO" +_s25 = "IntegerEnumList" +_s27 = "key" +_s28 = "value" +n1 = "aws.protocoltests.restjson" +_s30 = "smithy.api#input" +_s32 = "smithy.api#httpQuery" +_s34 = "queryStringList" +_s42 = "queryIntegerList" +_s50 = "queryDoubleList" +_s53 = "queryBooleanList" +_s56 = "queryTimestampList" +_s59 = "queryEnumList" +_s60 = "EnumList" +_s62 = "queryIntegerEnumList" +_s65 = "payload" +_s68 = "smithy.api#default" +_s70 = "smithy.api#jsonName" +_s77 = "smithy.api#httpHeader" +_s79 = "TopLevel" +_s82 = "baz" +_s88 = "smithy.api#output" +_s90 = "smithy.api#timestampFormat" +_s91 = "date-time" +_s101 = "defaultString" +_s102 = "hi" +_s103 = "defaultBoolean" +_s104 = "defaultList" +_s105 = "defaultDocumentMap" +_s106 = "defaultDocumentString" +_s107 = "defaultDocumentBoolean" +_s108 = "defaultDocumentList" +_s109 = "defaultNullDocument" +_s110 = "defaultTimestamp" +_s111 = "defaultBlob" +_s112 = "YWJj" +_s113 = "defaultByte" +_s114 = "defaultShort" +_s115 = "defaultInteger" +_s116 = "defaultLong" +_s117 = "defaultFloat" +_s118 = "defaultDouble" +_s119 = "defaultMap" +_s120 = "defaultEnum" +_s121 = "defaultIntEnum" +_s122 = "emptyString" +_s123 = "" +_s124 = "falseBoolean" +_s125 = "emptyBlob" +_s126 = "zeroByte" +_s127 = "zeroShort" +_s128 = "zeroInteger" +_s129 = "zeroLong" +_s130 = "zeroFloat" +_s131 = "zeroDouble" +_s136 = "GreetingStruct" +_s153 = "stringValue" +_s177 = "smithy.api#streaming" +_s187 = "stream" +_s197 = "smithy.api#required" +_s199 = "initialResponseMember" +_s200 = "initial-response-member" +_s217 = "foo" +_s225 = "X-Foo" +_s226 = "blob" +_s228 = "smithy.api#mediaType" +_s229 = "text/plain" +_s234 = "nested" +_s252 = "epoch-seconds" +_s254 = "http-date" +_s256 = "memberEpochSeconds" +_s257 = "smithy.api#httpLabel" +_s258 = "memberHttpDate" +_s259 = "memberDateTime" +_s260 = "defaultFormat" +_s261 = "targetEpochSeconds" +_s262 = "targetHttpDate" +_s263 = "targetDateTime" +_s265 = "string" +_s270 = "timestamp" +_s318 = "data" +_s416 = "int" +_s431 = "MalformedTimestampPathEpochInput" +_s432 = "MalformedTimestampPathHttpDateInput" +_s433 = "MalformedTimestampQueryDefaultInput" +_s434 = "MalformedTimestampQueryEpochInput" +_s435 = "MalformedTimestampQueryHttpDateInput" +_s436 = "SimpleUnion" +_s437 = "MalformedUnionInput" +_s438 = "union" +_s439 = "MediaTypeHeaderInput" +_s440 = "json" +_s441 = "X-Json" +_s442 = "MediaTypeHeaderOutput" +n2 = "aws.protocoltests.restjson.nested" +_s443 = "salutation" +_s444 = "NestedUnion" +_s445 = "MyUnion" +_s446 = "booleanValue" +_s447 = "numberValue" +_s448 = "blobValue" +_s449 = "timestampValue" +_s450 = "enumValue" +_s451 = "listValue" +_s452 = "mapValue" +_s453 = "structureValue" +_s454 = "renamedStructureValue" +_s455 = "unionValue" +_s456 = "NoInputAndOutputOutput" +_s462 = "OmitsNullSerializesEmptyStringInput" +_s463 = "nullValue" +_s464 = "Null" +_s465 = "Empty" +_s466 = "OmitsSerializingEmptyListsInput" +_s467 = "OperationWithDefaultsInput" +_s468 = "defaults" +_s469 = "clientOptionalDefaults" +_s470 = "topLevelDefault" +_s471 = "otherTopLevelDefault" +_s472 = "OperationWithDefaultsOutput" +_s473 = "dialog" +_s474 = "dialogList" +_s475 = "dialogMap" +_s476 = "OperationWithNestedStructureInput" +_s477 = "topLevel" +_s478 = "OperationWithNestedStructureOutput" +_s479 = "OutputStreamOutput" +_s480 = "OutputStreamWithInitialResponseOutput" +_s481 = "PayloadConfig" +_s482 = "PlayerAction" +_s483 = "quit" +_s484 = "PostPlayerActionInput" +_s485 = "action" +_s486 = "PostPlayerActionOutput" +_s487 = "UnionWithJsonName" +_s488 = "bar" +_s489 = "_baz" +_s490 = "PostUnionWithJsonNameInput" +_s491 = "PostUnionWithJsonNameOutput" +_s492 = "PutWithContentEncodingInput" +_s493 = "encoding" +_s494 = "Content-Encoding" +_s495 = "QueryIdempotencyTokenAutoFillInput" +_s496 = "token" +_s497 = "smithy.api#idempotencyToken" +_s498 = "QueryParamsAsStringListMapInput" +_s499 = "qux" +_s500 = "corge" +_s501 = "QueryPrecedenceInput" +_s502 = "RecursiveShapesInputOutput" +_s503 = "ResponseCodeHttpFallbackInputOutput" +_s504 = "ResponseCodeRequiredOutput" +_s505 = "responseCode" +_s507 = "SimpleScalarPropertiesInputOutput" +_s508 = "trueBooleanValue" +_s509 = "falseBooleanValue" +_s510 = "byteValue" +_s511 = "shortValue" +_s512 = "integerValue" +_s513 = "longValue" +_s514 = "floatValue" +_s515 = "doubleValue" +_s516 = "DoubleDribble" +_s517 = "SparseBooleanMap" +_s518 = "SparseStringList" +_s519 = "SparseShortList" +_s520 = "SparseJsonListsInputOutput" +_s521 = "sparseStringList" +_s522 = "sparseShortList" +_s523 = "SparseStructMap" +_s524 = "SparseNumberMap" +_s525 = "SparseStringMap" +_s526 = "SparseSetMap" +_s527 = "SparseJsonMapsInputOutput" +_s528 = "sparseStructMap" +_s529 = "sparseNumberMap" +_s530 = "sparseBooleanMap" +_s531 = "sparseStringMap" +_s532 = "sparseSetMap" +_s533 = "StreamingBlob" +_s534 = "StreamingTextPlainBlob" +_s535 = "StreamingTraitsInputOutput" +_s536 = "smithy.api#httpPayload" +_s537 = "StreamingTraitsRequireLengthInput" +_s538 = "StreamingTraitsWithMediaTypeInputOutput" +_s539 = "StringPayloadInput" +_s540 = "TestConfig" +_s541 = "timeout" +_s542 = "TestBodyStructureInputOutput" +_s543 = "testId" +_s544 = "x-amz-test-id" +_s545 = "testConfig" +_s546 = "TestNoPayloadInputOutput" +_s547 = "X-Amz-Test-Id" +_s548 = "TestPayloadBlobInputOutput" +_s549 = "contentType" +_s550 = "Content-Type" +_s551 = "TestPayloadStructureInputOutput" +_s552 = "payloadConfig" +_s553 = "TimestampFormatHeadersIO" +_s554 = "X-memberEpochSeconds" +_s555 = "X-memberHttpDate" +_s556 = "X-memberDateTime" +_s557 = "X-defaultFormat" +_s558 = "X-targetEpochSeconds" +_s559 = "X-targetHttpDate" +_s560 = "X-targetDateTime" +_s561 = "UnionInputOutput" +_s562 = "contents" +_s563 = "RecursiveShapesInputOutputNested1" +_s564 = "RecursiveShapesInputOutputNested2" +_s565 = "recursiveMember" + +MALFORMED_TIMESTAMP_PATH_EPOCH_INPUT: StaticSchema = ( + 18, + n1, + _s431, + {_s30: None}, + (_s270,), + ((4, {_s90: _s252, _s257: None, _s197: None}),), +) + +MALFORMED_TIMESTAMP_PATH_HTTP_DATE_INPUT: StaticSchema = ( + 18, + n1, + _s432, + {_s30: None}, + (_s270,), + ((4, {_s90: _s254, _s257: None, _s197: None}),), +) + +MALFORMED_TIMESTAMP_QUERY_DEFAULT_INPUT: StaticSchema = ( + 18, + n1, + _s433, + {_s30: None}, + (_s270,), + ((4, {_s32: _s270, _s197: None}),), +) + +MALFORMED_TIMESTAMP_QUERY_EPOCH_INPUT: StaticSchema = ( + 18, + n1, + _s434, + {_s30: None}, + (_s270,), + ((4, {_s32: _s270, _s90: _s252, _s197: None}),), +) + +MALFORMED_TIMESTAMP_QUERY_HTTP_DATE_INPUT: StaticSchema = ( + 18, + n1, + _s435, + {_s30: None}, + (_s270,), + ((4, {_s32: _s270, _s90: _s254, _s197: None}),), +) + +SIMPLE_UNION: StaticSchema = ( + 19, + n1, + _s436, + 0, + ( + _s416, + _s265, + ), + ( + (7, 0), + (3, 0), + ), +) + +MALFORMED_UNION_INPUT: StaticSchema = ( + 18, + n1, + _s437, + {_s30: None}, + (_s438,), + ((SIMPLE_UNION, 0),), +) + +MEDIA_TYPE_HEADER_INPUT: StaticSchema = ( + 18, + n1, + _s439, + {_s30: None}, + (_s440,), + ((lambda: schemas.JSON_VALUE, {_s77: _s441}),), +) + +MEDIA_TYPE_HEADER_OUTPUT: StaticSchema = ( + 18, + n1, + _s442, + {_s88: None}, + (_s440,), + ((lambda: schemas.JSON_VALUE, {_s77: _s441}),), +) + +RENAMED_GREETING: StaticSchema = ( + 18, + n2, + _s136, + 0, + (_s443,), + ((3, 0),), +) + +NESTED_UNION: StaticSchema = ( + 19, + n1, + _s444, + 0, + (_s153,), + ((3, 0),), +) + +MY_UNION: StaticSchema = ( + 19, + n1, + _s445, + 0, + ( + _s153, + _s446, + _s447, + _s448, + _s449, + _s450, + _s451, + _s452, + _s453, + _s454, + _s455, + ), + ( + (3, 0), + (2, 0), + (7, 0), + (1, 0), + (4, 0), + (lambda: schemas.FOO_ENUM, 0), + (lambda: schemas.STRING_LIST, 0), + (lambda: schemas.STRING_MAP, 0), + (lambda: schemas.GREETING_STRUCT, 0), + (RENAMED_GREETING, 0), + (NESTED_UNION, 0), + ), +) + +NO_INPUT_AND_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s456, + {_s88: None}, +) + +OMITS_NULL_SERIALIZES_EMPTY_STRING_INPUT: StaticSchema = ( + 18, + n1, + _s462, + {_s30: None}, + ( + _s463, + _s122, + ), + ( + (3, {_s32: _s464}), + (3, {_s32: _s465}), + ), +) + +OMITS_SERIALIZING_EMPTY_LISTS_INPUT: StaticSchema = ( + 18, + n1, + _s466, + {_s30: None}, + ( + _s34, + _s42, + _s50, + _s53, + _s56, + _s59, + _s62, + ), + ( + (lambda: schemas.STRING_LIST, {_s32: _s0}), + (lambda: schemas.INTEGER_LIST, {_s32: _s3}), + (lambda: schemas.DOUBLE_LIST, {_s32: _s5}), + (lambda: schemas.BOOLEAN_LIST, {_s32: _s6}), + (lambda: schemas.TIMESTAMP_LIST, {_s32: _s7}), + (lambda: schemas.FOO_ENUM_LIST, {_s32: _s60}), + (lambda: schemas.INTEGER_ENUM_LIST, {_s32: _s25}), + ), +) + +OPERATION_WITH_DEFAULTS_INPUT: StaticSchema = ( + 18, + n1, + _s467, + {_s30: None}, + ( + _s468, + _s469, + _s470, + _s471, + ), + ( + (lambda: schemas.DEFAULTS, 0), + (lambda: schemas.CLIENT_OPTIONAL_DEFAULTS, 0), + (3, {_s68: _s102}), + (7, {_s68: 0}), + ), +) + +OPERATION_WITH_DEFAULTS_OUTPUT: StaticSchema = ( + 18, + n1, + _s472, + {_s88: None}, + ( + _s101, + _s103, + _s104, + _s105, + _s106, + _s107, + _s108, + _s109, + _s110, + _s111, + _s113, + _s114, + _s115, + _s116, + _s117, + _s118, + _s119, + _s120, + _s121, + _s122, + _s124, + _s125, + _s126, + _s127, + _s128, + _s129, + _s130, + _s131, + ), + ( + (3, {_s68: _s102}), + (2, {_s68: True}), + (lambda: schemas.TEST_STRING_LIST, {_s68: ()}), + (lambda: schemas.DOCUMENT, {_s68: MappingProxyType[str, object]({})}), + (lambda: schemas.DOCUMENT, {_s68: _s102}), + (lambda: schemas.DOCUMENT, {_s68: True}), + (lambda: schemas.DOCUMENT, {_s68: ()}), + (lambda: schemas.DOCUMENT, {_s68: None}), + (4, {_s68: 0}), + (1, {_s68: _s112}), + (5, {_s68: 1}), + (6, {_s68: 1}), + (7, {_s68: 10}), + (8, {_s68: 100}), + (9, {_s68: 1.0}), + (10, {_s68: 1.0}), + (lambda: schemas.TEST_STRING_MAP, {_s68: MappingProxyType[str, object]({})}), + (lambda: schemas.TEST_ENUM, {_s68: _s9}), + (lambda: schemas.TEST_INT_ENUM, {_s68: 1}), + (3, {_s68: _s123}), + (2, {_s68: False}), + (1, {_s68: _s123}), + (5, {_s68: 0}), + (6, {_s68: 0}), + (7, {_s68: 0}), + (8, {_s68: 0}), + (9, {_s68: 0.0}), + (10, {_s68: 0.0}), + ), +) + +TOP_LEVEL: StaticSchema = ( + 18, + n1, + _s79, + 0, + ( + _s473, + _s474, + _s475, + ), + ( + (lambda: schemas.DIALOG, 1), + (lambda: schemas.DIALOG_LIST, {_s68: ()}), + (lambda: schemas.DIALOG_MAP, {_s68: MappingProxyType[str, object]({})}), + ), +) + +OPERATION_WITH_NESTED_STRUCTURE_INPUT: StaticSchema = ( + 18, + n1, + _s476, + {_s30: None}, + (_s477,), + ((TOP_LEVEL, 1),), +) + +OPERATION_WITH_NESTED_STRUCTURE_OUTPUT: StaticSchema = ( + 18, + n1, + _s478, + {_s88: None}, + ( + _s473, + _s474, + _s475, + ), + ( + (lambda: schemas.DIALOG, 1), + (lambda: schemas.DIALOG_LIST, {_s68: ()}), + (lambda: schemas.DIALOG_MAP, {_s68: MappingProxyType[str, object]({})}), + ), +) + +OUTPUT_STREAM_OUTPUT: StaticSchema = ( + 18, + n1, + _s479, + {_s88: None}, + (_s187,), + ((lambda: schemas.EVENT_STREAM, 16),), +) + +OUTPUT_STREAM_WITH_INITIAL_RESPONSE_OUTPUT: StaticSchema = ( + 18, + n1, + _s480, + {_s88: None}, + ( + _s199, + _s187, + ), + ( + (3, {_s77: _s200, _s197: None}), + (lambda: schemas.EVENT_STREAM, 16), + ), +) + +PAYLOAD_CONFIG: StaticSchema = ( + 18, + n1, + _s481, + 0, + (_s318,), + ((7, 0),), +) + +PLAYER_ACTION: StaticSchema = ( + 19, + n1, + _s482, + 0, + (_s483,), + ((-1, 0),), +) + +POST_PLAYER_ACTION_INPUT: StaticSchema = ( + 18, + n1, + _s484, + {_s30: None}, + (_s485,), + ((PLAYER_ACTION, 0),), +) + +POST_PLAYER_ACTION_OUTPUT: StaticSchema = ( + 18, + n1, + _s486, + {_s88: None}, + (_s485,), + ((PLAYER_ACTION, 1),), +) + +UNION_WITH_JSON_NAME: StaticSchema = ( + 19, + n1, + _s487, + 0, + ( + _s217, + _s488, + _s82, + ), + ( + (3, {_s70: _s9}), + (3, 0), + (3, {_s70: _s489}), + ), +) + +POST_UNION_WITH_JSON_NAME_INPUT: StaticSchema = ( + 18, + n1, + _s490, + {_s30: None}, + (_s28,), + ((UNION_WITH_JSON_NAME, 0),), +) + +POST_UNION_WITH_JSON_NAME_OUTPUT: StaticSchema = ( + 18, + n1, + _s491, + {_s88: None}, + (_s28,), + ((UNION_WITH_JSON_NAME, 1),), +) + +PUT_WITH_CONTENT_ENCODING_INPUT: StaticSchema = ( + 18, + n1, + _s492, + {_s30: None}, + ( + _s493, + _s318, + ), + ( + (3, {_s77: _s494}), + (3, 0), + ), +) + +QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL_INPUT: StaticSchema = ( + 18, + n1, + _s495, + {_s30: None}, + (_s496,), + ((3, {_s32: _s496, _s497: None}),), +) + +QUERY_PARAMS_AS_STRING_LIST_MAP_INPUT: StaticSchema = ( + 18, + n1, + _s498, + {_s30: None}, + ( + _s499, + _s217, + ), + ( + (3, {_s32: _s500}), + (lambda: schemas.STRING_LIST_MAP, 1024), + ), +) + +QUERY_PRECEDENCE_INPUT: StaticSchema = ( + 18, + n1, + _s501, + {_s30: None}, + ( + _s217, + _s82, + ), + ( + (3, {_s32: _s488}), + (lambda: schemas.STRING_MAP, 1024), + ), +) + +RECURSIVE_SHAPES_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s502, + {_s30: None, _s88: None}, + (_s234,), + ((lambda: RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1, 0),), +) + +RESPONSE_CODE_HTTP_FALLBACK_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s503, + {_s30: None, _s88: None}, +) + +RESPONSE_CODE_REQUIRED_OUTPUT: StaticSchema = ( + 18, + n1, + _s504, + {_s88: None}, + (_s505,), + ((7, 129),), +) + +SIMPLE_SCALAR_PROPERTIES_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s507, + {_s30: None, _s88: None}, + ( + _s217, + _s153, + _s508, + _s509, + _s510, + _s511, + _s512, + _s513, + _s514, + _s515, + ), + ( + (3, {_s77: _s225}), + (3, 0), + (2, 0), + (2, 0), + (5, 0), + (6, 0), + (7, 0), + (8, 0), + (9, 0), + (10, {_s70: _s516}), + ), +) + +SPARSE_BOOLEAN_MAP: StaticSchema = ( + 17, + n1, + _s517, + 64, + ( + _s27, + _s28, + ), + ( + (3, 0), + (2, 0), + ), +) + +SPARSE_STRING_LIST: StaticSchema = ( + 16, + n0, + _s518, + 64, + (_s1,), + ((3, 0),), +) + +SPARSE_SHORT_LIST: StaticSchema = ( + 16, + n0, + _s519, + 64, + (_s1,), + ((6, 0),), +) + +SPARSE_JSON_LISTS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s520, + {_s30: None, _s88: None}, + ( + _s521, + _s522, + ), + ( + (SPARSE_STRING_LIST, 0), + (SPARSE_SHORT_LIST, 0), + ), +) + +SPARSE_STRUCT_MAP: StaticSchema = ( + 17, + n1, + _s523, + 64, + ( + _s27, + _s28, + ), + ( + (3, 0), + (lambda: schemas.GREETING_STRUCT, 0), + ), +) + +SPARSE_NUMBER_MAP: StaticSchema = ( + 17, + n1, + _s524, + 64, + ( + _s27, + _s28, + ), + ( + (3, 0), + (7, 0), + ), +) + +SPARSE_STRING_MAP: StaticSchema = ( + 17, + n0, + _s525, + 64, + ( + _s27, + _s28, + ), + ( + (3, 0), + (3, 0), + ), +) + +SPARSE_SET_MAP: StaticSchema = ( + 17, + n1, + _s526, + 64, + ( + _s27, + _s28, + ), + ( + (3, 0), + (lambda: schemas.STRING_SET, 0), + ), +) + +SPARSE_JSON_MAPS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s527, + {_s30: None, _s88: None}, + ( + _s528, + _s529, + _s530, + _s531, + _s532, + ), + ( + (SPARSE_STRUCT_MAP, 0), + (SPARSE_NUMBER_MAP, 0), + (SPARSE_BOOLEAN_MAP, 0), + (SPARSE_STRING_MAP, 0), + (SPARSE_SET_MAP, 0), + ), +) + +STREAMING_BLOB: StaticSchema = ( + 1, + n1, + _s533, + {_s177: None}, +) + +STREAMING_TEXT_PLAIN_BLOB: StaticSchema = ( + 1, + n1, + _s534, + {_s228: _s229, _s177: None}, +) + +STREAMING_TRAITS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s535, + {_s30: None, _s88: None}, + ( + _s217, + _s226, + ), + ( + (3, {_s77: _s225}), + (STREAMING_BLOB, {_s68: _s123, _s536: None}), + ), +) + +STREAMING_TRAITS_REQUIRE_LENGTH_INPUT: StaticSchema = ( + 18, + n1, + _s537, + {_s30: None}, + ( + _s217, + _s226, + ), + ( + (3, {_s77: _s225}), + (lambda: schemas.FINITE_STREAMING_BLOB, {_s68: _s123, _s536: None}), + ), +) + +STREAMING_TRAITS_WITH_MEDIA_TYPE_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s538, + {_s30: None, _s88: None}, + ( + _s217, + _s226, + ), + ( + (3, {_s77: _s225}), + (STREAMING_TEXT_PLAIN_BLOB, {_s68: _s123, _s536: None}), + ), +) + +STRING_PAYLOAD_INPUT: StaticSchema = ( + 18, + n1, + _s539, + {_s30: None, _s88: None}, + (_s65,), + ((3, 16),), +) + +TEST_CONFIG: StaticSchema = ( + 18, + n1, + _s540, + 0, + (_s541,), + ((7, 0),), +) + +TEST_BODY_STRUCTURE_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s542, + {_s30: None, _s88: None}, + ( + _s543, + _s545, + ), + ( + (3, {_s77: _s544}), + (TEST_CONFIG, 0), + ), +) + +TEST_NO_PAYLOAD_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s546, + {_s30: None, _s88: None}, + (_s543,), + ((3, {_s77: _s547}),), +) + +TEST_PAYLOAD_BLOB_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s548, + {_s30: None, _s88: None}, + ( + _s549, + _s318, + ), + ( + (3, {_s77: _s550}), + (1, 16), + ), +) + +TEST_PAYLOAD_STRUCTURE_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s551, + {_s30: None, _s88: None}, + ( + _s543, + _s552, + ), + ( + (3, {_s77: _s544}), + (PAYLOAD_CONFIG, 16), + ), +) + +TIMESTAMP_FORMAT_HEADERS_IO: StaticSchema = ( + 18, + n1, + _s553, + {_s30: None, _s88: None}, + ( + _s256, + _s258, + _s259, + _s260, + _s261, + _s262, + _s263, + ), + ( + (4, {_s77: _s554, _s90: _s252}), + (4, {_s77: _s555, _s90: _s254}), + (4, {_s77: _s556, _s90: _s91}), + (4, {_s77: _s557}), + (lambda: schemas.EPOCH_SECONDS, {_s77: _s558}), + (lambda: schemas.HTTP_DATE, {_s77: _s559}), + (lambda: schemas.DATE_TIME, {_s77: _s560}), + ), +) + +UNION_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s561, + {_s30: None, _s88: None}, + (_s562,), + ((MY_UNION, 0),), +) + +RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1: StaticSchema = ( + 18, + n1, + _s563, + 0, + ( + _s217, + _s234, + ), + ( + (3, 0), + (lambda: RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2, 0), + ), +) + +RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2: StaticSchema = ( + 18, + n1, + _s564, + 0, + ( + _s488, + _s565, + ), + ( + (3, 0), + (RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1, 0), + ), +) diff --git a/codegen-output-py/rest-json-1/src/restjson/models.py b/codegen-output-py/rest-json-1/src/restjson/models.py new file mode 100644 index 000000000..5ed471569 --- /dev/null +++ b/codegen-output-py/rest-json-1/src/restjson/models.py @@ -0,0 +1,405 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "AllQueryStringTypesInput": "ALL_QUERY_STRING_TYPES_INPUT", + "BlobPayloadEvent": "BLOB_PAYLOAD_EVENT", + "ClientOptionalDefaults": "CLIENT_OPTIONAL_DEFAULTS", + "ComplexError": "COMPLEX_ERROR", + "ComplexNestedErrorData": "COMPLEX_NESTED_ERROR_DATA", + "ConstantAndVariableQueryStringInput": "CONSTANT_AND_VARIABLE_QUERY_STRING_INPUT", + "ConstantQueryStringInput": "CONSTANT_QUERY_STRING_INPUT", + "ContentTypeParametersInput": "CONTENT_TYPE_PARAMETERS_INPUT", + "ContentTypeParametersOutput": "CONTENT_TYPE_PARAMETERS_OUTPUT", + "DatetimeOffsetsOutput": "DATETIME_OFFSETS_OUTPUT", + "Defaults": "DEFAULTS", + "Dialog": "DIALOG", + "DocumentTypeAsMapValueInputOutput": "DOCUMENT_TYPE_AS_MAP_VALUE_INPUT_OUTPUT", + "DocumentTypeAsPayloadInputOutput": "DOCUMENT_TYPE_AS_PAYLOAD_INPUT_OUTPUT", + "DocumentTypeInputOutput": "DOCUMENT_TYPE_INPUT_OUTPUT", + "DuplexStreamInput": "DUPLEX_STREAM_INPUT", + "DuplexStreamOutput": "DUPLEX_STREAM_OUTPUT", + "DuplexStreamWithDistinctStreamsInput": "DUPLEX_STREAM_WITH_DISTINCT_STREAMS_INPUT", + "DuplexStreamWithDistinctStreamsOutput": "DUPLEX_STREAM_WITH_DISTINCT_STREAMS_OUTPUT", + "DuplexStreamWithInitialMessagesInput": "DUPLEX_STREAM_WITH_INITIAL_MESSAGES_INPUT", + "DuplexStreamWithInitialMessagesOutput": "DUPLEX_STREAM_WITH_INITIAL_MESSAGES_OUTPUT", + "EmptyInputAndEmptyOutputInput": "EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT", + "EmptyInputAndEmptyOutputOutput": "EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT", + "EnumPayloadInput": "ENUM_PAYLOAD_INPUT", + "ErrorEvent": "ERROR_EVENT", + "EventStream": "EVENT_STREAM", + "EventStreamHeaders": "EVENT_STREAM", + "EventStreamBlobPayload": "EVENT_STREAM", + "EventStreamStringPayload": "EVENT_STREAM", + "EventStreamStructurePayload": "EVENT_STREAM", + "EventStreamUnionPayload": "EVENT_STREAM", + "EventStreamHeadersAndExplicitPayload": "EVENT_STREAM", + "EventStreamHeadersAndImplicitPayload": "EVENT_STREAM", + "EventStreamError": "EVENT_STREAM", + "EventStreamUnknown": "EVENT_STREAM", + "Farewell": "FAREWELL", + "FooError": "FOO_ERROR", + "FractionalSecondsOutput": "FRACTIONAL_SECONDS_OUTPUT", + "GreetingWithErrorsOutput": "GREETING_WITH_ERRORS_OUTPUT", + "HeadersAndExplicitPayloadEvent": "HEADERS_AND_EXPLICIT_PAYLOAD_EVENT", + "HeadersAndImplicitPayloadEvent": "HEADERS_AND_IMPLICIT_PAYLOAD_EVENT", + "HeadersEvent": "HEADERS_EVENT", + "HostLabelInput": "HOST_LABEL_INPUT", + "HttpChecksumRequiredInputOutput": "HTTP_CHECKSUM_REQUIRED_INPUT_OUTPUT", + "HttpEmptyPrefixHeadersInput": "HTTP_EMPTY_PREFIX_HEADERS_INPUT", + "HttpEmptyPrefixHeadersOutput": "HTTP_EMPTY_PREFIX_HEADERS_OUTPUT", + "HttpPayloadTraitsInputOutput": "HTTP_PAYLOAD_TRAITS_INPUT_OUTPUT", + "HttpPayloadTraitsWithMediaTypeInputOutput": "HTTP_PAYLOAD_TRAITS_WITH_MEDIA_TYPE_INPUT_OUTPUT", + "HttpPayloadWithStructureInputOutput": "HTTP_PAYLOAD_WITH_STRUCTURE_INPUT_OUTPUT", + "HttpPayloadWithUnionInputOutput": "HTTP_PAYLOAD_WITH_UNION_INPUT_OUTPUT", + "HttpPrefixHeadersInResponseInput": "HTTP_PREFIX_HEADERS_IN_RESPONSE_INPUT", + "HttpPrefixHeadersInResponseOutput": "HTTP_PREFIX_HEADERS_IN_RESPONSE_OUTPUT", + "HttpPrefixHeadersInput": "HTTP_PREFIX_HEADERS_INPUT", + "HttpPrefixHeadersOutput": "HTTP_PREFIX_HEADERS_OUTPUT", + "HttpQueryParamsOnlyInput": "HTTP_QUERY_PARAMS_ONLY_INPUT", + "HttpRequestWithFloatLabelsInput": "HTTP_REQUEST_WITH_FLOAT_LABELS_INPUT", + "HttpRequestWithGreedyLabelInPathInput": "HTTP_REQUEST_WITH_GREEDY_LABEL_IN_PATH_INPUT", + "HttpRequestWithLabelsAndTimestampFormatInput": "HTTP_REQUEST_WITH_LABELS_AND_TIMESTAMP_FORMAT_INPUT", + "HttpRequestWithLabelsInput": "HTTP_REQUEST_WITH_LABELS_INPUT", + "HttpRequestWithRegexLiteralInput": "HTTP_REQUEST_WITH_REGEX_LITERAL_INPUT", + "HttpResponseCodeOutput": "HTTP_RESPONSE_CODE_OUTPUT", + "IgnoreQueryParamsInResponseOutput": "IGNORE_QUERY_PARAMS_IN_RESPONSE_OUTPUT", + "InputAndOutputWithHeadersIO": "INPUT_AND_OUTPUT_WITH_HEADERS_IO", + "InputStreamInput": "INPUT_STREAM_INPUT", + "InputStreamWithInitialRequestInput": "INPUT_STREAM_WITH_INITIAL_REQUEST_INPUT", + "InvalidGreeting": "INVALID_GREETING", + "JsonBlobsInputOutput": "JSON_BLOBS_INPUT_OUTPUT", + "JsonEnumsInputOutput": "JSON_ENUMS_INPUT_OUTPUT", + "JsonIntEnumsInputOutput": "JSON_INT_ENUMS_INPUT_OUTPUT", + "JsonListsInputOutput": "JSON_LISTS_INPUT_OUTPUT", + "JsonMapsInputOutput": "JSON_MAPS_INPUT_OUTPUT", + "JsonTimestampsInputOutput": "JSON_TIMESTAMPS_INPUT_OUTPUT", + "MalformedAcceptWithGenericStringOutput": "MALFORMED_ACCEPT_WITH_GENERIC_STRING_OUTPUT", + "MalformedAcceptWithPayloadOutput": "MALFORMED_ACCEPT_WITH_PAYLOAD_OUTPUT", + "MalformedBlobInput": "MALFORMED_BLOB_INPUT", + "MalformedBooleanInput": "MALFORMED_BOOLEAN_INPUT", + "MalformedByteInput": "MALFORMED_BYTE_INPUT", + "MalformedContentTypeWithGenericStringInput": "MALFORMED_CONTENT_TYPE_WITH_GENERIC_STRING_INPUT", + "MalformedContentTypeWithPayloadInput": "MALFORMED_CONTENT_TYPE_WITH_PAYLOAD_INPUT", + "MalformedContentTypeWithoutBodyEmptyInputInput": "MALFORMED_CONTENT_TYPE_WITHOUT_BODY_EMPTY_INPUT_INPUT", + "MalformedDoubleInput": "MALFORMED_DOUBLE_INPUT", + "MalformedFloatInput": "MALFORMED_FLOAT_INPUT", + "MalformedIntegerInput": "MALFORMED_INTEGER_INPUT", + "MalformedListInput": "MALFORMED_LIST_INPUT", + "MalformedLongInput": "MALFORMED_LONG_INPUT", + "MalformedMapInput": "MALFORMED_MAP_INPUT", + "MalformedRequestBodyInput": "MALFORMED_REQUEST_BODY_INPUT", + "MalformedShortInput": "MALFORMED_SHORT_INPUT", + "MalformedStringInput": "MALFORMED_STRING_INPUT", + "MalformedTimestampBodyDateTimeInput": "MALFORMED_TIMESTAMP_BODY_DATE_TIME_INPUT", + "MalformedTimestampBodyDefaultInput": "MALFORMED_TIMESTAMP_BODY_DEFAULT_INPUT", + "MalformedTimestampBodyHttpDateInput": "MALFORMED_TIMESTAMP_BODY_HTTP_DATE_INPUT", + "MalformedTimestampHeaderDateTimeInput": "MALFORMED_TIMESTAMP_HEADER_DATE_TIME_INPUT", + "MalformedTimestampHeaderDefaultInput": "MALFORMED_TIMESTAMP_HEADER_DEFAULT_INPUT", + "MalformedTimestampHeaderEpochInput": "MALFORMED_TIMESTAMP_HEADER_EPOCH_INPUT", + "MalformedTimestampPathDefaultInput": "MALFORMED_TIMESTAMP_PATH_DEFAULT_INPUT", + "MalformedTimestampPathEpochInput": "MALFORMED_TIMESTAMP_PATH_EPOCH_INPUT", + "MalformedTimestampPathHttpDateInput": "MALFORMED_TIMESTAMP_PATH_HTTP_DATE_INPUT", + "MalformedTimestampQueryDefaultInput": "MALFORMED_TIMESTAMP_QUERY_DEFAULT_INPUT", + "MalformedTimestampQueryEpochInput": "MALFORMED_TIMESTAMP_QUERY_EPOCH_INPUT", + "MalformedTimestampQueryHttpDateInput": "MALFORMED_TIMESTAMP_QUERY_HTTP_DATE_INPUT", + "MalformedUnionInput": "MALFORMED_UNION_INPUT", + "MediaTypeHeaderInput": "MEDIA_TYPE_HEADER_INPUT", + "MediaTypeHeaderOutput": "MEDIA_TYPE_HEADER_OUTPUT", + "MyUnion": "MY_UNION", + "MyUnionStringValue": "MY_UNION", + "MyUnionBooleanValue": "MY_UNION", + "MyUnionNumberValue": "MY_UNION", + "MyUnionBlobValue": "MY_UNION", + "MyUnionTimestampValue": "MY_UNION", + "MyUnionEnumValue": "MY_UNION", + "MyUnionListValue": "MY_UNION", + "MyUnionMapValue": "MY_UNION", + "MyUnionStructureValue": "MY_UNION", + "MyUnionRenamedStructureValue": "MY_UNION", + "MyUnionUnionValue": "MY_UNION", + "MyUnionUnknown": "MY_UNION", + "NestedPayload": "NESTED_PAYLOAD", + "NestedUnion": "NESTED_UNION", + "NestedUnionStringValue": "NESTED_UNION", + "NestedUnionUnknown": "NESTED_UNION", + "NoInputAndOutputOutput": "NO_INPUT_AND_OUTPUT_OUTPUT", + "NullAndEmptyHeadersIO": "NULL_AND_EMPTY_HEADERS_IO", + "OmitsNullSerializesEmptyStringInput": "OMITS_NULL_SERIALIZES_EMPTY_STRING_INPUT", + "OmitsSerializingEmptyListsInput": "OMITS_SERIALIZING_EMPTY_LISTS_INPUT", + "OperationWithDefaultsInput": "OPERATION_WITH_DEFAULTS_INPUT", + "OperationWithDefaultsOutput": "OPERATION_WITH_DEFAULTS_OUTPUT", + "OperationWithNestedStructureInput": "OPERATION_WITH_NESTED_STRUCTURE_INPUT", + "OperationWithNestedStructureOutput": "OPERATION_WITH_NESTED_STRUCTURE_OUTPUT", + "OutputStreamOutput": "OUTPUT_STREAM_OUTPUT", + "OutputStreamWithInitialResponseOutput": "OUTPUT_STREAM_WITH_INITIAL_RESPONSE_OUTPUT", + "PayloadConfig": "PAYLOAD_CONFIG", + "PayloadStructure": "PAYLOAD_STRUCTURE", + "PayloadUnion": "PAYLOAD_UNION", + "PayloadUnionUnionMember": "PAYLOAD_UNION", + "PayloadUnionUnknown": "PAYLOAD_UNION", + "PlayerAction": "PLAYER_ACTION", + "PlayerActionQuit": "PLAYER_ACTION", + "PlayerActionUnknown": "PLAYER_ACTION", + "PostPlayerActionInput": "POST_PLAYER_ACTION_INPUT", + "PostPlayerActionOutput": "POST_PLAYER_ACTION_OUTPUT", + "PostUnionWithJsonNameInput": "POST_UNION_WITH_JSON_NAME_INPUT", + "PostUnionWithJsonNameOutput": "POST_UNION_WITH_JSON_NAME_OUTPUT", + "PutWithContentEncodingInput": "PUT_WITH_CONTENT_ENCODING_INPUT", + "QueryIdempotencyTokenAutoFillInput": "QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL_INPUT", + "QueryParamsAsStringListMapInput": "QUERY_PARAMS_AS_STRING_LIST_MAP_INPUT", + "QueryPrecedenceInput": "QUERY_PRECEDENCE_INPUT", + "RecursiveShapesInputOutput": "RECURSIVE_SHAPES_INPUT_OUTPUT", + "RecursiveShapesInputOutputNested1": "RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1", + "RecursiveShapesInputOutputNested2": "RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2", + "ResponseCodeHttpFallbackInputOutput": "RESPONSE_CODE_HTTP_FALLBACK_INPUT_OUTPUT", + "ResponseCodeRequiredOutput": "RESPONSE_CODE_REQUIRED_OUTPUT", + "ServiceUnavailableError": "SERVICE_UNAVAILABLE_ERROR", + "SimpleScalarPropertiesInputOutput": "SIMPLE_SCALAR_PROPERTIES_INPUT_OUTPUT", + "SimpleUnion": "SIMPLE_UNION", + "SimpleUnionInt": "SIMPLE_UNION", + "SimpleUnionString": "SIMPLE_UNION", + "SimpleUnionUnknown": "SIMPLE_UNION", + "SingletonEvent": "SINGLETON_EVENT", + "SingletonEventStream": "SINGLETON_EVENT_STREAM", + "SingletonEventStreamSingleton": "SINGLETON_EVENT_STREAM", + "SingletonEventStreamUnknown": "SINGLETON_EVENT_STREAM", + "SparseJsonListsInputOutput": "SPARSE_JSON_LISTS_INPUT_OUTPUT", + "SparseJsonMapsInputOutput": "SPARSE_JSON_MAPS_INPUT_OUTPUT", + "StreamingTraitsInputOutput": "STREAMING_TRAITS_INPUT_OUTPUT", + "StreamingTraitsRequireLengthInput": "STREAMING_TRAITS_REQUIRE_LENGTH_INPUT", + "StreamingTraitsWithMediaTypeInputOutput": "STREAMING_TRAITS_WITH_MEDIA_TYPE_INPUT_OUTPUT", + "StringEnum": "STRING_ENUM", + "StringPayloadEvent": "STRING_PAYLOAD_EVENT", + "StringPayloadInput": "STRING_PAYLOAD_INPUT", + "StructureListMember": "STRUCTURE_LIST_MEMBER", + "StructurePayloadEvent": "STRUCTURE_PAYLOAD_EVENT", + "TestBodyStructureInputOutput": "TEST_BODY_STRUCTURE_INPUT_OUTPUT", + "TestConfig": "TEST_CONFIG", + "TestEnum": "TEST_ENUM", + "TestIntEnum": "TEST_INT_ENUM", + "TestNoPayloadInputOutput": "TEST_NO_PAYLOAD_INPUT_OUTPUT", + "TestPayloadBlobInputOutput": "TEST_PAYLOAD_BLOB_INPUT_OUTPUT", + "TestPayloadStructureInputOutput": "TEST_PAYLOAD_STRUCTURE_INPUT_OUTPUT", + "TimestampFormatHeadersIO": "TIMESTAMP_FORMAT_HEADERS_IO", + "TopLevel": "TOP_LEVEL", + "UnionInputOutput": "UNION_INPUT_OUTPUT", + "UnionPayload": "UNION_PAYLOAD", + "UnionPayloadGreeting": "UNION_PAYLOAD", + "UnionPayloadUnknown": "UNION_PAYLOAD", + "UnionPayloadEvent": "UNION_PAYLOAD_EVENT", + "UnionWithJsonName": "UNION_WITH_JSON_NAME", + "UnionWithJsonNameFoo": "UNION_WITH_JSON_NAME", + "UnionWithJsonNameBar": "UNION_WITH_JSON_NAME", + "UnionWithJsonNameBaz": "UNION_WITH_JSON_NAME", + "UnionWithJsonNameUnknown": "UNION_WITH_JSON_NAME", + "RenamedGreeting": "RENAMED_GREETING", + "FooEnum": "FOO_ENUM", + "GreetingStruct": "GREETING_STRUCT", + "IntegerEnum": "INTEGER_ENUM", +} + +_RENAMES = { + "RenamedGreeting": "RENAMED_GREETING", +} + +_TARGET_NAMES = { + "aws.protocoltests.restjson.nested#GreetingStruct": "RenamedGreeting", +} + +_MODEL_NAMES = (*tuple(_MODEL_INDEX), "Unit") +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "AllQueryStringTypesInput", + "BlobPayloadEvent", + "ClientOptionalDefaults", + "ComplexError", + "ComplexNestedErrorData", + "ConstantAndVariableQueryStringInput", + "ConstantQueryStringInput", + "ContentTypeParametersInput", + "ContentTypeParametersOutput", + "DatetimeOffsetsOutput", + "Defaults", + "Dialog", + "DocumentTypeAsMapValueInputOutput", + "DocumentTypeAsPayloadInputOutput", + "DocumentTypeInputOutput", + "DuplexStreamInput", + "DuplexStreamOutput", + "DuplexStreamWithDistinctStreamsInput", + "DuplexStreamWithDistinctStreamsOutput", + "DuplexStreamWithInitialMessagesInput", + "DuplexStreamWithInitialMessagesOutput", + "EmptyInputAndEmptyOutputInput", + "EmptyInputAndEmptyOutputOutput", + "EnumPayloadInput", + "ErrorEvent", + "EventStream", + "Farewell", + "FooEnum", + "FooError", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "HeadersAndExplicitPayloadEvent", + "HeadersAndImplicitPayloadEvent", + "HeadersEvent", + "HostLabelInput", + "HttpChecksumRequiredInputOutput", + "HttpEmptyPrefixHeadersInput", + "HttpEmptyPrefixHeadersOutput", + "HttpPayloadTraitsInputOutput", + "HttpPayloadTraitsWithMediaTypeInputOutput", + "HttpPayloadWithStructureInputOutput", + "HttpPayloadWithUnionInputOutput", + "HttpPrefixHeadersInResponseInput", + "HttpPrefixHeadersInResponseOutput", + "HttpPrefixHeadersInput", + "HttpPrefixHeadersOutput", + "HttpQueryParamsOnlyInput", + "HttpRequestWithFloatLabelsInput", + "HttpRequestWithGreedyLabelInPathInput", + "HttpRequestWithLabelsAndTimestampFormatInput", + "HttpRequestWithLabelsInput", + "HttpRequestWithRegexLiteralInput", + "HttpResponseCodeOutput", + "IgnoreQueryParamsInResponseOutput", + "InputAndOutputWithHeadersIO", + "InputStreamInput", + "InputStreamWithInitialRequestInput", + "IntegerEnum", + "InvalidGreeting", + "JsonBlobsInputOutput", + "JsonEnumsInputOutput", + "JsonIntEnumsInputOutput", + "JsonListsInputOutput", + "JsonMapsInputOutput", + "JsonTimestampsInputOutput", + "MalformedAcceptWithGenericStringOutput", + "MalformedAcceptWithPayloadOutput", + "MalformedBlobInput", + "MalformedBooleanInput", + "MalformedByteInput", + "MalformedContentTypeWithGenericStringInput", + "MalformedContentTypeWithPayloadInput", + "MalformedContentTypeWithoutBodyEmptyInputInput", + "MalformedDoubleInput", + "MalformedFloatInput", + "MalformedIntegerInput", + "MalformedListInput", + "MalformedLongInput", + "MalformedMapInput", + "MalformedRequestBodyInput", + "MalformedShortInput", + "MalformedStringInput", + "MalformedTimestampBodyDateTimeInput", + "MalformedTimestampBodyDefaultInput", + "MalformedTimestampBodyHttpDateInput", + "MalformedTimestampHeaderDateTimeInput", + "MalformedTimestampHeaderDefaultInput", + "MalformedTimestampHeaderEpochInput", + "MalformedTimestampPathDefaultInput", + "MalformedTimestampPathEpochInput", + "MalformedTimestampPathHttpDateInput", + "MalformedTimestampQueryDefaultInput", + "MalformedTimestampQueryEpochInput", + "MalformedTimestampQueryHttpDateInput", + "MalformedUnionInput", + "MediaTypeHeaderInput", + "MediaTypeHeaderOutput", + "MyUnion", + "NestedPayload", + "NestedUnion", + "NoInputAndOutputOutput", + "NullAndEmptyHeadersIO", + "OmitsNullSerializesEmptyStringInput", + "OmitsSerializingEmptyListsInput", + "OperationWithDefaultsInput", + "OperationWithDefaultsOutput", + "OperationWithNestedStructureInput", + "OperationWithNestedStructureOutput", + "OutputStreamOutput", + "OutputStreamWithInitialResponseOutput", + "PayloadConfig", + "PayloadStructure", + "PayloadUnion", + "PlayerAction", + "PostPlayerActionInput", + "PostPlayerActionOutput", + "PostUnionWithJsonNameInput", + "PostUnionWithJsonNameOutput", + "PutWithContentEncodingInput", + "QueryIdempotencyTokenAutoFillInput", + "QueryParamsAsStringListMapInput", + "QueryPrecedenceInput", + "RecursiveShapesInputOutput", + "RecursiveShapesInputOutputNested1", + "RecursiveShapesInputOutputNested2", + "RenamedGreeting", + "ResponseCodeHttpFallbackInputOutput", + "ResponseCodeRequiredOutput", + "ServiceUnavailableError", + "SimpleScalarPropertiesInputOutput", + "SimpleUnion", + "SingletonEvent", + "SingletonEventStream", + "SparseJsonListsInputOutput", + "SparseJsonMapsInputOutput", + "StreamingTraitsInputOutput", + "StreamingTraitsRequireLengthInput", + "StreamingTraitsWithMediaTypeInputOutput", + "StringEnum", + "StringPayloadEvent", + "StringPayloadInput", + "StructureListMember", + "StructurePayloadEvent", + "TestBodyStructureInputOutput", + "TestConfig", + "TestEnum", + "TestIntEnum", + "TestNoPayloadInputOutput", + "TestPayloadBlobInputOutput", + "TestPayloadStructureInputOutput", + "TimestampFormatHeadersIO", + "TopLevel", + "UnionInputOutput", + "UnionPayload", + "UnionPayloadEvent", + "UnionWithJsonName", + "Unit", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/rest-json-1/src/restjson/models.pyi b/codegen-output-py/rest-json-1/src/restjson/models.pyi new file mode 100644 index 000000000..67b18df80 --- /dev/null +++ b/codegen-output-py/rest-json-1/src/restjson/models.pyi @@ -0,0 +1,2126 @@ +from dataclasses import dataclass +from datetime import datetime +from enum import IntEnum, StrEnum +from typing import Self + +from smithy_core.aio.interfaces import StreamingBlob +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.documents import Document +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.serializers import ShapeSerializer +from smithy_core.types import UnknownEnumMixin + +__all__ = [ + "AllQueryStringTypesInput", + "BlobPayloadEvent", + "ClientOptionalDefaults", + "ComplexError", + "ComplexNestedErrorData", + "ConstantAndVariableQueryStringInput", + "ConstantQueryStringInput", + "ContentTypeParametersInput", + "ContentTypeParametersOutput", + "DatetimeOffsetsOutput", + "Defaults", + "Dialog", + "DocumentTypeAsMapValueInputOutput", + "DocumentTypeAsPayloadInputOutput", + "DocumentTypeInputOutput", + "DuplexStreamInput", + "DuplexStreamOutput", + "DuplexStreamWithDistinctStreamsInput", + "DuplexStreamWithDistinctStreamsOutput", + "DuplexStreamWithInitialMessagesInput", + "DuplexStreamWithInitialMessagesOutput", + "EmptyInputAndEmptyOutputInput", + "EmptyInputAndEmptyOutputOutput", + "EnumPayloadInput", + "ErrorEvent", + "EventStream", + "EventStreamBlobPayload", + "EventStreamError", + "EventStreamHeaders", + "EventStreamHeadersAndExplicitPayload", + "EventStreamHeadersAndImplicitPayload", + "EventStreamStringPayload", + "EventStreamStructurePayload", + "EventStreamUnionPayload", + "EventStreamUnknown", + "Farewell", + "FooEnum", + "FooError", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "HeadersAndExplicitPayloadEvent", + "HeadersAndImplicitPayloadEvent", + "HeadersEvent", + "HostLabelInput", + "HttpChecksumRequiredInputOutput", + "HttpEmptyPrefixHeadersInput", + "HttpEmptyPrefixHeadersOutput", + "HttpPayloadTraitsInputOutput", + "HttpPayloadTraitsWithMediaTypeInputOutput", + "HttpPayloadWithStructureInputOutput", + "HttpPayloadWithUnionInputOutput", + "HttpPrefixHeadersInResponseInput", + "HttpPrefixHeadersInResponseOutput", + "HttpPrefixHeadersInput", + "HttpPrefixHeadersOutput", + "HttpQueryParamsOnlyInput", + "HttpRequestWithFloatLabelsInput", + "HttpRequestWithGreedyLabelInPathInput", + "HttpRequestWithLabelsAndTimestampFormatInput", + "HttpRequestWithLabelsInput", + "HttpRequestWithRegexLiteralInput", + "HttpResponseCodeOutput", + "IgnoreQueryParamsInResponseOutput", + "InputAndOutputWithHeadersIO", + "InputStreamInput", + "InputStreamWithInitialRequestInput", + "IntegerEnum", + "InvalidGreeting", + "JsonBlobsInputOutput", + "JsonEnumsInputOutput", + "JsonIntEnumsInputOutput", + "JsonListsInputOutput", + "JsonMapsInputOutput", + "JsonTimestampsInputOutput", + "MalformedAcceptWithGenericStringOutput", + "MalformedAcceptWithPayloadOutput", + "MalformedBlobInput", + "MalformedBooleanInput", + "MalformedByteInput", + "MalformedContentTypeWithGenericStringInput", + "MalformedContentTypeWithPayloadInput", + "MalformedContentTypeWithoutBodyEmptyInputInput", + "MalformedDoubleInput", + "MalformedFloatInput", + "MalformedIntegerInput", + "MalformedListInput", + "MalformedLongInput", + "MalformedMapInput", + "MalformedRequestBodyInput", + "MalformedShortInput", + "MalformedStringInput", + "MalformedTimestampBodyDateTimeInput", + "MalformedTimestampBodyDefaultInput", + "MalformedTimestampBodyHttpDateInput", + "MalformedTimestampHeaderDateTimeInput", + "MalformedTimestampHeaderDefaultInput", + "MalformedTimestampHeaderEpochInput", + "MalformedTimestampPathDefaultInput", + "MalformedTimestampPathEpochInput", + "MalformedTimestampPathHttpDateInput", + "MalformedTimestampQueryDefaultInput", + "MalformedTimestampQueryEpochInput", + "MalformedTimestampQueryHttpDateInput", + "MalformedUnionInput", + "MediaTypeHeaderInput", + "MediaTypeHeaderOutput", + "MyUnion", + "MyUnionBlobValue", + "MyUnionBooleanValue", + "MyUnionEnumValue", + "MyUnionListValue", + "MyUnionMapValue", + "MyUnionNumberValue", + "MyUnionRenamedStructureValue", + "MyUnionStringValue", + "MyUnionStructureValue", + "MyUnionTimestampValue", + "MyUnionUnionValue", + "MyUnionUnknown", + "NestedPayload", + "NestedUnion", + "NestedUnionStringValue", + "NestedUnionUnknown", + "NoInputAndOutputOutput", + "NullAndEmptyHeadersIO", + "OmitsNullSerializesEmptyStringInput", + "OmitsSerializingEmptyListsInput", + "OperationWithDefaultsInput", + "OperationWithDefaultsOutput", + "OperationWithNestedStructureInput", + "OperationWithNestedStructureOutput", + "OutputStreamOutput", + "OutputStreamWithInitialResponseOutput", + "PayloadConfig", + "PayloadStructure", + "PayloadUnion", + "PayloadUnionUnionMember", + "PayloadUnionUnknown", + "PlayerAction", + "PlayerActionQuit", + "PlayerActionUnknown", + "PostPlayerActionInput", + "PostPlayerActionOutput", + "PostUnionWithJsonNameInput", + "PostUnionWithJsonNameOutput", + "PutWithContentEncodingInput", + "QueryIdempotencyTokenAutoFillInput", + "QueryParamsAsStringListMapInput", + "QueryPrecedenceInput", + "RecursiveShapesInputOutput", + "RecursiveShapesInputOutputNested1", + "RecursiveShapesInputOutputNested2", + "RenamedGreeting", + "ResponseCodeHttpFallbackInputOutput", + "ResponseCodeRequiredOutput", + "ServiceError", + "ServiceUnavailableError", + "SimpleScalarPropertiesInputOutput", + "SimpleUnion", + "SimpleUnionInt", + "SimpleUnionString", + "SimpleUnionUnknown", + "SingletonEvent", + "SingletonEventStream", + "SingletonEventStreamSingleton", + "SingletonEventStreamUnknown", + "SparseJsonListsInputOutput", + "SparseJsonMapsInputOutput", + "StreamingTraitsInputOutput", + "StreamingTraitsRequireLengthInput", + "StreamingTraitsWithMediaTypeInputOutput", + "StringEnum", + "StringPayloadEvent", + "StringPayloadInput", + "StructureListMember", + "StructurePayloadEvent", + "TestBodyStructureInputOutput", + "TestConfig", + "TestEnum", + "TestIntEnum", + "TestNoPayloadInputOutput", + "TestPayloadBlobInputOutput", + "TestPayloadStructureInputOutput", + "TimestampFormatHeadersIO", + "TopLevel", + "UnionInputOutput", + "UnionPayload", + "UnionPayloadEvent", + "UnionPayloadGreeting", + "UnionPayloadUnknown", + "UnionWithJsonName", + "UnionWithJsonNameBar", + "UnionWithJsonNameBaz", + "UnionWithJsonNameFoo", + "UnionWithJsonNameUnknown", + "Unit", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class AllQueryStringTypesInput(_SerdeShape): + "Dataclass for AllQueryStringTypesInput structure." + + query_string: str | None = ... + query_string_list: list[str] | None = ... + query_string_set: list[str] | None = ... + query_byte: int | None = ... + query_short: int | None = ... + query_integer: int | None = ... + query_integer_list: list[int] | None = ... + query_integer_set: list[int] | None = ... + query_long: int | None = ... + query_float: float | None = ... + query_double: float | None = ... + query_double_list: list[float] | None = ... + query_boolean: bool | None = ... + query_boolean_list: list[bool] | None = ... + query_timestamp: datetime | None = ... + query_timestamp_list: list[datetime] | None = ... + query_enum: str | None = ... + query_enum_list: list[str] | None = ... + query_integer_enum: int | None = ... + query_integer_enum_list: list[int] | None = ... + query_params_map_of_string_list: dict[str, list[str]] | None = ... + +@dataclass(kw_only=True) +class BlobPayloadEvent(_SerdeShape): + "Dataclass for BlobPayloadEvent structure." + + payload: bytes | None = ... + +@dataclass(kw_only=True) +class ClientOptionalDefaults(_SerdeShape): + "Dataclass for ClientOptionalDefaults structure." + + member: int | None = ... + +@dataclass(kw_only=True) +class ComplexError(ServiceError, _SerdeShape): + "This error is thrown when a request is invalid." + + header: str | None = ... + top_level: str | None = ... + nested: ComplexNestedErrorData | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ComplexNestedErrorData(_SerdeShape): + "Dataclass for ComplexNestedErrorData structure." + + foo: str | None = ... + +@dataclass(kw_only=True) +class ConstantAndVariableQueryStringInput(_SerdeShape): + "Dataclass for ConstantAndVariableQueryStringInput structure." + + baz: str | None = ... + maybe_set: str | None = ... + +@dataclass(kw_only=True) +class ConstantQueryStringInput(_SerdeShape): + "Dataclass for ConstantQueryStringInput structure." + + hello: str | None = ... + +@dataclass(kw_only=True) +class ContentTypeParametersInput(_SerdeShape): + "Dataclass for ContentTypeParametersInput structure." + + value: int | None = ... + +@dataclass(kw_only=True) +class ContentTypeParametersOutput(_SerdeShape): + "Dataclass for ContentTypeParametersOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class DatetimeOffsetsOutput(_SerdeShape): + "Dataclass for DatetimeOffsetsOutput structure." + + datetime_: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class Defaults(_SerdeShape): + "Dataclass for Defaults structure." + + default_string: str | None = ... + default_boolean: bool | None = ... + default_list: list[str] | None = ... + default_document_map: Document | None = ... + default_document_string: Document | None = ... + default_document_boolean: Document | None = ... + default_document_list: Document | None = ... + default_null_document: Document | None = ... + default_timestamp: datetime | None = ... + default_blob: bytes | None = ... + default_byte: int | None = ... + default_short: int | None = ... + default_integer: int | None = ... + default_long: int | None = ... + default_float: float | None = ... + default_double: float | None = ... + default_map: dict[str, str] | None = ... + default_enum: str | None = ... + default_int_enum: int | None = ... + empty_string: str | None = ... + false_boolean: bool | None = ... + empty_blob: bytes | None = ... + zero_byte: int | None = ... + zero_short: int | None = ... + zero_integer: int | None = ... + zero_long: int | None = ... + zero_float: float | None = ... + zero_double: float | None = ... + +@dataclass(kw_only=True) +class Dialog(_SerdeShape): + "Dataclass for Dialog structure." + + language: str | None = ... + greeting: str | None = ... + farewell: Farewell | None = ... + +@dataclass(kw_only=True) +class DocumentTypeAsMapValueInputOutput(_SerdeShape): + "Dataclass for DocumentTypeAsMapValueInputOutput structure." + + doc_valued_map: dict[str, Document] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class DocumentTypeAsPayloadInputOutput(_SerdeShape): + "Dataclass for DocumentTypeAsPayloadInputOutput structure." + + document_value: Document | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class DocumentTypeInputOutput(_SerdeShape): + "Dataclass for DocumentTypeInputOutput structure." + + string_value: str | None = ... + document_value: Document | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class DuplexStreamInput(_SerdeShape): + "Dataclass for DuplexStreamInput structure." + +@dataclass(kw_only=True) +class DuplexStreamOutput(_SerdeShape): + "Dataclass for DuplexStreamOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class DuplexStreamWithDistinctStreamsInput(_SerdeShape): + "Dataclass for DuplexStreamWithDistinctStreamsInput structure." + +@dataclass(kw_only=True) +class DuplexStreamWithDistinctStreamsOutput(_SerdeShape): + "Dataclass for DuplexStreamWithDistinctStreamsOutput structure." + + stream: SingletonEventStream | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class DuplexStreamWithInitialMessagesInput(_SerdeShape): + "Dataclass for DuplexStreamWithInitialMessagesInput structure." + + initial_request_member: str | None = ... + +@dataclass(kw_only=True) +class DuplexStreamWithInitialMessagesOutput(_SerdeShape): + "Dataclass for DuplexStreamWithInitialMessagesOutput structure." + + initial_response_member: str + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class EmptyInputAndEmptyOutputInput(_SerdeShape): + "Dataclass for EmptyInputAndEmptyOutputInput structure." + +@dataclass(kw_only=True) +class EmptyInputAndEmptyOutputOutput(_SerdeShape): + "Dataclass for EmptyInputAndEmptyOutputOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class EnumPayloadInput(_SerdeShape): + "Dataclass for EnumPayloadInput structure." + + payload: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ErrorEvent(ServiceError, _SerdeShape): + "Dataclass for ErrorEvent structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass +class EventStreamHeaders(_SerdeShape): + value: HeadersEvent + +@dataclass +class EventStreamBlobPayload(_SerdeShape): + value: BlobPayloadEvent + +@dataclass +class EventStreamStringPayload(_SerdeShape): + value: StringPayloadEvent + +@dataclass +class EventStreamStructurePayload(_SerdeShape): + value: StructurePayloadEvent + +@dataclass +class EventStreamUnionPayload(_SerdeShape): + value: UnionPayloadEvent + +@dataclass +class EventStreamHeadersAndExplicitPayload(_SerdeShape): + value: HeadersAndExplicitPayloadEvent + +@dataclass +class EventStreamHeadersAndImplicitPayload(_SerdeShape): + value: HeadersAndImplicitPayloadEvent + +@dataclass +class EventStreamError(_SerdeShape): + value: ErrorEvent + +@dataclass +class EventStreamUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +EventStream = ( + EventStreamHeaders + | EventStreamBlobPayload + | EventStreamStringPayload + | EventStreamStructurePayload + | EventStreamUnionPayload + | EventStreamHeadersAndExplicitPayload + | EventStreamHeadersAndImplicitPayload + | EventStreamError + | EventStreamUnknown +) + +class _EventStreamDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> EventStream: ... + +@dataclass(kw_only=True) +class Farewell(_SerdeShape): + "Dataclass for Farewell structure." + + phrase: str | None = ... + +@dataclass(kw_only=True) +class FooError(ServiceError, _SerdeShape): + """ + This error has test cases that test some of the dark corners of Amazon + service + framework history. It should only be implemented by clients. + """ + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FractionalSecondsOutput(_SerdeShape): + "Dataclass for FractionalSecondsOutput structure." + + datetime_: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class GreetingWithErrorsOutput(_SerdeShape): + "Dataclass for GreetingWithErrorsOutput structure." + + greeting: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HeadersAndExplicitPayloadEvent(_SerdeShape): + "Dataclass for HeadersAndExplicitPayloadEvent structure." + + header: str | None = ... + payload: PayloadStructure | None = ... + +@dataclass(kw_only=True) +class HeadersAndImplicitPayloadEvent(_SerdeShape): + "Dataclass for HeadersAndImplicitPayloadEvent structure." + + header: str | None = ... + payload: str | None = ... + +@dataclass(kw_only=True) +class HeadersEvent(_SerdeShape): + "Dataclass for HeadersEvent structure." + + boolean_header: bool | None = ... + byte_header: int | None = ... + short_header: int | None = ... + int_header: int | None = ... + long_header: int | None = ... + blob_header: bytes | None = ... + string_header: str | None = ... + timestamp_header: datetime | None = ... + +@dataclass(kw_only=True) +class HostLabelInput(_SerdeShape): + "Dataclass for HostLabelInput structure." + + label: str | None = ... + +@dataclass(kw_only=True) +class HttpChecksumRequiredInputOutput(_SerdeShape): + "Dataclass for HttpChecksumRequiredInputOutput structure." + + foo: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpEmptyPrefixHeadersInput(_SerdeShape): + "Dataclass for HttpEmptyPrefixHeadersInput structure." + + prefix_headers: dict[str, str] | None = ... + specific_header: str | None = ... + +@dataclass(kw_only=True) +class HttpEmptyPrefixHeadersOutput(_SerdeShape): + "Dataclass for HttpEmptyPrefixHeadersOutput structure." + + prefix_headers: dict[str, str] | None = ... + specific_header: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPayloadTraitsInputOutput(_SerdeShape): + "Dataclass for HttpPayloadTraitsInputOutput structure." + + foo: str | None = ... + blob: bytes | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPayloadTraitsWithMediaTypeInputOutput(_SerdeShape): + "Dataclass for HttpPayloadTraitsWithMediaTypeInputOutput structure." + + foo: str | None = ... + blob: bytes | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPayloadWithStructureInputOutput(_SerdeShape): + "Dataclass for HttpPayloadWithStructureInputOutput structure." + + nested: NestedPayload | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPayloadWithUnionInputOutput(_SerdeShape): + "Dataclass for HttpPayloadWithUnionInputOutput structure." + + nested: UnionPayload | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPrefixHeadersInResponseInput(_SerdeShape): + "Dataclass for HttpPrefixHeadersInResponseInput structure." + +@dataclass(kw_only=True) +class HttpPrefixHeadersInResponseOutput(_SerdeShape): + "Dataclass for HttpPrefixHeadersInResponseOutput structure." + + prefix_headers: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPrefixHeadersInput(_SerdeShape): + "Dataclass for HttpPrefixHeadersInput structure." + + foo: str | None = ... + foo_map: dict[str, str] | None = ... + +@dataclass(kw_only=True) +class HttpPrefixHeadersOutput(_SerdeShape): + "Dataclass for HttpPrefixHeadersOutput structure." + + foo: str | None = ... + foo_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpQueryParamsOnlyInput(_SerdeShape): + "Dataclass for HttpQueryParamsOnlyInput structure." + + query_map: dict[str, str] | None = ... + +@dataclass(kw_only=True) +class HttpRequestWithFloatLabelsInput(_SerdeShape): + "Dataclass for HttpRequestWithFloatLabelsInput structure." + + float_: float | None = ... + double: float | None = ... + +@dataclass(kw_only=True) +class HttpRequestWithGreedyLabelInPathInput(_SerdeShape): + "Dataclass for HttpRequestWithGreedyLabelInPathInput structure." + + foo: str | None = ... + baz: str | None = ... + +@dataclass(kw_only=True) +class HttpRequestWithLabelsAndTimestampFormatInput(_SerdeShape): + "Dataclass for HttpRequestWithLabelsAndTimestampFormatInput structure." + + member_epoch_seconds: datetime | None = ... + member_http_date: datetime | None = ... + member_date_time: datetime | None = ... + default_format: datetime | None = ... + target_epoch_seconds: datetime | None = ... + target_http_date: datetime | None = ... + target_date_time: datetime | None = ... + +@dataclass(kw_only=True) +class HttpRequestWithLabelsInput(_SerdeShape): + "Dataclass for HttpRequestWithLabelsInput structure." + + string: str | None = ... + short: int | None = ... + integer: int | None = ... + long: int | None = ... + float_: float | None = ... + double: float | None = ... + boolean: bool | None = ... + "Serialized in the path as true or false." + timestamp: datetime | None = ... + """ + Note that this member has no format, so it's serialized as an RFC 3399 + date-time. + """ + +@dataclass(kw_only=True) +class HttpRequestWithRegexLiteralInput(_SerdeShape): + "Dataclass for HttpRequestWithRegexLiteralInput structure." + + str_: str | None = ... + +@dataclass(kw_only=True) +class HttpResponseCodeOutput(_SerdeShape): + "Dataclass for HttpResponseCodeOutput structure." + + status: int | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class IgnoreQueryParamsInResponseOutput(_SerdeShape): + "Dataclass for IgnoreQueryParamsInResponseOutput structure." + + baz: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class InputAndOutputWithHeadersIO(_SerdeShape): + "Dataclass for InputAndOutputWithHeadersIO structure." + + header_string: str | None = ... + header_byte: int | None = ... + header_short: int | None = ... + header_integer: int | None = ... + header_long: int | None = ... + header_float: float | None = ... + header_double: float | None = ... + header_true_bool: bool | None = ... + header_false_bool: bool | None = ... + header_string_list: list[str] | None = ... + header_string_set: list[str] | None = ... + header_integer_list: list[int] | None = ... + header_boolean_list: list[bool] | None = ... + header_timestamp_list: list[datetime] | None = ... + header_enum: str | None = ... + header_enum_list: list[str] | None = ... + header_integer_enum: int | None = ... + header_integer_enum_list: list[int] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class InputStreamInput(_SerdeShape): + "Dataclass for InputStreamInput structure." + +@dataclass(kw_only=True) +class InputStreamWithInitialRequestInput(_SerdeShape): + "Dataclass for InputStreamWithInitialRequestInput structure." + + initial_request_member: str | None = ... + +@dataclass(kw_only=True) +class InvalidGreeting(ServiceError, _SerdeShape): + "This error is thrown when an invalid greeting value is provided." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class JsonBlobsInputOutput(_SerdeShape): + "Dataclass for JsonBlobsInputOutput structure." + + data: bytes | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class JsonEnumsInputOutput(_SerdeShape): + "Dataclass for JsonEnumsInputOutput structure." + + foo_enum1: str | None = ... + foo_enum2: str | None = ... + foo_enum3: str | None = ... + foo_enum_list: list[str] | None = ... + foo_enum_set: list[str] | None = ... + foo_enum_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class JsonIntEnumsInputOutput(_SerdeShape): + "Dataclass for JsonIntEnumsInputOutput structure." + + integer_enum1: int | None = ... + integer_enum2: int | None = ... + integer_enum3: int | None = ... + integer_enum_list: list[int] | None = ... + integer_enum_set: list[int] | None = ... + integer_enum_map: dict[str, int] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class JsonListsInputOutput(_SerdeShape): + "Dataclass for JsonListsInputOutput structure." + + string_list: list[str] | None = ... + string_set: list[str] | None = ... + integer_list: list[int] | None = ... + boolean_list: list[bool] | None = ... + timestamp_list: list[datetime] | None = ... + enum_list: list[str] | None = ... + int_enum_list: list[int] | None = ... + nested_string_list: list[list[str]] | None = ... + structure_list: list[StructureListMember] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class JsonMapsInputOutput(_SerdeShape): + "Dataclass for JsonMapsInputOutput structure." + + dense_struct_map: dict[str, GreetingStruct] | None = ... + dense_number_map: dict[str, int] | None = ... + dense_boolean_map: dict[str, bool] | None = ... + dense_string_map: dict[str, str] | None = ... + dense_set_map: dict[str, list[str]] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class JsonTimestampsInputOutput(_SerdeShape): + "Dataclass for JsonTimestampsInputOutput structure." + + normal: datetime | None = ... + date_time: datetime | None = ... + date_time_on_target: datetime | None = ... + epoch_seconds: datetime | None = ... + epoch_seconds_on_target: datetime | None = ... + http_date: datetime | None = ... + http_date_on_target: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class MalformedAcceptWithGenericStringOutput(_SerdeShape): + "Dataclass for MalformedAcceptWithGenericStringOutput structure." + + payload: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class MalformedAcceptWithPayloadOutput(_SerdeShape): + "Dataclass for MalformedAcceptWithPayloadOutput structure." + + payload: bytes | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class MalformedBlobInput(_SerdeShape): + "Dataclass for MalformedBlobInput structure." + + blob: bytes | None = ... + +@dataclass(kw_only=True) +class MalformedBooleanInput(_SerdeShape): + "Dataclass for MalformedBooleanInput structure." + + boolean_in_body: bool | None = ... + boolean_in_path: bool | None = ... + boolean_in_query: bool | None = ... + boolean_in_header: bool | None = ... + +@dataclass(kw_only=True) +class MalformedByteInput(_SerdeShape): + "Dataclass for MalformedByteInput structure." + + byte_in_body: int | None = ... + byte_in_path: int | None = ... + byte_in_query: int | None = ... + byte_in_header: int | None = ... + +@dataclass(kw_only=True) +class MalformedContentTypeWithGenericStringInput(_SerdeShape): + "Dataclass for MalformedContentTypeWithGenericStringInput structure." + + payload: str | None = ... + +@dataclass(kw_only=True) +class MalformedContentTypeWithPayloadInput(_SerdeShape): + "Dataclass for MalformedContentTypeWithPayloadInput structure." + + payload: bytes | None = ... + +@dataclass(kw_only=True) +class MalformedContentTypeWithoutBodyEmptyInputInput(_SerdeShape): + "Dataclass for MalformedContentTypeWithoutBodyEmptyInputInput structure." + + header: str | None = ... + +@dataclass(kw_only=True) +class MalformedDoubleInput(_SerdeShape): + "Dataclass for MalformedDoubleInput structure." + + double_in_body: float | None = ... + double_in_path: float | None = ... + double_in_query: float | None = ... + double_in_header: float | None = ... + +@dataclass(kw_only=True) +class MalformedFloatInput(_SerdeShape): + "Dataclass for MalformedFloatInput structure." + + float_in_body: float | None = ... + float_in_path: float | None = ... + float_in_query: float | None = ... + float_in_header: float | None = ... + +@dataclass(kw_only=True) +class MalformedIntegerInput(_SerdeShape): + "Dataclass for MalformedIntegerInput structure." + + integer_in_body: int | None = ... + integer_in_path: int | None = ... + integer_in_query: int | None = ... + integer_in_header: int | None = ... + +@dataclass(kw_only=True) +class MalformedListInput(_SerdeShape): + "Dataclass for MalformedListInput structure." + + body_list: list[str] | None = ... + +@dataclass(kw_only=True) +class MalformedLongInput(_SerdeShape): + "Dataclass for MalformedLongInput structure." + + long_in_body: int | None = ... + long_in_path: int | None = ... + long_in_query: int | None = ... + long_in_header: int | None = ... + +@dataclass(kw_only=True) +class MalformedMapInput(_SerdeShape): + "Dataclass for MalformedMapInput structure." + + body_map: dict[str, str] | None = ... + +@dataclass(kw_only=True) +class MalformedRequestBodyInput(_SerdeShape): + "Dataclass for MalformedRequestBodyInput structure." + + int_: int | None = ... + float_: float | None = ... + +@dataclass(kw_only=True) +class MalformedShortInput(_SerdeShape): + "Dataclass for MalformedShortInput structure." + + short_in_body: int | None = ... + short_in_path: int | None = ... + short_in_query: int | None = ... + short_in_header: int | None = ... + +@dataclass(kw_only=True) +class MalformedStringInput(_SerdeShape): + "Dataclass for MalformedStringInput structure." + + blob: str | None = ... + +@dataclass(kw_only=True) +class MalformedTimestampBodyDateTimeInput(_SerdeShape): + "Dataclass for MalformedTimestampBodyDateTimeInput structure." + + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class MalformedTimestampBodyDefaultInput(_SerdeShape): + "Dataclass for MalformedTimestampBodyDefaultInput structure." + + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class MalformedTimestampBodyHttpDateInput(_SerdeShape): + "Dataclass for MalformedTimestampBodyHttpDateInput structure." + + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class MalformedTimestampHeaderDateTimeInput(_SerdeShape): + "Dataclass for MalformedTimestampHeaderDateTimeInput structure." + + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class MalformedTimestampHeaderDefaultInput(_SerdeShape): + "Dataclass for MalformedTimestampHeaderDefaultInput structure." + + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class MalformedTimestampHeaderEpochInput(_SerdeShape): + "Dataclass for MalformedTimestampHeaderEpochInput structure." + + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class MalformedTimestampPathDefaultInput(_SerdeShape): + "Dataclass for MalformedTimestampPathDefaultInput structure." + + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class MalformedTimestampPathEpochInput(_SerdeShape): + "Dataclass for MalformedTimestampPathEpochInput structure." + + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class MalformedTimestampPathHttpDateInput(_SerdeShape): + "Dataclass for MalformedTimestampPathHttpDateInput structure." + + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class MalformedTimestampQueryDefaultInput(_SerdeShape): + "Dataclass for MalformedTimestampQueryDefaultInput structure." + + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class MalformedTimestampQueryEpochInput(_SerdeShape): + "Dataclass for MalformedTimestampQueryEpochInput structure." + + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class MalformedTimestampQueryHttpDateInput(_SerdeShape): + "Dataclass for MalformedTimestampQueryHttpDateInput structure." + + timestamp: datetime | None = ... + +@dataclass(kw_only=True) +class MalformedUnionInput(_SerdeShape): + "Dataclass for MalformedUnionInput structure." + + union: SimpleUnion | None = ... + +@dataclass(kw_only=True) +class MediaTypeHeaderInput(_SerdeShape): + "Dataclass for MediaTypeHeaderInput structure." + + json: str | None = ... + +@dataclass(kw_only=True) +class MediaTypeHeaderOutput(_SerdeShape): + "Dataclass for MediaTypeHeaderOutput structure." + + json: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass +class MyUnionStringValue(_SerdeShape): + value: str + +@dataclass +class MyUnionBooleanValue(_SerdeShape): + value: bool + +@dataclass +class MyUnionNumberValue(_SerdeShape): + value: int + +@dataclass +class MyUnionBlobValue(_SerdeShape): + value: bytes + +@dataclass +class MyUnionTimestampValue(_SerdeShape): + value: datetime + +@dataclass +class MyUnionEnumValue(_SerdeShape): + value: str + +@dataclass +class MyUnionListValue(_SerdeShape): + value: list[str] + +@dataclass +class MyUnionMapValue(_SerdeShape): + value: dict[str, str] + +@dataclass +class MyUnionStructureValue(_SerdeShape): + value: GreetingStruct + +@dataclass +class MyUnionRenamedStructureValue(_SerdeShape): + value: RenamedGreeting + +@dataclass +class MyUnionUnionValue(_SerdeShape): + value: NestedUnion + +@dataclass +class MyUnionUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +MyUnion = ( + MyUnionStringValue + | MyUnionBooleanValue + | MyUnionNumberValue + | MyUnionBlobValue + | MyUnionTimestampValue + | MyUnionEnumValue + | MyUnionListValue + | MyUnionMapValue + | MyUnionStructureValue + | MyUnionRenamedStructureValue + | MyUnionUnionValue + | MyUnionUnknown +) +"A union with a representative set of types for members." + +class _MyUnionDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> MyUnion: ... + +@dataclass(kw_only=True) +class NestedPayload(_SerdeShape): + "Dataclass for NestedPayload structure." + + greeting: str | None = ... + name: str | None = ... + +@dataclass +class NestedUnionStringValue(_SerdeShape): + value: str + +@dataclass +class NestedUnionUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +NestedUnion = NestedUnionStringValue | NestedUnionUnknown +"A union used to test unions nested inside unions." + +class _NestedUnionDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> NestedUnion: ... + +@dataclass(kw_only=True) +class NoInputAndOutputOutput(_SerdeShape): + "Dataclass for NoInputAndOutputOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class NullAndEmptyHeadersIO(_SerdeShape): + "Dataclass for NullAndEmptyHeadersIO structure." + + a: str | None = ... + b: str | None = ... + c: list[str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class OmitsNullSerializesEmptyStringInput(_SerdeShape): + "Dataclass for OmitsNullSerializesEmptyStringInput structure." + + null_value: str | None = ... + empty_string: str | None = ... + +@dataclass(kw_only=True) +class OmitsSerializingEmptyListsInput(_SerdeShape): + "Dataclass for OmitsSerializingEmptyListsInput structure." + + query_string_list: list[str] | None = ... + query_integer_list: list[int] | None = ... + query_double_list: list[float] | None = ... + query_boolean_list: list[bool] | None = ... + query_timestamp_list: list[datetime] | None = ... + query_enum_list: list[str] | None = ... + query_integer_enum_list: list[int] | None = ... + +@dataclass(kw_only=True) +class OperationWithDefaultsInput(_SerdeShape): + "Dataclass for OperationWithDefaultsInput structure." + + defaults: Defaults | None = ... + client_optional_defaults: ClientOptionalDefaults | None = ... + top_level_default: str | None = ... + other_top_level_default: int | None = ... + +@dataclass(kw_only=True) +class OperationWithDefaultsOutput(_SerdeShape): + "Dataclass for OperationWithDefaultsOutput structure." + + default_string: str | None = ... + default_boolean: bool | None = ... + default_list: list[str] | None = ... + default_document_map: Document | None = ... + default_document_string: Document | None = ... + default_document_boolean: Document | None = ... + default_document_list: Document | None = ... + default_null_document: Document | None = ... + default_timestamp: datetime | None = ... + default_blob: bytes | None = ... + default_byte: int | None = ... + default_short: int | None = ... + default_integer: int | None = ... + default_long: int | None = ... + default_float: float | None = ... + default_double: float | None = ... + default_map: dict[str, str] | None = ... + default_enum: str | None = ... + default_int_enum: int | None = ... + empty_string: str | None = ... + false_boolean: bool | None = ... + empty_blob: bytes | None = ... + zero_byte: int | None = ... + zero_short: int | None = ... + zero_integer: int | None = ... + zero_long: int | None = ... + zero_float: float | None = ... + zero_double: float | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class OperationWithNestedStructureInput(_SerdeShape): + "Dataclass for OperationWithNestedStructureInput structure." + + top_level: TopLevel | None = ... + +@dataclass(kw_only=True) +class OperationWithNestedStructureOutput(_SerdeShape): + "Dataclass for OperationWithNestedStructureOutput structure." + + dialog: Dialog + dialog_list: list[Dialog] | None = ... + dialog_map: dict[str, Dialog] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class OutputStreamOutput(_SerdeShape): + "Dataclass for OutputStreamOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class OutputStreamWithInitialResponseOutput(_SerdeShape): + "Dataclass for OutputStreamWithInitialResponseOutput structure." + + initial_response_member: str + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class PayloadConfig(_SerdeShape): + "Dataclass for PayloadConfig structure." + + data: int | None = ... + +@dataclass(kw_only=True) +class PayloadStructure(_SerdeShape): + "Dataclass for PayloadStructure structure." + + structure_member: str | None = ... + +@dataclass +class PayloadUnionUnionMember(_SerdeShape): + value: str + +@dataclass +class PayloadUnionUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +PayloadUnion = PayloadUnionUnionMember | PayloadUnionUnknown + +class _PayloadUnionDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> PayloadUnion: ... + +@dataclass +class PlayerActionQuit(_SerdeShape): + "Quit the game." + + value: Unit + +@dataclass +class PlayerActionUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +PlayerAction = PlayerActionQuit | PlayerActionUnknown + +class _PlayerActionDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> PlayerAction: ... + +@dataclass(kw_only=True) +class PostPlayerActionInput(_SerdeShape): + "Dataclass for PostPlayerActionInput structure." + + action: PlayerAction | None = ... + +@dataclass(kw_only=True) +class PostPlayerActionOutput(_SerdeShape): + "Dataclass for PostPlayerActionOutput structure." + + action: PlayerAction + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class PostUnionWithJsonNameInput(_SerdeShape): + "Dataclass for PostUnionWithJsonNameInput structure." + + value: UnionWithJsonName | None = ... + +@dataclass(kw_only=True) +class PostUnionWithJsonNameOutput(_SerdeShape): + "Dataclass for PostUnionWithJsonNameOutput structure." + + value: UnionWithJsonName + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class PutWithContentEncodingInput(_SerdeShape): + "Dataclass for PutWithContentEncodingInput structure." + + encoding: str | None = ... + data: str | None = ... + +@dataclass(kw_only=True) +class QueryIdempotencyTokenAutoFillInput(_SerdeShape): + "Dataclass for QueryIdempotencyTokenAutoFillInput structure." + + token: str | None = ... + "This field is autopopulated if not provided." + +@dataclass(kw_only=True) +class QueryParamsAsStringListMapInput(_SerdeShape): + "Dataclass for QueryParamsAsStringListMapInput structure." + + qux: str | None = ... + foo: dict[str, list[str]] | None = ... + +@dataclass(kw_only=True) +class QueryPrecedenceInput(_SerdeShape): + "Dataclass for QueryPrecedenceInput structure." + + foo: str | None = ... + baz: dict[str, str] | None = ... + +@dataclass(kw_only=True) +class RecursiveShapesInputOutput(_SerdeShape): + "Dataclass for RecursiveShapesInputOutput structure." + + nested: RecursiveShapesInputOutputNested1 | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class RecursiveShapesInputOutputNested1(_SerdeShape): + "Dataclass for RecursiveShapesInputOutputNested1 structure." + + foo: str | None = ... + nested: RecursiveShapesInputOutputNested2 | None = ... + +@dataclass(kw_only=True) +class RecursiveShapesInputOutputNested2(_SerdeShape): + "Dataclass for RecursiveShapesInputOutputNested2 structure." + + bar: str | None = ... + recursive_member: RecursiveShapesInputOutputNested1 | None = ... + +@dataclass(kw_only=True) +class ResponseCodeHttpFallbackInputOutput(_SerdeShape): + "Dataclass for ResponseCodeHttpFallbackInputOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ResponseCodeRequiredOutput(_SerdeShape): + "Dataclass for ResponseCodeRequiredOutput structure." + + response_code: int + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ServiceUnavailableError(ServiceError, _SerdeShape): + "Dataclass for ServiceUnavailableError structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class SimpleScalarPropertiesInputOutput(_SerdeShape): + "Dataclass for SimpleScalarPropertiesInputOutput structure." + + foo: str | None = ... + string_value: str | None = ... + true_boolean_value: bool | None = ... + false_boolean_value: bool | None = ... + byte_value: int | None = ... + short_value: int | None = ... + integer_value: int | None = ... + long_value: int | None = ... + float_value: float | None = ... + double_value: float | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass +class SimpleUnionInt(_SerdeShape): + value: int + +@dataclass +class SimpleUnionString(_SerdeShape): + value: str + +@dataclass +class SimpleUnionUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +SimpleUnion = SimpleUnionInt | SimpleUnionString | SimpleUnionUnknown + +class _SimpleUnionDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> SimpleUnion: ... + +@dataclass(kw_only=True) +class SingletonEvent(_SerdeShape): + "Dataclass for SingletonEvent structure." + + value: str | None = ... + +@dataclass +class SingletonEventStreamSingleton(_SerdeShape): + value: SingletonEvent + +@dataclass +class SingletonEventStreamUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +SingletonEventStream = SingletonEventStreamSingleton | SingletonEventStreamUnknown + +class _SingletonEventStreamDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> SingletonEventStream: ... + +@dataclass(kw_only=True) +class SparseJsonListsInputOutput(_SerdeShape): + "Dataclass for SparseJsonListsInputOutput structure." + + sparse_string_list: list[str | None] | None = ... + sparse_short_list: list[int | None] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class SparseJsonMapsInputOutput(_SerdeShape): + "Dataclass for SparseJsonMapsInputOutput structure." + + sparse_struct_map: dict[str, GreetingStruct | None] | None = ... + sparse_number_map: dict[str, int | None] | None = ... + sparse_boolean_map: dict[str, bool | None] | None = ... + sparse_string_map: dict[str, str | None] | None = ... + sparse_set_map: dict[str, list[str] | None] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class StreamingTraitsInputOutput(_SerdeShape): + "Dataclass for StreamingTraitsInputOutput structure." + + foo: str | None = ... + blob: StreamingBlob | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class StreamingTraitsRequireLengthInput(_SerdeShape): + "Dataclass for StreamingTraitsRequireLengthInput structure." + + foo: str | None = ... + blob: StreamingBlob | None = ... + +@dataclass(kw_only=True) +class StreamingTraitsWithMediaTypeInputOutput(_SerdeShape): + "Dataclass for StreamingTraitsWithMediaTypeInputOutput structure." + + foo: str | None = ... + blob: StreamingBlob | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +class StringEnum(UnknownEnumMixin, StrEnum): + V = "enumvalue" + +@dataclass(kw_only=True) +class StringPayloadEvent(_SerdeShape): + "Dataclass for StringPayloadEvent structure." + + payload: str | None = ... + +@dataclass(kw_only=True) +class StringPayloadInput(_SerdeShape): + "Dataclass for StringPayloadInput structure." + + payload: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class StructureListMember(_SerdeShape): + "Dataclass for StructureListMember structure." + + a: str | None = ... + b: str | None = ... + +@dataclass(kw_only=True) +class StructurePayloadEvent(_SerdeShape): + "Dataclass for StructurePayloadEvent structure." + + payload: PayloadStructure | None = ... + +@dataclass(kw_only=True) +class TestBodyStructureInputOutput(_SerdeShape): + "Dataclass for TestBodyStructureInputOutput structure." + + test_id: str | None = ... + test_config: TestConfig | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class TestConfig(_SerdeShape): + "Dataclass for TestConfig structure." + + timeout: int | None = ... + +class TestEnum(UnknownEnumMixin, StrEnum): + FOO = "FOO" + BAR = "BAR" + BAZ = "BAZ" + +class TestIntEnum(UnknownEnumMixin, IntEnum): + ONE = 1 + TWO = 2 + +@dataclass(kw_only=True) +class TestNoPayloadInputOutput(_SerdeShape): + "Dataclass for TestNoPayloadInputOutput structure." + + test_id: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class TestPayloadBlobInputOutput(_SerdeShape): + "Dataclass for TestPayloadBlobInputOutput structure." + + content_type: str | None = ... + data: bytes | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class TestPayloadStructureInputOutput(_SerdeShape): + "Dataclass for TestPayloadStructureInputOutput structure." + + test_id: str | None = ... + payload_config: PayloadConfig | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class TimestampFormatHeadersIO(_SerdeShape): + "Dataclass for TimestampFormatHeadersIO structure." + + member_epoch_seconds: datetime | None = ... + member_http_date: datetime | None = ... + member_date_time: datetime | None = ... + default_format: datetime | None = ... + target_epoch_seconds: datetime | None = ... + target_http_date: datetime | None = ... + target_date_time: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class TopLevel(_SerdeShape): + "Dataclass for TopLevel structure." + + dialog: Dialog + dialog_list: list[Dialog] | None = ... + dialog_map: dict[str, Dialog] | None = ... + +@dataclass(kw_only=True) +class UnionInputOutput(_SerdeShape): + "A shared structure that contains a single union member." + + contents: MyUnion | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass +class UnionPayloadGreeting(_SerdeShape): + value: str + +@dataclass +class UnionPayloadUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +UnionPayload = UnionPayloadGreeting | UnionPayloadUnknown + +class _UnionPayloadDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> UnionPayload: ... + +@dataclass(kw_only=True) +class UnionPayloadEvent(_SerdeShape): + "Dataclass for UnionPayloadEvent structure." + + payload: PayloadUnion | None = ... + +@dataclass +class UnionWithJsonNameFoo(_SerdeShape): + value: str + +@dataclass +class UnionWithJsonNameBar(_SerdeShape): + value: str + +@dataclass +class UnionWithJsonNameBaz(_SerdeShape): + value: str + +@dataclass +class UnionWithJsonNameUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +UnionWithJsonName = ( + UnionWithJsonNameFoo + | UnionWithJsonNameBar + | UnionWithJsonNameBaz + | UnionWithJsonNameUnknown +) + +class _UnionWithJsonNameDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> UnionWithJsonName: ... + +@dataclass(kw_only=True) +class RenamedGreeting(_SerdeShape): + "Dataclass for GreetingStruct structure." + + salutation: str | None = ... + +class FooEnum(UnknownEnumMixin, StrEnum): + FOO = "Foo" + BAZ = "Baz" + BAR = "Bar" + ONE = "1" + ZERO = "0" + +@dataclass(kw_only=True) +class GreetingStruct(_SerdeShape): + "Dataclass for GreetingStruct structure." + + hi: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +class IntegerEnum(UnknownEnumMixin, IntEnum): + A = 1 + B = 2 + C = 3 + +@dataclass(kw_only=True) +class Unit(_SerdeShape): + pass diff --git a/codegen-output-py/rest-json-1/src/restjson/py.typed b/codegen-output-py/rest-json-1/src/restjson/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/rest-xml-with-namespace/.smithy-python-manifest.json b/codegen-output-py/rest-xml-with-namespace/.smithy-python-manifest.json new file mode 100644 index 000000000..4ba7ae0f5 --- /dev/null +++ b/codegen-output-py/rest-xml-with-namespace/.smithy-python-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "README.md": "377281dbc896249f6395f7d63d1c0f4a3f8ed12dbe286778f00717980613ed4b", + "pyproject.toml": "d53c3c1f064ec4cf0c486c274c816ddc6cd1db90ef60b2a7dd3d8028f672e285", + "src/restxmlwithnamespace/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/restxmlwithnamespace/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/restxmlwithnamespace/_private/schemas.py": "137bd653893beac8048795410649076c6c96e07e77d83e27204ce5d5fde0d41a", + "src/restxmlwithnamespace/models.py": "145e12580c29a5aa74560da64e03c0b087b7cfaabdd0e2deece15a3dc077fe8e", + "src/restxmlwithnamespace/models.pyi": "1955d2b33f1071340e3f33ba66798a92852a254a1255107b43ec5f8ad40a979d", + "src/restxmlwithnamespace/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/rest-xml-with-namespace/README.md b/codegen-output-py/rest-xml-with-namespace/README.md new file mode 100644 index 000000000..22eb5e4d9 --- /dev/null +++ b/codegen-output-py/rest-xml-with-namespace/README.md @@ -0,0 +1,5 @@ + + +## restxmlwithnamespace Types Package + +Native Python types for the rest-xml-with-namespace projection diff --git a/codegen-output-py/rest-xml-with-namespace/pyproject.toml b/codegen-output-py/rest-xml-with-namespace/pyproject.toml new file mode 100644 index 000000000..bb310d2f1 --- /dev/null +++ b/codegen-output-py/rest-xml-with-namespace/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "restxmlwithnamespace" +version = "0.0.1" +description = "Native Python types for the rest-xml-with-namespace projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "restxmlwithnamespace"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/restxmlwithnamespace", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/__init__.py b/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/_private/__init__.py b/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/_private/schemas.py b/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/_private/schemas.py new file mode 100644 index 000000000..85e918113 --- /dev/null +++ b/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/_private/schemas.py @@ -0,0 +1,110 @@ +from types import MappingProxyType + +from smithy_core._schema_compact import StaticSchema + +n0 = "aws.protocoltests.restxml.xmlns" +_s0 = "NestedWithNamespace" +_s1 = "attrField" +_s2 = "smithy.api#xmlAttribute" +_s3 = "smithy.api#xmlName" +_s4 = "xsi:someName" +_s5 = "SimpleScalarPropertiesRequest" +_s6 = "smithy.api#input" +_s7 = "foo" +_s8 = "smithy.api#httpHeader" +_s9 = "X-Foo" +_s10 = "stringValue" +_s11 = "trueBooleanValue" +_s12 = "falseBooleanValue" +_s13 = "byteValue" +_s14 = "shortValue" +_s15 = "integerValue" +_s16 = "longValue" +_s17 = "floatValue" +_s18 = "Nested" +_s19 = "smithy.api#xmlNamespace" +_s20 = "doubleValue" +_s21 = "DoubleDribble" +_s22 = "SimpleScalarPropertiesResponse" +_s23 = "smithy.api#output" + +NESTED_WITH_NAMESPACE: StaticSchema = ( + 18, + n0, + _s0, + 0, + (_s1,), + ((3, {_s2: None, _s3: _s4}),), +) + +SIMPLE_SCALAR_PROPERTIES_REQUEST: StaticSchema = ( + 18, + n0, + _s5, + {_s6: None}, + ( + _s7, + _s10, + _s11, + _s12, + _s13, + _s14, + _s15, + _s16, + _s17, + _s18, + _s20, + ), + ( + (3, {_s8: _s9}), + (3, 0), + (2, 0), + (2, 0), + (5, 0), + (6, 0), + (7, 0), + (8, 0), + (9, 0), + ( + NESTED_WITH_NAMESPACE, + {_s19: MappingProxyType({"prefix": "xsi", "uri": "https://example.com"})}, + ), + (10, {_s3: _s21}), + ), +) + +SIMPLE_SCALAR_PROPERTIES_RESPONSE: StaticSchema = ( + 18, + n0, + _s22, + {_s23: None}, + ( + _s7, + _s10, + _s11, + _s12, + _s13, + _s14, + _s15, + _s16, + _s17, + _s18, + _s20, + ), + ( + (3, {_s8: _s9}), + (3, 0), + (2, 0), + (2, 0), + (5, 0), + (6, 0), + (7, 0), + (8, 0), + (9, 0), + ( + NESTED_WITH_NAMESPACE, + {_s19: MappingProxyType({"prefix": "xsi", "uri": "https://example.com"})}, + ), + (10, {_s3: _s21}), + ), +) diff --git a/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/models.py b/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/models.py new file mode 100644 index 000000000..7f794e9cb --- /dev/null +++ b/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/models.py @@ -0,0 +1,54 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "NestedWithNamespace": "NESTED_WITH_NAMESPACE", + "SimpleScalarPropertiesRequest": "SIMPLE_SCALAR_PROPERTIES_REQUEST", + "SimpleScalarPropertiesResponse": "SIMPLE_SCALAR_PROPERTIES_RESPONSE", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "NestedWithNamespace", + "SimpleScalarPropertiesRequest", + "SimpleScalarPropertiesResponse", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/models.pyi b/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/models.pyi new file mode 100644 index 000000000..beb1b1eb8 --- /dev/null +++ b/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/models.pyi @@ -0,0 +1,74 @@ +from dataclasses import dataclass +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.serializers import ShapeSerializer + +__all__ = [ + "NestedWithNamespace", + "ServiceError", + "SimpleScalarPropertiesRequest", + "SimpleScalarPropertiesResponse", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class NestedWithNamespace(_SerdeShape): + "Dataclass for NestedWithNamespace structure." + + attr_field: str | None = ... + +@dataclass(kw_only=True) +class SimpleScalarPropertiesRequest(_SerdeShape): + "Dataclass for SimpleScalarPropertiesRequest structure." + + foo: str | None = ... + string_value: str | None = ... + true_boolean_value: bool | None = ... + false_boolean_value: bool | None = ... + byte_value: int | None = ... + short_value: int | None = ... + integer_value: int | None = ... + long_value: int | None = ... + float_value: float | None = ... + nested: NestedWithNamespace | None = ... + double_value: float | None = ... + +@dataclass(kw_only=True) +class SimpleScalarPropertiesResponse(_SerdeShape): + "Dataclass for SimpleScalarPropertiesResponse structure." + + foo: str | None = ... + string_value: str | None = ... + true_boolean_value: bool | None = ... + false_boolean_value: bool | None = ... + byte_value: int | None = ... + short_value: int | None = ... + integer_value: int | None = ... + long_value: int | None = ... + float_value: float | None = ... + nested: NestedWithNamespace | None = ... + double_value: float | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ diff --git a/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/py.typed b/codegen-output-py/rest-xml-with-namespace/src/restxmlwithnamespace/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/rest-xml/.smithy-python-manifest.json b/codegen-output-py/rest-xml/.smithy-python-manifest.json new file mode 100644 index 000000000..f9e97a91e --- /dev/null +++ b/codegen-output-py/rest-xml/.smithy-python-manifest.json @@ -0,0 +1,15 @@ +{ + "files": { + "README.md": "cb00d252893fb299db4c6569ec3abb219e606507fd61b8e45d46cfe0da47d35b", + "pyproject.toml": "76e930a07cc50a774b2d143abf3f020d8e8bd6c57838d8332689934208903221", + "src/restxml/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/restxml/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/restxml/_private/schemas.py": "37cd48c2376936604f9dc2d6ab756f423d31f674d10702b0cbd18dc8d1453f17", + "src/restxml/_private/schemas_0.py": "6ff2aa9e2f527d932ce7090660ba66e08b10c11879a482d84610559675e689e2", + "src/restxml/_private/schemas_1.py": "0c49d27d60a5aebb582ebb8126f7e6a6a2ba64cab383106fd51335b2e21271ed", + "src/restxml/models.py": "e30e11c2ca184011e834949184a08275a8567136dc2d421cf53f81ea3145e2c3", + "src/restxml/models.pyi": "d6c5d7b7326fa1d342e0a805675528fd9ecb6c08e25b64221a0a2a44d32656b6", + "src/restxml/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/rest-xml/README.md b/codegen-output-py/rest-xml/README.md new file mode 100644 index 000000000..da2efde5d --- /dev/null +++ b/codegen-output-py/rest-xml/README.md @@ -0,0 +1,5 @@ + + +## restxml Types Package + +Native Python types for the rest-xml projection diff --git a/codegen-output-py/rest-xml/pyproject.toml b/codegen-output-py/rest-xml/pyproject.toml new file mode 100644 index 000000000..23116fc96 --- /dev/null +++ b/codegen-output-py/rest-xml/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "restxml" +version = "0.0.1" +description = "Native Python types for the rest-xml projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "restxml"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/restxml", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/rest-xml/src/restxml/__init__.py b/codegen-output-py/rest-xml/src/restxml/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/rest-xml/src/restxml/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/rest-xml/src/restxml/_private/__init__.py b/codegen-output-py/rest-xml/src/restxml/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/rest-xml/src/restxml/_private/schemas.py b/codegen-output-py/rest-xml/src/restxml/_private/schemas.py new file mode 100644 index 000000000..d73d6b21b --- /dev/null +++ b/codegen-output-py/rest-xml/src/restxml/_private/schemas.py @@ -0,0 +1,171 @@ +from importlib import import_module + +_PARTITION_NAMES: tuple[tuple[str, ...], ...] = ( + ( + "STRING_LIST", + "STRING_SET", + "INTEGER_LIST", + "INTEGER_SET", + "DOUBLE_LIST", + "BOOLEAN_LIST", + "TIMESTAMP_LIST", + "FOO_ENUM", + "FOO_ENUM_LIST", + "INTEGER_ENUM", + "INTEGER_ENUM_LIST", + "STRING_MAP", + "ALL_QUERY_STRING_TYPES_INPUT", + "PAYLOAD_WITH_XML_NAME", + "BODY_WITH_XML_NAME_INPUT_OUTPUT", + "COMPLEX_NESTED_ERROR_DATA", + "COMPLEX_ERROR", + "CONSTANT_AND_VARIABLE_QUERY_STRING_INPUT", + "CONSTANT_QUERY_STRING_INPUT", + "CONTENT_TYPE_PARAMETERS_INPUT", + "CONTENT_TYPE_PARAMETERS_OUTPUT", + "DATE_TIME", + "DATETIME_OFFSETS_OUTPUT", + "EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT", + "EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT", + "ENDPOINT_WITH_HOST_LABEL_OPERATION_REQUEST", + "STRING_ENUM", + "ENUM_PAYLOAD_INPUT", + "FOO_ENUM_MAP", + "FLATTENED_XML_MAP_REQUEST", + "FLATTENED_XML_MAP_RESPONSE", + "FLATTENED_XML_MAP_WITH_XML_NAME_INPUT_OUTPUT_MAP", + "FLATTENED_XML_MAP_WITH_XML_NAME_REQUEST", + "FLATTENED_XML_MAP_WITH_XML_NAME_RESPONSE", + "FLATTENED_XML_MAP_WITH_XML_NAMESPACE_OUTPUT_MAP", + "FLATTENED_XML_MAP_WITH_XML_NAMESPACE_OUTPUT", + "FOO_PREFIX_HEADERS", + "FRACTIONAL_SECONDS_OUTPUT", + "GREETING_WITH_ERRORS_OUTPUT", + "HOST_LABEL_HEADER_INPUT", + "HTTP_EMPTY_PREFIX_HEADERS_INPUT", + "HTTP_EMPTY_PREFIX_HEADERS_OUTPUT", + "HTTP_PAYLOAD_TRAITS_INPUT_OUTPUT", + "TEXT_PLAIN_BLOB", + "HTTP_PAYLOAD_TRAITS_WITH_MEDIA_TYPE_INPUT_OUTPUT", + "HTTP_PAYLOAD_WITH_MEMBER_XML_NAME_INPUT_OUTPUT", + "NESTED_PAYLOAD", + "HTTP_PAYLOAD_WITH_STRUCTURE_INPUT_OUTPUT", + "UNION_PAYLOAD", + "HTTP_PAYLOAD_WITH_UNION_INPUT_OUTPUT", + "HTTP_PAYLOAD_WITH_XML_NAME_INPUT_OUTPUT", + "PAYLOAD_WITH_XML_NAMESPACE_AND_PREFIX", + "HTTP_PAYLOAD_WITH_XML_NAMESPACE_AND_PREFIX_INPUT_OUTPUT", + "PAYLOAD_WITH_XML_NAMESPACE", + "HTTP_PAYLOAD_WITH_XML_NAMESPACE_INPUT_OUTPUT", + "HTTP_PREFIX_HEADERS_INPUT_OUTPUT", + "HTTP_REQUEST_WITH_FLOAT_LABELS_INPUT", + "HTTP_REQUEST_WITH_GREEDY_LABEL_IN_PATH_INPUT", + "EPOCH_SECONDS", + "HTTP_DATE", + "HTTP_REQUEST_WITH_LABELS_AND_TIMESTAMP_FORMAT_INPUT", + "HTTP_REQUEST_WITH_LABELS_INPUT", + "HTTP_RESPONSE_CODE_OUTPUT", + "IGNORE_QUERY_PARAMS_IN_RESPONSE_OUTPUT", + "INPUT_AND_OUTPUT_WITH_HEADERS_IO", + "INVALID_GREETING", + "LIST_WITH_MEMBER_NAMESPACE", + "LIST_WITH_NAMESPACE", + "NESTED_MAP", + "NESTED_XML_MAP_WITH_XML_NAME_INNER_MAP", + "NESTED_XML_MAP_WITH_XML_NAME_MAP", + "NESTED_XML_MAP_WITH_XML_NAME_REQUEST", + "NESTED_XML_MAP_WITH_XML_NAME_RESPONSE", + "NESTED_XML_MAPS_REQUEST", + "NESTED_XML_MAPS_RESPONSE", + "NO_INPUT_AND_OUTPUT_OUTPUT", + "NULL_AND_EMPTY_HEADERS_IO", + "OMITS_NULL_SERIALIZES_EMPTY_STRING_INPUT", + "PUT_WITH_CONTENT_ENCODING_INPUT", + ), + ( + "QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL_INPUT", + "STRING_LIST_MAP", + "QUERY_PARAMS_AS_STRING_LIST_MAP_INPUT", + "QUERY_PRECEDENCE_INPUT", + "RECURSIVE_SHAPES_REQUEST", + "RECURSIVE_SHAPES_RESPONSE", + "RENAMED_LIST_MEMBERS", + "SIMPLE_SCALAR_PROPERTIES_REQUEST", + "SIMPLE_SCALAR_PROPERTIES_RESPONSE", + "STRING_PAYLOAD_INPUT", + "STRUCTURE_LIST_MEMBER", + "STRUCTURE_LIST", + "TIMESTAMP_FORMAT_HEADERS_IO", + "XML_ATTRIBUTES_IN_MIDDLE_PAYLOAD_REQUEST", + "XML_ATTRIBUTES_IN_MIDDLE_PAYLOAD_RESPONSE", + "XML_ATTRIBUTES_IN_MIDDLE_REQUEST", + "XML_ATTRIBUTES_IN_MIDDLE_RESPONSE", + "XML_ATTRIBUTES_PAYLOAD_REQUEST", + "XML_ATTRIBUTES_ON_PAYLOAD_REQUEST", + "XML_ATTRIBUTES_ON_PAYLOAD_RESPONSE", + "XML_ATTRIBUTES_PAYLOAD_RESPONSE", + "XML_ATTRIBUTES_REQUEST", + "XML_ATTRIBUTES_RESPONSE", + "XML_BLOBS_REQUEST", + "XML_BLOBS_RESPONSE", + "XML_EMPTY_BLOBS_REQUEST", + "XML_EMPTY_BLOBS_RESPONSE", + "NESTED_STRING_LIST", + "XML_EMPTY_LISTS_REQUEST", + "XML_EMPTY_LISTS_RESPONSE", + "GREETING_STRUCT", + "XML_MAPS_INPUT_OUTPUT_MAP", + "XML_EMPTY_MAPS_REQUEST", + "XML_EMPTY_MAPS_RESPONSE", + "XML_EMPTY_STRINGS_REQUEST", + "XML_EMPTY_STRINGS_RESPONSE", + "FOO_ENUM_SET", + "XML_ENUMS_REQUEST", + "XML_ENUMS_RESPONSE", + "INTEGER_ENUM_SET", + "INTEGER_ENUM_MAP", + "XML_INT_ENUMS_REQUEST", + "XML_INT_ENUMS_RESPONSE", + "XML_LISTS_REQUEST", + "XML_LISTS_RESPONSE", + "XML_MAP_WITH_XML_NAMESPACE_INPUT_OUTPUT_MAP", + "XML_MAP_WITH_XML_NAMESPACE_REQUEST", + "XML_MAP_WITH_XML_NAMESPACE_RESPONSE", + "XML_MAPS_REQUEST", + "XML_MAPS_RESPONSE", + "XML_MAPS_XML_NAME_INPUT_OUTPUT_MAP", + "XML_MAPS_XML_NAME_REQUEST", + "XML_MAPS_XML_NAME_RESPONSE", + "XML_NAMESPACED_LIST", + "XML_NAMESPACE_NESTED", + "XML_NAMESPACES_REQUEST", + "XML_NAMESPACES_RESPONSE", + "XML_NESTED_UNION_STRUCT", + "XML_TIMESTAMPS_REQUEST", + "XML_TIMESTAMPS_RESPONSE", + "XML_UNIONS_REQUEST", + "XML_UNIONS_RESPONSE", + "RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1", + "RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2", + "XML_UNION_SHAPE", + ), +) +_PARTITIONS = { + name: index for index, names in enumerate(_PARTITION_NAMES) for name in names +} +del _PARTITION_NAMES + + +def __getattr__(name: str): + try: + partition = _PARTITIONS[name] + except KeyError as error: + raise AttributeError(name) from error + module = import_module(f".schemas_{partition}", __package__) + value = getattr(module, name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *_PARTITIONS}) diff --git a/codegen-output-py/rest-xml/src/restxml/_private/schemas_0.py b/codegen-output-py/rest-xml/src/restxml/_private/schemas_0.py new file mode 100644 index 000000000..e16ea3da9 --- /dev/null +++ b/codegen-output-py/rest-xml/src/restxml/_private/schemas_0.py @@ -0,0 +1,1246 @@ +from types import MappingProxyType + +from smithy_core._schema_compact import StaticSchema + +n0 = "aws.protocoltests.shared" +_s0 = "StringList" +_s1 = "member" +_s2 = "StringSet" +_s3 = "IntegerList" +_s4 = "IntegerSet" +_s5 = "DoubleList" +_s6 = "BooleanList" +_s7 = "TimestampList" +_s8 = "FooEnum" +_s9 = "FOO" +_s10 = "smithy.api#enumValue" +_s11 = "Foo" +_s12 = "BAZ" +_s13 = "Baz" +_s14 = "BAR" +_s15 = "Bar" +_s16 = "ONE" +_s17 = "1" +_s18 = "ZERO" +_s19 = "0" +_s20 = "FooEnumList" +_s21 = "IntegerEnum" +_s22 = "A" +_s23 = "B" +_s24 = "C" +_s25 = "IntegerEnumList" +_s26 = "StringMap" +_s27 = "key" +_s28 = "value" +n1 = "aws.protocoltests.restxml" +_s29 = "AllQueryStringTypesInput" +_s30 = "smithy.api#input" +_s31 = "queryString" +_s32 = "smithy.api#httpQuery" +_s33 = "String" +_s34 = "queryStringList" +_s35 = "queryStringSet" +_s36 = "queryByte" +_s37 = "Byte" +_s38 = "queryShort" +_s39 = "Short" +_s40 = "queryInteger" +_s41 = "Integer" +_s42 = "queryIntegerList" +_s43 = "queryIntegerSet" +_s44 = "queryLong" +_s45 = "Long" +_s46 = "queryFloat" +_s47 = "Float" +_s48 = "queryDouble" +_s49 = "Double" +_s50 = "queryDoubleList" +_s51 = "queryBoolean" +_s52 = "Boolean" +_s53 = "queryBooleanList" +_s54 = "queryTimestamp" +_s55 = "Timestamp" +_s56 = "queryTimestampList" +_s57 = "queryEnum" +_s58 = "Enum" +_s59 = "queryEnumList" +_s60 = "EnumList" +_s61 = "queryIntegerEnum" +_s62 = "queryIntegerEnumList" +_s63 = "queryParamsMapOfStrings" +_s64 = "PayloadWithXmlName" +_s65 = "smithy.api#xmlName" +_s66 = "Hello" +_s67 = "name" +_s68 = "BodyWithXmlNameInputOutput" +_s69 = "Ahoy" +_s70 = "smithy.api#output" +_s71 = "nested" +_s72 = "ComplexNestedErrorData" +_s73 = "ComplexError" +_s74 = "smithy.api#error" +_s75 = "client" +_s76 = "smithy.api#httpError" +_s77 = "Header" +_s78 = "smithy.api#httpHeader" +_s79 = "X-Header" +_s80 = "TopLevel" +_s81 = "Nested" +_s82 = "ConstantAndVariableQueryStringInput" +_s83 = "baz" +_s84 = "maybeSet" +_s85 = "ConstantQueryStringInput" +_s86 = "hello" +_s87 = "ContentTypeParametersInput" +_s88 = "ContentTypeParametersOutput" +_s89 = "DateTime" +_s90 = "smithy.api#timestampFormat" +_s91 = "date-time" +_s92 = "DatetimeOffsetsOutput" +_s93 = "datetime" +_s94 = "EmptyInputAndEmptyOutputInput" +_s95 = "EmptyInputAndEmptyOutputOutput" +_s96 = "EndpointWithHostLabelOperationRequest" +_s97 = "label" +_s98 = "StringEnum" +_s99 = "V" +_s100 = "enumvalue" +_s101 = "EnumPayloadInput" +_s102 = "payload" +_s103 = "FooEnumMap" +_s104 = "FlattenedXmlMapRequest" +_s105 = "myMap" +_s106 = "smithy.api#xmlFlattened" +_s107 = "FlattenedXmlMapResponse" +_s108 = "FlattenedXmlMapWithXmlNameInputOutputMap" +_s109 = "K" +_s110 = "FlattenedXmlMapWithXmlNameRequest" +_s111 = "KVP" +_s112 = "FlattenedXmlMapWithXmlNameResponse" +_s113 = "FlattenedXmlMapWithXmlNamespaceOutputMap" +_s114 = "smithy.api#xmlNamespace" +_s115 = "FlattenedXmlMapWithXmlNamespaceOutput" +_s116 = "FooPrefixHeaders" +_s117 = "FractionalSecondsOutput" +_s118 = "GreetingWithErrorsOutput" +_s119 = "greeting" +_s120 = "X-Greeting" +_s121 = "HostLabelHeaderInput" +_s122 = "accountId" +_s123 = "X-Amz-Account-Id" +_s124 = "smithy.api#hostLabel" +_s125 = "smithy.api#required" +_s126 = "HttpEmptyPrefixHeadersInput" +_s127 = "prefixHeaders" +_s128 = "smithy.api#httpPrefixHeaders" +_s129 = "" +_s130 = "specificHeader" +_s131 = "HttpEmptyPrefixHeadersOutput" +_s132 = "HttpPayloadTraitsInputOutput" +_s133 = "foo" +_s134 = "X-Foo" +_s135 = "blob" +_s136 = "TextPlainBlob" +_s137 = "smithy.api#mediaType" +_s138 = "text/plain" +_s139 = "HttpPayloadTraitsWithMediaTypeInputOutput" +_s140 = "HttpPayloadWithMemberXmlNameInputOutput" +_s141 = "Hola" +_s142 = "smithy.api#httpPayload" +_s143 = "NestedPayload" +_s144 = "HttpPayloadWithStructureInputOutput" +_s145 = "UnionPayload" +_s146 = "HttpPayloadWithUnionInputOutput" +_s147 = "HttpPayloadWithXmlNameInputOutput" +_s148 = "PayloadWithXmlNamespaceAndPrefix" +_s149 = "HttpPayloadWithXmlNamespaceAndPrefixInputOutput" +_s150 = "PayloadWithXmlNamespace" +_s151 = "HttpPayloadWithXmlNamespaceInputOutput" +_s152 = "HttpPrefixHeadersInputOutput" +_s153 = "x-foo" +_s154 = "fooMap" +_s155 = "x-foo-" +_s156 = "HttpRequestWithFloatLabelsInput" +_s157 = "float" +_s158 = "double" +_s159 = "HttpRequestWithGreedyLabelInPathInput" +_s160 = "EpochSeconds" +_s161 = "epoch-seconds" +_s162 = "HttpDate" +_s163 = "http-date" +_s164 = "HttpRequestWithLabelsAndTimestampFormatInput" +_s165 = "memberEpochSeconds" +_s166 = "smithy.api#httpLabel" +_s167 = "memberHttpDate" +_s168 = "memberDateTime" +_s169 = "defaultFormat" +_s170 = "targetEpochSeconds" +_s171 = "targetHttpDate" +_s172 = "targetDateTime" +_s173 = "HttpRequestWithLabelsInput" +_s174 = "string" +_s175 = "short" +_s176 = "integer" +_s177 = "long" +_s178 = "boolean" +_s179 = "timestamp" +_s180 = "HttpResponseCodeOutput" +_s181 = "Status" +_s182 = "IgnoreQueryParamsInResponseOutput" +_s183 = "InputAndOutputWithHeadersIO" +_s184 = "headerString" +_s185 = "X-String" +_s186 = "headerByte" +_s187 = "X-Byte" +_s188 = "headerShort" +_s189 = "X-Short" +_s190 = "headerInteger" +_s191 = "X-Integer" +_s192 = "headerLong" +_s193 = "X-Long" +_s194 = "headerFloat" +_s195 = "X-Float" +_s196 = "headerDouble" +_s197 = "X-Double" +_s198 = "headerTrueBool" +_s199 = "X-Boolean1" +_s200 = "headerFalseBool" +_s201 = "X-Boolean2" +_s202 = "headerStringList" +_s203 = "X-StringList" +_s204 = "headerStringSet" +_s205 = "X-StringSet" +_s206 = "headerIntegerList" +_s207 = "X-IntegerList" +_s208 = "headerBooleanList" +_s209 = "X-BooleanList" +_s210 = "headerTimestampList" +_s211 = "X-TimestampList" +_s212 = "headerEnum" +_s213 = "X-Enum" +_s214 = "headerEnumList" +_s215 = "X-EnumList" +_s216 = "InvalidGreeting" +_s217 = "Message" +_s218 = "ListWithMemberNamespace" +_s219 = "ListWithNamespace" +_s220 = "NestedMap" +_s221 = "NestedXmlMapWithXmlNameInnerMap" +_s222 = "InnerKey" +_s223 = "InnerValue" +_s224 = "NestedXmlMapWithXmlNameMap" +_s225 = "OuterKey" +_s226 = "NestedXmlMapWithXmlNameRequest" +_s227 = "nestedXmlMapWithXmlNameMap" +_s228 = "NestedXmlMapWithXmlNameResponse" +_s229 = "NestedXmlMapsRequest" +_s230 = "nestedMap" +_s231 = "flatNestedMap" +_s232 = "NestedXmlMapsResponse" +_s233 = "NoInputAndOutputOutput" +_s234 = "NullAndEmptyHeadersIO" +_s235 = "a" +_s236 = "X-A" +_s237 = "b" +_s238 = "X-B" +_s239 = "c" +_s240 = "X-C" +_s241 = "OmitsNullSerializesEmptyStringInput" +_s242 = "nullValue" +_s243 = "Null" +_s244 = "emptyString" +_s245 = "Empty" +_s246 = "PutWithContentEncodingInput" +_s247 = "encoding" +_s248 = "Content-Encoding" +_s249 = "data" + +STRING_LIST: StaticSchema = ( + 16, + n0, + _s0, + 0, + (_s1,), + ((3, 0),), +) + +STRING_SET: StaticSchema = ( + 16, + n0, + _s2, + 0, + (_s1,), + ((3, 0),), +) + +INTEGER_LIST: StaticSchema = ( + 16, + n0, + _s3, + 0, + (_s1,), + ((7, 0),), +) + +INTEGER_SET: StaticSchema = ( + 16, + n0, + _s4, + 0, + (_s1,), + ((7, 0),), +) + +DOUBLE_LIST: StaticSchema = ( + 16, + n0, + _s5, + 0, + (_s1,), + ((10, 0),), +) + +BOOLEAN_LIST: StaticSchema = ( + 16, + n0, + _s6, + 0, + (_s1,), + ((2, 0),), +) + +TIMESTAMP_LIST: StaticSchema = ( + 16, + n0, + _s7, + 0, + (_s1,), + ((4, 0),), +) + +FOO_ENUM: StaticSchema = ( + 14, + n0, + _s8, + 0, + ( + _s9, + _s12, + _s14, + _s16, + _s18, + ), + ( + (-1, {_s10: _s11}), + (-1, {_s10: _s13}), + (-1, {_s10: _s15}), + (-1, {_s10: _s17}), + (-1, {_s10: _s19}), + ), +) + +FOO_ENUM_LIST: StaticSchema = ( + 16, + n0, + _s20, + 0, + (_s1,), + ((FOO_ENUM, 0),), +) + +INTEGER_ENUM: StaticSchema = ( + 15, + n0, + _s21, + 0, + ( + _s22, + _s23, + _s24, + ), + ( + (-1, {_s10: 1}), + (-1, {_s10: 2}), + (-1, {_s10: 3}), + ), +) + +INTEGER_ENUM_LIST: StaticSchema = ( + 16, + n0, + _s25, + 0, + (_s1,), + ((INTEGER_ENUM, 0),), +) + +STRING_MAP: StaticSchema = ( + 17, + n0, + _s26, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (3, 0), + ), +) + +ALL_QUERY_STRING_TYPES_INPUT: StaticSchema = ( + 18, + n1, + _s29, + {_s30: None}, + ( + _s31, + _s34, + _s35, + _s36, + _s38, + _s40, + _s42, + _s43, + _s44, + _s46, + _s48, + _s50, + _s51, + _s53, + _s54, + _s56, + _s57, + _s59, + _s61, + _s62, + _s63, + ), + ( + (3, {_s32: _s33}), + (STRING_LIST, {_s32: _s0}), + (STRING_SET, {_s32: _s2}), + (5, {_s32: _s37}), + (6, {_s32: _s39}), + (7, {_s32: _s41}), + (INTEGER_LIST, {_s32: _s3}), + (INTEGER_SET, {_s32: _s4}), + (8, {_s32: _s45}), + (9, {_s32: _s47}), + (10, {_s32: _s49}), + (DOUBLE_LIST, {_s32: _s5}), + (2, {_s32: _s52}), + (BOOLEAN_LIST, {_s32: _s6}), + (4, {_s32: _s55}), + (TIMESTAMP_LIST, {_s32: _s7}), + (FOO_ENUM, {_s32: _s58}), + (FOO_ENUM_LIST, {_s32: _s60}), + (INTEGER_ENUM, {_s32: _s21}), + (INTEGER_ENUM_LIST, {_s32: _s25}), + (STRING_MAP, 1024), + ), +) + +PAYLOAD_WITH_XML_NAME: StaticSchema = ( + 18, + n1, + _s64, + {_s65: _s66}, + (_s67,), + ((3, 0),), +) + +BODY_WITH_XML_NAME_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s68, + {_s65: _s69, _s30: None, _s70: None}, + (_s71,), + ((PAYLOAD_WITH_XML_NAME, 0),), +) + +COMPLEX_NESTED_ERROR_DATA: StaticSchema = ( + 18, + n1, + _s72, + 0, + (_s11,), + ((3, 0),), +) + +COMPLEX_ERROR: StaticSchema = ( + 18, + n1, + _s73, + {_s74: _s75, _s76: 403}, + ( + _s77, + _s80, + _s81, + ), + ( + (3, {_s78: _s79}), + (3, 0), + (COMPLEX_NESTED_ERROR_DATA, 0), + ), +) + +CONSTANT_AND_VARIABLE_QUERY_STRING_INPUT: StaticSchema = ( + 18, + n1, + _s82, + {_s30: None}, + ( + _s83, + _s84, + ), + ( + (3, {_s32: _s83}), + (3, {_s32: _s84}), + ), +) + +CONSTANT_QUERY_STRING_INPUT: StaticSchema = ( + 18, + n1, + _s85, + {_s30: None}, + (_s86,), + ((3, 9),), +) + +CONTENT_TYPE_PARAMETERS_INPUT: StaticSchema = ( + 18, + n1, + _s87, + {_s30: None}, + (_s28,), + ((7, 0),), +) + +CONTENT_TYPE_PARAMETERS_OUTPUT: StaticSchema = ( + 18, + n1, + _s88, + {_s70: None}, +) + +DATE_TIME: StaticSchema = ( + 4, + n0, + _s89, + {_s90: _s91}, +) + +DATETIME_OFFSETS_OUTPUT: StaticSchema = ( + 18, + n1, + _s92, + {_s70: None}, + (_s93,), + ((DATE_TIME, 0),), +) + +EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT: StaticSchema = ( + 18, + n1, + _s94, + {_s30: None}, +) + +EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s95, + {_s70: None}, +) + +ENDPOINT_WITH_HOST_LABEL_OPERATION_REQUEST: StaticSchema = ( + 18, + n1, + _s96, + {_s30: None}, + (_s97,), + ((3, 257),), +) + +STRING_ENUM: StaticSchema = ( + 14, + n1, + _s98, + 0, + (_s99,), + ((-1, {_s10: _s100}),), +) + +ENUM_PAYLOAD_INPUT: StaticSchema = ( + 18, + n1, + _s101, + {_s30: None, _s70: None}, + (_s102,), + ((STRING_ENUM, 16),), +) + +FOO_ENUM_MAP: StaticSchema = ( + 17, + n0, + _s103, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (FOO_ENUM, 0), + ), +) + +FLATTENED_XML_MAP_REQUEST: StaticSchema = ( + 18, + n1, + _s104, + {_s30: None}, + (_s105,), + ((FOO_ENUM_MAP, {_s106: None}),), +) + +FLATTENED_XML_MAP_RESPONSE: StaticSchema = ( + 18, + n1, + _s107, + {_s70: None}, + (_s105,), + ((FOO_ENUM_MAP, {_s106: None}),), +) + +FLATTENED_XML_MAP_WITH_XML_NAME_INPUT_OUTPUT_MAP: StaticSchema = ( + 17, + n1, + _s108, + 0, + ( + _s27, + _s28, + ), + ( + (3, {_s65: _s109}), + (3, {_s65: _s99}), + ), +) + +FLATTENED_XML_MAP_WITH_XML_NAME_REQUEST: StaticSchema = ( + 18, + n1, + _s110, + {_s30: None}, + (_s105,), + ((FLATTENED_XML_MAP_WITH_XML_NAME_INPUT_OUTPUT_MAP, {_s106: None, _s65: _s111}),), +) + +FLATTENED_XML_MAP_WITH_XML_NAME_RESPONSE: StaticSchema = ( + 18, + n1, + _s112, + {_s70: None}, + (_s105,), + ((FLATTENED_XML_MAP_WITH_XML_NAME_INPUT_OUTPUT_MAP, {_s106: None, _s65: _s111}),), +) + +FLATTENED_XML_MAP_WITH_XML_NAMESPACE_OUTPUT_MAP: StaticSchema = ( + 17, + n1, + _s113, + 0, + ( + _s27, + _s28, + ), + ( + ( + 3, + { + _s65: _s109, + _s114: MappingProxyType({"uri": "https://the-key.example.com"}), + }, + ), + ( + 3, + { + _s65: _s99, + _s114: MappingProxyType({"uri": "https://the-value.example.com"}), + }, + ), + ), +) + +FLATTENED_XML_MAP_WITH_XML_NAMESPACE_OUTPUT: StaticSchema = ( + 18, + n1, + _s115, + {_s70: None}, + (_s105,), + ( + ( + FLATTENED_XML_MAP_WITH_XML_NAMESPACE_OUTPUT_MAP, + { + _s106: None, + _s65: _s111, + _s114: MappingProxyType({"uri": "https://the-member.example.com"}), + }, + ), + ), +) + +FOO_PREFIX_HEADERS: StaticSchema = ( + 17, + n1, + _s116, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (3, 0), + ), +) + +FRACTIONAL_SECONDS_OUTPUT: StaticSchema = ( + 18, + n1, + _s117, + {_s70: None}, + (_s93,), + ((DATE_TIME, 0),), +) + +GREETING_WITH_ERRORS_OUTPUT: StaticSchema = ( + 18, + n1, + _s118, + {_s70: None}, + (_s119,), + ((3, {_s78: _s120}),), +) + +HOST_LABEL_HEADER_INPUT: StaticSchema = ( + 18, + n1, + _s121, + {_s30: None}, + (_s122,), + ((3, {_s78: _s123, _s124: None, _s125: None}),), +) + +HTTP_EMPTY_PREFIX_HEADERS_INPUT: StaticSchema = ( + 18, + n1, + _s126, + {_s30: None}, + ( + _s127, + _s130, + ), + ( + (STRING_MAP, {_s128: _s129}), + (3, {_s78: _s86}), + ), +) + +HTTP_EMPTY_PREFIX_HEADERS_OUTPUT: StaticSchema = ( + 18, + n1, + _s131, + {_s70: None}, + ( + _s127, + _s130, + ), + ( + (STRING_MAP, {_s128: _s129}), + (3, {_s78: _s86}), + ), +) + +HTTP_PAYLOAD_TRAITS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s132, + {_s30: None, _s70: None}, + ( + _s133, + _s135, + ), + ( + (3, {_s78: _s134}), + (1, 16), + ), +) + +TEXT_PLAIN_BLOB: StaticSchema = ( + 1, + n0, + _s136, + {_s137: _s138}, +) + +HTTP_PAYLOAD_TRAITS_WITH_MEDIA_TYPE_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s139, + {_s30: None, _s70: None}, + ( + _s133, + _s135, + ), + ( + (3, {_s78: _s134}), + (TEXT_PLAIN_BLOB, 16), + ), +) + +HTTP_PAYLOAD_WITH_MEMBER_XML_NAME_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s140, + {_s30: None, _s70: None}, + (_s71,), + ((PAYLOAD_WITH_XML_NAME, {_s65: _s141, _s142: None}),), +) + +NESTED_PAYLOAD: StaticSchema = ( + 18, + n1, + _s143, + 0, + ( + _s119, + _s67, + ), + ( + (3, 0), + (3, 0), + ), +) + +HTTP_PAYLOAD_WITH_STRUCTURE_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s144, + {_s30: None, _s70: None}, + (_s71,), + ((NESTED_PAYLOAD, 16),), +) + +UNION_PAYLOAD: StaticSchema = ( + 19, + n1, + _s145, + 0, + (_s119,), + ((3, 0),), +) + +HTTP_PAYLOAD_WITH_UNION_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s146, + {_s30: None, _s70: None}, + (_s71,), + ((UNION_PAYLOAD, 16),), +) + +HTTP_PAYLOAD_WITH_XML_NAME_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s147, + {_s30: None, _s70: None}, + (_s71,), + ((PAYLOAD_WITH_XML_NAME, 16),), +) + +PAYLOAD_WITH_XML_NAMESPACE_AND_PREFIX: StaticSchema = ( + 18, + n1, + _s148, + {_s114: MappingProxyType({"uri": "http://foo.com", "prefix": "baz"})}, + (_s67,), + ((3, 0),), +) + +HTTP_PAYLOAD_WITH_XML_NAMESPACE_AND_PREFIX_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s149, + {_s30: None, _s70: None}, + (_s71,), + ((PAYLOAD_WITH_XML_NAMESPACE_AND_PREFIX, 16),), +) + +PAYLOAD_WITH_XML_NAMESPACE: StaticSchema = ( + 18, + n1, + _s150, + {_s114: MappingProxyType({"uri": "http://foo.com"})}, + (_s67,), + ((3, 0),), +) + +HTTP_PAYLOAD_WITH_XML_NAMESPACE_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s151, + {_s30: None, _s70: None}, + (_s71,), + ((PAYLOAD_WITH_XML_NAMESPACE, 16),), +) + +HTTP_PREFIX_HEADERS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s152, + {_s30: None, _s70: None}, + ( + _s133, + _s154, + ), + ( + (3, {_s78: _s153}), + (FOO_PREFIX_HEADERS, {_s128: _s155}), + ), +) + +HTTP_REQUEST_WITH_FLOAT_LABELS_INPUT: StaticSchema = ( + 18, + n1, + _s156, + {_s30: None}, + ( + _s157, + _s158, + ), + ( + (9, 9), + (10, 9), + ), +) + +HTTP_REQUEST_WITH_GREEDY_LABEL_IN_PATH_INPUT: StaticSchema = ( + 18, + n1, + _s159, + {_s30: None}, + ( + _s133, + _s83, + ), + ( + (3, 9), + (3, 9), + ), +) + +EPOCH_SECONDS: StaticSchema = ( + 4, + n0, + _s160, + {_s90: _s161}, +) + +HTTP_DATE: StaticSchema = ( + 4, + n0, + _s162, + {_s90: _s163}, +) + +HTTP_REQUEST_WITH_LABELS_AND_TIMESTAMP_FORMAT_INPUT: StaticSchema = ( + 18, + n1, + _s164, + {_s30: None}, + ( + _s165, + _s167, + _s168, + _s169, + _s170, + _s171, + _s172, + ), + ( + (4, {_s90: _s161, _s166: None, _s125: None}), + (4, {_s90: _s163, _s166: None, _s125: None}), + (4, {_s90: _s91, _s166: None, _s125: None}), + (4, 9), + (EPOCH_SECONDS, 9), + (HTTP_DATE, 9), + (DATE_TIME, 9), + ), +) + +HTTP_REQUEST_WITH_LABELS_INPUT: StaticSchema = ( + 18, + n1, + _s173, + {_s30: None}, + ( + _s174, + _s175, + _s176, + _s177, + _s157, + _s158, + _s178, + _s179, + ), + ( + (3, 9), + (6, 9), + (7, 9), + (8, 9), + (9, 9), + (10, 9), + (2, 9), + (4, 9), + ), +) + +HTTP_RESPONSE_CODE_OUTPUT: StaticSchema = ( + 18, + n1, + _s180, + {_s70: None}, + (_s181,), + ((7, 128),), +) + +IGNORE_QUERY_PARAMS_IN_RESPONSE_OUTPUT: StaticSchema = ( + 18, + n1, + _s182, + {_s70: None}, + (_s83,), + ((3, {_s32: _s83}),), +) + +INPUT_AND_OUTPUT_WITH_HEADERS_IO: StaticSchema = ( + 18, + n1, + _s183, + {_s30: None, _s70: None}, + ( + _s184, + _s186, + _s188, + _s190, + _s192, + _s194, + _s196, + _s198, + _s200, + _s202, + _s204, + _s206, + _s208, + _s210, + _s212, + _s214, + ), + ( + (3, {_s78: _s185}), + (5, {_s78: _s187}), + (6, {_s78: _s189}), + (7, {_s78: _s191}), + (8, {_s78: _s193}), + (9, {_s78: _s195}), + (10, {_s78: _s197}), + (2, {_s78: _s199}), + (2, {_s78: _s201}), + (STRING_LIST, {_s78: _s203}), + (STRING_SET, {_s78: _s205}), + (INTEGER_LIST, {_s78: _s207}), + (BOOLEAN_LIST, {_s78: _s209}), + (TIMESTAMP_LIST, {_s78: _s211}), + (FOO_ENUM, {_s78: _s213}), + (FOO_ENUM_LIST, {_s78: _s215}), + ), +) + +INVALID_GREETING: StaticSchema = ( + 18, + n1, + _s216, + {_s74: _s75, _s76: 400}, + (_s217,), + ((3, 0),), +) + +LIST_WITH_MEMBER_NAMESPACE: StaticSchema = ( + 16, + n1, + _s218, + {_s114: MappingProxyType({"uri": "https://xml-list.example.com"})}, + (_s1,), + ((3, {_s114: MappingProxyType({"uri": "https://xml-member.example.com"})}),), +) + +LIST_WITH_NAMESPACE: StaticSchema = ( + 16, + n1, + _s219, + {_s114: MappingProxyType({"uri": "https://xml-list.example.com"})}, + (_s1,), + ((3, 0),), +) + +NESTED_MAP: StaticSchema = ( + 17, + n1, + _s220, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (FOO_ENUM_MAP, 0), + ), +) + +NESTED_XML_MAP_WITH_XML_NAME_INNER_MAP: StaticSchema = ( + 17, + n1, + _s221, + 0, + ( + _s27, + _s28, + ), + ( + (3, {_s65: _s222}), + (3, {_s65: _s223}), + ), +) + +NESTED_XML_MAP_WITH_XML_NAME_MAP: StaticSchema = ( + 17, + n1, + _s224, + 0, + ( + _s27, + _s28, + ), + ( + (3, {_s65: _s225}), + (NESTED_XML_MAP_WITH_XML_NAME_INNER_MAP, 0), + ), +) + +NESTED_XML_MAP_WITH_XML_NAME_REQUEST: StaticSchema = ( + 18, + n1, + _s226, + {_s30: None}, + (_s227,), + ((NESTED_XML_MAP_WITH_XML_NAME_MAP, 0),), +) + +NESTED_XML_MAP_WITH_XML_NAME_RESPONSE: StaticSchema = ( + 18, + n1, + _s228, + {_s70: None}, + (_s227,), + ((NESTED_XML_MAP_WITH_XML_NAME_MAP, 0),), +) + +NESTED_XML_MAPS_REQUEST: StaticSchema = ( + 18, + n1, + _s229, + {_s30: None}, + ( + _s230, + _s231, + ), + ( + (NESTED_MAP, 0), + (NESTED_MAP, {_s106: None}), + ), +) + +NESTED_XML_MAPS_RESPONSE: StaticSchema = ( + 18, + n1, + _s232, + {_s70: None}, + ( + _s230, + _s231, + ), + ( + (NESTED_MAP, 0), + (NESTED_MAP, {_s106: None}), + ), +) + +NO_INPUT_AND_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s233, + {_s70: None}, +) + +NULL_AND_EMPTY_HEADERS_IO: StaticSchema = ( + 18, + n1, + _s234, + {_s30: None, _s70: None}, + ( + _s235, + _s237, + _s239, + ), + ( + (3, {_s78: _s236}), + (3, {_s78: _s238}), + (STRING_LIST, {_s78: _s240}), + ), +) + +OMITS_NULL_SERIALIZES_EMPTY_STRING_INPUT: StaticSchema = ( + 18, + n1, + _s241, + {_s30: None}, + ( + _s242, + _s244, + ), + ( + (3, {_s32: _s243}), + (3, {_s32: _s245}), + ), +) + +PUT_WITH_CONTENT_ENCODING_INPUT: StaticSchema = ( + 18, + n1, + _s246, + {_s30: None}, + ( + _s247, + _s249, + ), + ( + (3, {_s78: _s248}), + (3, 0), + ), +) diff --git a/codegen-output-py/rest-xml/src/restxml/_private/schemas_1.py b/codegen-output-py/rest-xml/src/restxml/_private/schemas_1.py new file mode 100644 index 000000000..16bbbb1b1 --- /dev/null +++ b/codegen-output-py/rest-xml/src/restxml/_private/schemas_1.py @@ -0,0 +1,1213 @@ +from types import MappingProxyType + +from smithy_core._schema_compact import StaticSchema + +from . import schemas + +n0 = "aws.protocoltests.shared" +_s1 = "member" +_s27 = "key" +_s28 = "value" +n1 = "aws.protocoltests.restxml" +_s30 = "smithy.api#input" +_s32 = "smithy.api#httpQuery" +_s65 = "smithy.api#xmlName" +_s70 = "smithy.api#output" +_s71 = "nested" +_s78 = "smithy.api#httpHeader" +_s83 = "baz" +_s90 = "smithy.api#timestampFormat" +_s91 = "date-time" +_s99 = "V" +_s102 = "payload" +_s105 = "myMap" +_s106 = "smithy.api#xmlFlattened" +_s109 = "K" +_s111 = "KVP" +_s114 = "smithy.api#xmlNamespace" +_s133 = "foo" +_s134 = "X-Foo" +_s161 = "epoch-seconds" +_s163 = "http-date" +_s165 = "memberEpochSeconds" +_s167 = "memberHttpDate" +_s168 = "memberDateTime" +_s169 = "defaultFormat" +_s170 = "targetEpochSeconds" +_s171 = "targetHttpDate" +_s172 = "targetDateTime" +_s235 = "a" +_s237 = "b" +_s244 = "emptyString" +_s249 = "data" +_s250 = "QueryIdempotencyTokenAutoFillInput" +_s251 = "token" +_s252 = "smithy.api#idempotencyToken" +_s253 = "StringListMap" +_s254 = "QueryParamsAsStringListMapInput" +_s255 = "qux" +_s256 = "corge" +_s257 = "QueryPrecedenceInput" +_s258 = "bar" +_s259 = "RecursiveShapesRequest" +_s260 = "RecursiveShapesResponse" +_s261 = "RenamedListMembers" +_s262 = "item" +_s263 = "SimpleScalarPropertiesRequest" +_s264 = "stringValue" +_s265 = "trueBooleanValue" +_s266 = "falseBooleanValue" +_s267 = "byteValue" +_s268 = "shortValue" +_s269 = "integerValue" +_s270 = "longValue" +_s271 = "floatValue" +_s272 = "doubleValue" +_s273 = "DoubleDribble" +_s274 = "SimpleScalarPropertiesResponse" +_s275 = "StringPayloadInput" +_s276 = "StructureListMember" +_s277 = "other" +_s278 = "StructureList" +_s279 = "TimestampFormatHeadersIO" +_s280 = "X-memberEpochSeconds" +_s281 = "X-memberHttpDate" +_s282 = "X-memberDateTime" +_s283 = "X-defaultFormat" +_s284 = "X-targetEpochSeconds" +_s285 = "X-targetHttpDate" +_s286 = "X-targetDateTime" +_s287 = "XmlAttributesInMiddlePayloadRequest" +_s288 = "attr" +_s289 = "smithy.api#xmlAttribute" +_s290 = "test" +_s291 = "XmlAttributesInMiddlePayloadResponse" +_s292 = "XmlAttributesInMiddleRequest" +_s293 = "XmlAttributesInMiddleResponse" +_s294 = "XmlAttributesPayloadRequest" +_s295 = "XmlAttributesOnPayloadRequest" +_s296 = "XmlAttributesPayloadResponse" +_s297 = "XmlAttributesOnPayloadResponse" +_s298 = "XmlAttributesRequest" +_s299 = "XmlAttributesResponse" +_s300 = "XmlBlobsRequest" +_s301 = "XmlBlobsResponse" +_s302 = "XmlEmptyBlobsRequest" +_s303 = "XmlEmptyBlobsResponse" +_s304 = "NestedStringList" +_s305 = "XmlEmptyListsRequest" +_s306 = "stringList" +_s307 = "stringSet" +_s308 = "integerList" +_s309 = "booleanList" +_s310 = "timestampList" +_s311 = "enumList" +_s312 = "intEnumList" +_s313 = "nestedStringList" +_s314 = "renamedListMembers" +_s315 = "renamed" +_s316 = "flattenedList" +_s317 = "flattenedList2" +_s318 = "customName" +_s319 = "flattenedListWithMemberNamespace" +_s320 = "flattenedListWithNamespace" +_s321 = "structureList" +_s322 = "myStructureList" +_s323 = "flattenedStructureList" +_s324 = "XmlEmptyListsResponse" +_s325 = "GreetingStruct" +_s326 = "hi" +_s327 = "XmlMapsInputOutputMap" +_s328 = "XmlEmptyMapsRequest" +_s329 = "XmlEmptyMapsResponse" +_s330 = "XmlEmptyStringsRequest" +_s331 = "XmlEmptyStringsResponse" +_s332 = "FooEnumSet" +_s333 = "XmlEnumsRequest" +_s334 = "fooEnum1" +_s335 = "fooEnum2" +_s336 = "fooEnum3" +_s337 = "fooEnumList" +_s338 = "fooEnumSet" +_s339 = "fooEnumMap" +_s340 = "XmlEnumsResponse" +_s341 = "IntegerEnumSet" +_s342 = "IntegerEnumMap" +_s343 = "XmlIntEnumsRequest" +_s344 = "intEnum1" +_s345 = "intEnum2" +_s346 = "intEnum3" +_s347 = "intEnumSet" +_s348 = "intEnumMap" +_s349 = "XmlIntEnumsResponse" +_s350 = "XmlListsRequest" +_s351 = "XmlListsResponse" +_s352 = "XmlMapWithXmlNamespaceInputOutputMap" +_s353 = "XmlMapWithXmlNamespaceRequest" +_s354 = "XmlMapWithXmlNamespaceResponse" +_s355 = "XmlMapsRequest" +_s356 = "XmlMapsResponse" +_s357 = "XmlMapsXmlNameInputOutputMap" +_s358 = "Attribute" +_s359 = "Setting" +_s360 = "XmlMapsXmlNameRequest" +_s361 = "XmlMapsXmlNameResponse" +_s362 = "XmlNamespacedList" +_s363 = "XmlNamespaceNested" +_s364 = "values" +_s365 = "XmlNamespacesRequest" +_s366 = "XmlNamespacesResponse" +_s367 = "XmlNestedUnionStruct" +_s368 = "booleanValue" +_s369 = "XmlTimestampsRequest" +_s370 = "normal" +_s371 = "dateTime" +_s372 = "dateTimeOnTarget" +_s373 = "epochSeconds" +_s374 = "epochSecondsOnTarget" +_s375 = "httpDate" +_s376 = "httpDateOnTarget" +_s377 = "XmlTimestampsResponse" +_s378 = "XmlUnionsRequest" +_s379 = "unionValue" +_s380 = "XmlUnionsResponse" +_s381 = "RecursiveShapesInputOutputNested1" +_s382 = "RecursiveShapesInputOutputNested2" +_s383 = "recursiveMember" +_s384 = "XmlUnionShape" +_s385 = "structValue" + +QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL_INPUT: StaticSchema = ( + 18, + n1, + _s250, + {_s30: None}, + (_s251,), + ((3, {_s32: _s251, _s252: None}),), +) + +STRING_LIST_MAP: StaticSchema = ( + 17, + n0, + _s253, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (lambda: schemas.STRING_LIST, 0), + ), +) + +QUERY_PARAMS_AS_STRING_LIST_MAP_INPUT: StaticSchema = ( + 18, + n1, + _s254, + {_s30: None}, + ( + _s255, + _s133, + ), + ( + (3, {_s32: _s256}), + (STRING_LIST_MAP, 1024), + ), +) + +QUERY_PRECEDENCE_INPUT: StaticSchema = ( + 18, + n1, + _s257, + {_s30: None}, + ( + _s133, + _s83, + ), + ( + (3, {_s32: _s258}), + (lambda: schemas.STRING_MAP, 1024), + ), +) + +RECURSIVE_SHAPES_REQUEST: StaticSchema = ( + 18, + n1, + _s259, + {_s30: None}, + (_s71,), + ((lambda: RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1, 0),), +) + +RECURSIVE_SHAPES_RESPONSE: StaticSchema = ( + 18, + n1, + _s260, + {_s70: None}, + (_s71,), + ((lambda: RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1, 0),), +) + +RENAMED_LIST_MEMBERS: StaticSchema = ( + 16, + n1, + _s261, + 0, + (_s1,), + ((3, {_s65: _s262}),), +) + +SIMPLE_SCALAR_PROPERTIES_REQUEST: StaticSchema = ( + 18, + n1, + _s263, + {_s30: None}, + ( + _s133, + _s264, + _s265, + _s266, + _s267, + _s268, + _s269, + _s270, + _s271, + _s272, + ), + ( + (3, {_s78: _s134}), + (3, 0), + (2, 0), + (2, 0), + (5, 0), + (6, 0), + (7, 0), + (8, 0), + (9, 0), + (10, {_s65: _s273}), + ), +) + +SIMPLE_SCALAR_PROPERTIES_RESPONSE: StaticSchema = ( + 18, + n1, + _s274, + {_s70: None}, + ( + _s133, + _s264, + _s265, + _s266, + _s267, + _s268, + _s269, + _s270, + _s271, + _s272, + ), + ( + (3, {_s78: _s134}), + (3, 0), + (2, 0), + (2, 0), + (5, 0), + (6, 0), + (7, 0), + (8, 0), + (9, 0), + (10, {_s65: _s273}), + ), +) + +STRING_PAYLOAD_INPUT: StaticSchema = ( + 18, + n1, + _s275, + {_s30: None, _s70: None}, + (_s102,), + ((3, 16),), +) + +STRUCTURE_LIST_MEMBER: StaticSchema = ( + 18, + n1, + _s276, + 0, + ( + _s235, + _s237, + ), + ( + (3, {_s65: _s28}), + (3, {_s65: _s277}), + ), +) + +STRUCTURE_LIST: StaticSchema = ( + 16, + n1, + _s278, + 0, + (_s1,), + ((STRUCTURE_LIST_MEMBER, {_s65: _s262}),), +) + +TIMESTAMP_FORMAT_HEADERS_IO: StaticSchema = ( + 18, + n1, + _s279, + {_s30: None, _s70: None}, + ( + _s165, + _s167, + _s168, + _s169, + _s170, + _s171, + _s172, + ), + ( + (4, {_s78: _s280, _s90: _s161}), + (4, {_s78: _s281, _s90: _s163}), + (4, {_s78: _s282, _s90: _s91}), + (4, {_s78: _s283}), + (lambda: schemas.EPOCH_SECONDS, {_s78: _s284}), + (lambda: schemas.HTTP_DATE, {_s78: _s285}), + (lambda: schemas.DATE_TIME, {_s78: _s286}), + ), +) + +XML_ATTRIBUTES_IN_MIDDLE_PAYLOAD_REQUEST: StaticSchema = ( + 18, + n1, + _s287, + 0, + ( + _s133, + _s288, + _s83, + ), + ( + (3, 0), + (3, {_s289: None, _s65: _s290}), + (3, 0), + ), +) + +XML_ATTRIBUTES_IN_MIDDLE_PAYLOAD_RESPONSE: StaticSchema = ( + 18, + n1, + _s291, + 0, + ( + _s133, + _s288, + _s83, + ), + ( + (3, 0), + (3, {_s289: None, _s65: _s290}), + (3, 0), + ), +) + +XML_ATTRIBUTES_IN_MIDDLE_REQUEST: StaticSchema = ( + 18, + n1, + _s292, + {_s30: None}, + (_s102,), + ((XML_ATTRIBUTES_IN_MIDDLE_PAYLOAD_REQUEST, 16),), +) + +XML_ATTRIBUTES_IN_MIDDLE_RESPONSE: StaticSchema = ( + 18, + n1, + _s293, + {_s70: None}, + (_s102,), + ((XML_ATTRIBUTES_IN_MIDDLE_PAYLOAD_RESPONSE, 16),), +) + +XML_ATTRIBUTES_PAYLOAD_REQUEST: StaticSchema = ( + 18, + n1, + _s294, + 0, + ( + _s133, + _s288, + ), + ( + (3, 0), + (3, {_s289: None, _s65: _s290}), + ), +) + +XML_ATTRIBUTES_ON_PAYLOAD_REQUEST: StaticSchema = ( + 18, + n1, + _s295, + {_s30: None}, + (_s102,), + ((XML_ATTRIBUTES_PAYLOAD_REQUEST, 16),), +) + +XML_ATTRIBUTES_ON_PAYLOAD_RESPONSE: StaticSchema = ( + 18, + n1, + _s297, + {_s70: None}, + (_s102,), + ((lambda: XML_ATTRIBUTES_PAYLOAD_RESPONSE, 16),), +) + +XML_ATTRIBUTES_PAYLOAD_RESPONSE: StaticSchema = ( + 18, + n1, + _s296, + 0, + ( + _s133, + _s288, + ), + ( + (3, 0), + (3, {_s289: None, _s65: _s290}), + ), +) + +XML_ATTRIBUTES_REQUEST: StaticSchema = ( + 18, + n1, + _s298, + {_s30: None}, + ( + _s133, + _s288, + ), + ( + (3, 0), + (3, {_s289: None, _s65: _s290}), + ), +) + +XML_ATTRIBUTES_RESPONSE: StaticSchema = ( + 18, + n1, + _s299, + {_s70: None}, + ( + _s133, + _s288, + ), + ( + (3, 0), + (3, {_s289: None, _s65: _s290}), + ), +) + +XML_BLOBS_REQUEST: StaticSchema = ( + 18, + n1, + _s300, + {_s30: None}, + (_s249,), + ((1, 0),), +) + +XML_BLOBS_RESPONSE: StaticSchema = ( + 18, + n1, + _s301, + {_s70: None}, + (_s249,), + ((1, 0),), +) + +XML_EMPTY_BLOBS_REQUEST: StaticSchema = ( + 18, + n1, + _s302, + {_s30: None}, + (_s249,), + ((1, 0),), +) + +XML_EMPTY_BLOBS_RESPONSE: StaticSchema = ( + 18, + n1, + _s303, + {_s70: None}, + (_s249,), + ((1, 0),), +) + +NESTED_STRING_LIST: StaticSchema = ( + 16, + n0, + _s304, + 0, + (_s1,), + ((lambda: schemas.STRING_LIST, 0),), +) + +XML_EMPTY_LISTS_REQUEST: StaticSchema = ( + 18, + n1, + _s305, + {_s30: None}, + ( + _s306, + _s307, + _s308, + _s309, + _s310, + _s311, + _s312, + _s313, + _s314, + _s316, + _s317, + _s319, + _s320, + _s321, + _s323, + ), + ( + (lambda: schemas.STRING_LIST, 0), + (lambda: schemas.STRING_SET, 0), + (lambda: schemas.INTEGER_LIST, 0), + (lambda: schemas.BOOLEAN_LIST, 0), + (lambda: schemas.TIMESTAMP_LIST, 0), + (lambda: schemas.FOO_ENUM_LIST, 0), + (lambda: schemas.INTEGER_ENUM_LIST, 0), + (NESTED_STRING_LIST, 0), + (RENAMED_LIST_MEMBERS, {_s65: _s315}), + (RENAMED_LIST_MEMBERS, {_s106: None}), + (RENAMED_LIST_MEMBERS, {_s106: None, _s65: _s318}), + (lambda: schemas.LIST_WITH_MEMBER_NAMESPACE, {_s106: None}), + (lambda: schemas.LIST_WITH_NAMESPACE, {_s106: None}), + (STRUCTURE_LIST, {_s65: _s322}), + (STRUCTURE_LIST, {_s106: None}), + ), +) + +XML_EMPTY_LISTS_RESPONSE: StaticSchema = ( + 18, + n1, + _s324, + {_s70: None}, + ( + _s306, + _s307, + _s308, + _s309, + _s310, + _s311, + _s312, + _s313, + _s314, + _s316, + _s317, + _s319, + _s320, + _s321, + _s323, + ), + ( + (lambda: schemas.STRING_LIST, 0), + (lambda: schemas.STRING_SET, 0), + (lambda: schemas.INTEGER_LIST, 0), + (lambda: schemas.BOOLEAN_LIST, 0), + (lambda: schemas.TIMESTAMP_LIST, 0), + (lambda: schemas.FOO_ENUM_LIST, 0), + (lambda: schemas.INTEGER_ENUM_LIST, 0), + (NESTED_STRING_LIST, 0), + (RENAMED_LIST_MEMBERS, {_s65: _s315}), + (RENAMED_LIST_MEMBERS, {_s106: None}), + (RENAMED_LIST_MEMBERS, {_s106: None, _s65: _s318}), + (lambda: schemas.LIST_WITH_MEMBER_NAMESPACE, {_s106: None}), + (lambda: schemas.LIST_WITH_NAMESPACE, {_s106: None}), + (STRUCTURE_LIST, {_s65: _s322}), + (STRUCTURE_LIST, {_s106: None}), + ), +) + +GREETING_STRUCT: StaticSchema = ( + 18, + n0, + _s325, + 0, + (_s326,), + ((3, 0),), +) + +XML_MAPS_INPUT_OUTPUT_MAP: StaticSchema = ( + 17, + n1, + _s327, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (GREETING_STRUCT, 0), + ), +) + +XML_EMPTY_MAPS_REQUEST: StaticSchema = ( + 18, + n1, + _s328, + {_s30: None}, + (_s105,), + ((XML_MAPS_INPUT_OUTPUT_MAP, 0),), +) + +XML_EMPTY_MAPS_RESPONSE: StaticSchema = ( + 18, + n1, + _s329, + {_s70: None}, + (_s105,), + ((XML_MAPS_INPUT_OUTPUT_MAP, 0),), +) + +XML_EMPTY_STRINGS_REQUEST: StaticSchema = ( + 18, + n1, + _s330, + {_s30: None}, + (_s244,), + ((3, 0),), +) + +XML_EMPTY_STRINGS_RESPONSE: StaticSchema = ( + 18, + n1, + _s331, + {_s70: None}, + (_s244,), + ((3, 0),), +) + +FOO_ENUM_SET: StaticSchema = ( + 16, + n0, + _s332, + 0, + (_s1,), + ((lambda: schemas.FOO_ENUM, 0),), +) + +XML_ENUMS_REQUEST: StaticSchema = ( + 18, + n1, + _s333, + {_s30: None}, + ( + _s334, + _s335, + _s336, + _s337, + _s338, + _s339, + ), + ( + (lambda: schemas.FOO_ENUM, 0), + (lambda: schemas.FOO_ENUM, 0), + (lambda: schemas.FOO_ENUM, 0), + (lambda: schemas.FOO_ENUM_LIST, 0), + (FOO_ENUM_SET, 0), + (lambda: schemas.FOO_ENUM_MAP, 0), + ), +) + +XML_ENUMS_RESPONSE: StaticSchema = ( + 18, + n1, + _s340, + {_s70: None}, + ( + _s334, + _s335, + _s336, + _s337, + _s338, + _s339, + ), + ( + (lambda: schemas.FOO_ENUM, 0), + (lambda: schemas.FOO_ENUM, 0), + (lambda: schemas.FOO_ENUM, 0), + (lambda: schemas.FOO_ENUM_LIST, 0), + (FOO_ENUM_SET, 0), + (lambda: schemas.FOO_ENUM_MAP, 0), + ), +) + +INTEGER_ENUM_SET: StaticSchema = ( + 16, + n0, + _s341, + 0, + (_s1,), + ((lambda: schemas.INTEGER_ENUM, 0),), +) + +INTEGER_ENUM_MAP: StaticSchema = ( + 17, + n0, + _s342, + 0, + ( + _s27, + _s28, + ), + ( + (3, 0), + (lambda: schemas.INTEGER_ENUM, 0), + ), +) + +XML_INT_ENUMS_REQUEST: StaticSchema = ( + 18, + n1, + _s343, + {_s30: None}, + ( + _s344, + _s345, + _s346, + _s312, + _s347, + _s348, + ), + ( + (lambda: schemas.INTEGER_ENUM, 0), + (lambda: schemas.INTEGER_ENUM, 0), + (lambda: schemas.INTEGER_ENUM, 0), + (lambda: schemas.INTEGER_ENUM_LIST, 0), + (INTEGER_ENUM_SET, 0), + (INTEGER_ENUM_MAP, 0), + ), +) + +XML_INT_ENUMS_RESPONSE: StaticSchema = ( + 18, + n1, + _s349, + {_s70: None}, + ( + _s344, + _s345, + _s346, + _s312, + _s347, + _s348, + ), + ( + (lambda: schemas.INTEGER_ENUM, 0), + (lambda: schemas.INTEGER_ENUM, 0), + (lambda: schemas.INTEGER_ENUM, 0), + (lambda: schemas.INTEGER_ENUM_LIST, 0), + (INTEGER_ENUM_SET, 0), + (INTEGER_ENUM_MAP, 0), + ), +) + +XML_LISTS_REQUEST: StaticSchema = ( + 18, + n1, + _s350, + {_s30: None}, + ( + _s306, + _s307, + _s308, + _s309, + _s310, + _s311, + _s312, + _s313, + _s314, + _s316, + _s317, + _s319, + _s320, + _s321, + _s323, + ), + ( + (lambda: schemas.STRING_LIST, 0), + (lambda: schemas.STRING_SET, 0), + (lambda: schemas.INTEGER_LIST, 0), + (lambda: schemas.BOOLEAN_LIST, 0), + (lambda: schemas.TIMESTAMP_LIST, 0), + (lambda: schemas.FOO_ENUM_LIST, 0), + (lambda: schemas.INTEGER_ENUM_LIST, 0), + (NESTED_STRING_LIST, 0), + (RENAMED_LIST_MEMBERS, {_s65: _s315}), + (RENAMED_LIST_MEMBERS, {_s106: None}), + (RENAMED_LIST_MEMBERS, {_s106: None, _s65: _s318}), + (lambda: schemas.LIST_WITH_MEMBER_NAMESPACE, {_s106: None}), + (lambda: schemas.LIST_WITH_NAMESPACE, {_s106: None}), + (STRUCTURE_LIST, {_s65: _s322}), + (STRUCTURE_LIST, {_s106: None}), + ), +) + +XML_LISTS_RESPONSE: StaticSchema = ( + 18, + n1, + _s351, + {_s70: None}, + ( + _s306, + _s307, + _s308, + _s309, + _s310, + _s311, + _s312, + _s313, + _s314, + _s316, + _s317, + _s319, + _s320, + _s321, + _s323, + ), + ( + (lambda: schemas.STRING_LIST, 0), + (lambda: schemas.STRING_SET, 0), + (lambda: schemas.INTEGER_LIST, 0), + (lambda: schemas.BOOLEAN_LIST, 0), + (lambda: schemas.TIMESTAMP_LIST, 0), + (lambda: schemas.FOO_ENUM_LIST, 0), + (lambda: schemas.INTEGER_ENUM_LIST, 0), + (NESTED_STRING_LIST, 0), + (RENAMED_LIST_MEMBERS, {_s65: _s315}), + (RENAMED_LIST_MEMBERS, {_s106: None}), + (RENAMED_LIST_MEMBERS, {_s106: None, _s65: _s318}), + (lambda: schemas.LIST_WITH_MEMBER_NAMESPACE, {_s106: None}), + (lambda: schemas.LIST_WITH_NAMESPACE, {_s106: None}), + (STRUCTURE_LIST, {_s65: _s322}), + (STRUCTURE_LIST, {_s106: None}), + ), +) + +XML_MAP_WITH_XML_NAMESPACE_INPUT_OUTPUT_MAP: StaticSchema = ( + 17, + n1, + _s352, + 0, + ( + _s27, + _s28, + ), + ( + ( + 3, + { + _s65: _s109, + _s114: MappingProxyType({"uri": "https://the-key.example.com"}), + }, + ), + ( + 3, + { + _s65: _s99, + _s114: MappingProxyType({"uri": "https://the-value.example.com"}), + }, + ), + ), +) + +XML_MAP_WITH_XML_NAMESPACE_REQUEST: StaticSchema = ( + 18, + n1, + _s353, + {_s30: None}, + (_s105,), + ( + ( + XML_MAP_WITH_XML_NAMESPACE_INPUT_OUTPUT_MAP, + { + _s65: _s111, + _s114: MappingProxyType({"uri": "https://the-member.example.com"}), + }, + ), + ), +) + +XML_MAP_WITH_XML_NAMESPACE_RESPONSE: StaticSchema = ( + 18, + n1, + _s354, + {_s70: None}, + (_s105,), + ( + ( + XML_MAP_WITH_XML_NAMESPACE_INPUT_OUTPUT_MAP, + { + _s65: _s111, + _s114: MappingProxyType({"uri": "https://the-member.example.com"}), + }, + ), + ), +) + +XML_MAPS_REQUEST: StaticSchema = ( + 18, + n1, + _s355, + {_s30: None}, + (_s105,), + ((XML_MAPS_INPUT_OUTPUT_MAP, 0),), +) + +XML_MAPS_RESPONSE: StaticSchema = ( + 18, + n1, + _s356, + {_s70: None}, + (_s105,), + ((XML_MAPS_INPUT_OUTPUT_MAP, 0),), +) + +XML_MAPS_XML_NAME_INPUT_OUTPUT_MAP: StaticSchema = ( + 17, + n1, + _s357, + 0, + ( + _s27, + _s28, + ), + ( + (3, {_s65: _s358}), + (GREETING_STRUCT, {_s65: _s359}), + ), +) + +XML_MAPS_XML_NAME_REQUEST: StaticSchema = ( + 18, + n1, + _s360, + {_s30: None}, + (_s105,), + ((XML_MAPS_XML_NAME_INPUT_OUTPUT_MAP, 0),), +) + +XML_MAPS_XML_NAME_RESPONSE: StaticSchema = ( + 18, + n1, + _s361, + {_s70: None}, + (_s105,), + ((XML_MAPS_XML_NAME_INPUT_OUTPUT_MAP, 0),), +) + +XML_NAMESPACED_LIST: StaticSchema = ( + 16, + n1, + _s362, + 0, + (_s1,), + ((3, {_s114: MappingProxyType({"uri": "http://bux.com"})}),), +) + +XML_NAMESPACE_NESTED: StaticSchema = ( + 18, + n1, + _s363, + {_s114: MappingProxyType({"uri": "http://foo.com"})}, + ( + _s133, + _s364, + ), + ( + (3, {_s114: MappingProxyType({"uri": "http://baz.com", "prefix": "baz"})}), + (XML_NAMESPACED_LIST, {_s114: MappingProxyType({"uri": "http://qux.com"})}), + ), +) + +XML_NAMESPACES_REQUEST: StaticSchema = ( + 18, + n1, + _s365, + {_s114: MappingProxyType({"uri": "http://foo.com"}), _s30: None}, + (_s71,), + ((XML_NAMESPACE_NESTED, 0),), +) + +XML_NAMESPACES_RESPONSE: StaticSchema = ( + 18, + n1, + _s366, + {_s114: MappingProxyType({"uri": "http://foo.com"}), _s70: None}, + (_s71,), + ((XML_NAMESPACE_NESTED, 0),), +) + +XML_NESTED_UNION_STRUCT: StaticSchema = ( + 18, + n1, + _s367, + 0, + ( + _s264, + _s368, + _s267, + _s268, + _s269, + _s270, + _s271, + _s272, + ), + ( + (3, 0), + (2, 0), + (5, 0), + (6, 0), + (7, 0), + (8, 0), + (9, 0), + (10, 0), + ), +) + +XML_TIMESTAMPS_REQUEST: StaticSchema = ( + 18, + n1, + _s369, + {_s30: None}, + ( + _s370, + _s371, + _s372, + _s373, + _s374, + _s375, + _s376, + ), + ( + (4, 0), + (4, {_s90: _s91}), + (lambda: schemas.DATE_TIME, 0), + (4, {_s90: _s161}), + (lambda: schemas.EPOCH_SECONDS, 0), + (4, {_s90: _s163}), + (lambda: schemas.HTTP_DATE, 0), + ), +) + +XML_TIMESTAMPS_RESPONSE: StaticSchema = ( + 18, + n1, + _s377, + {_s70: None}, + ( + _s370, + _s371, + _s372, + _s373, + _s374, + _s375, + _s376, + ), + ( + (4, 0), + (4, {_s90: _s91}), + (lambda: schemas.DATE_TIME, 0), + (4, {_s90: _s161}), + (lambda: schemas.EPOCH_SECONDS, 0), + (4, {_s90: _s163}), + (lambda: schemas.HTTP_DATE, 0), + ), +) + +XML_UNIONS_REQUEST: StaticSchema = ( + 18, + n1, + _s378, + {_s30: None}, + (_s379,), + ((lambda: XML_UNION_SHAPE, 0),), +) + +XML_UNIONS_RESPONSE: StaticSchema = ( + 18, + n1, + _s380, + {_s70: None}, + (_s379,), + ((lambda: XML_UNION_SHAPE, 0),), +) + +RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1: StaticSchema = ( + 18, + n1, + _s381, + 0, + ( + _s133, + _s71, + ), + ( + (3, 0), + (lambda: RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2, 0), + ), +) + +RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2: StaticSchema = ( + 18, + n1, + _s382, + 0, + ( + _s258, + _s383, + ), + ( + (3, 0), + (RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1, 0), + ), +) + +XML_UNION_SHAPE: StaticSchema = ( + 19, + n1, + _s384, + 0, + ( + _s264, + _s368, + _s267, + _s268, + _s269, + _s270, + _s271, + _s272, + _s379, + _s385, + ), + ( + (3, 0), + (2, 0), + (5, 0), + (6, 0), + (7, 0), + (8, 0), + (9, 0), + (10, 0), + (lambda: XML_UNION_SHAPE, 0), + (XML_NESTED_UNION_STRUCT, 0), + ), +) diff --git a/codegen-output-py/rest-xml/src/restxml/models.py b/codegen-output-py/rest-xml/src/restxml/models.py new file mode 100644 index 000000000..d9c8165c4 --- /dev/null +++ b/codegen-output-py/rest-xml/src/restxml/models.py @@ -0,0 +1,281 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "AllQueryStringTypesInput": "ALL_QUERY_STRING_TYPES_INPUT", + "BodyWithXmlNameInputOutput": "BODY_WITH_XML_NAME_INPUT_OUTPUT", + "ComplexError": "COMPLEX_ERROR", + "ComplexNestedErrorData": "COMPLEX_NESTED_ERROR_DATA", + "ConstantAndVariableQueryStringInput": "CONSTANT_AND_VARIABLE_QUERY_STRING_INPUT", + "ConstantQueryStringInput": "CONSTANT_QUERY_STRING_INPUT", + "ContentTypeParametersInput": "CONTENT_TYPE_PARAMETERS_INPUT", + "ContentTypeParametersOutput": "CONTENT_TYPE_PARAMETERS_OUTPUT", + "DatetimeOffsetsOutput": "DATETIME_OFFSETS_OUTPUT", + "EmptyInputAndEmptyOutputInput": "EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT", + "EmptyInputAndEmptyOutputOutput": "EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT", + "EndpointWithHostLabelOperationRequest": "ENDPOINT_WITH_HOST_LABEL_OPERATION_REQUEST", + "EnumPayloadInput": "ENUM_PAYLOAD_INPUT", + "FlattenedXmlMapRequest": "FLATTENED_XML_MAP_REQUEST", + "FlattenedXmlMapResponse": "FLATTENED_XML_MAP_RESPONSE", + "FlattenedXmlMapWithXmlNameRequest": "FLATTENED_XML_MAP_WITH_XML_NAME_REQUEST", + "FlattenedXmlMapWithXmlNameResponse": "FLATTENED_XML_MAP_WITH_XML_NAME_RESPONSE", + "FlattenedXmlMapWithXmlNamespaceOutput": "FLATTENED_XML_MAP_WITH_XML_NAMESPACE_OUTPUT", + "FractionalSecondsOutput": "FRACTIONAL_SECONDS_OUTPUT", + "GreetingWithErrorsOutput": "GREETING_WITH_ERRORS_OUTPUT", + "HostLabelHeaderInput": "HOST_LABEL_HEADER_INPUT", + "HttpEmptyPrefixHeadersInput": "HTTP_EMPTY_PREFIX_HEADERS_INPUT", + "HttpEmptyPrefixHeadersOutput": "HTTP_EMPTY_PREFIX_HEADERS_OUTPUT", + "HttpPayloadTraitsInputOutput": "HTTP_PAYLOAD_TRAITS_INPUT_OUTPUT", + "HttpPayloadTraitsWithMediaTypeInputOutput": "HTTP_PAYLOAD_TRAITS_WITH_MEDIA_TYPE_INPUT_OUTPUT", + "HttpPayloadWithMemberXmlNameInputOutput": "HTTP_PAYLOAD_WITH_MEMBER_XML_NAME_INPUT_OUTPUT", + "HttpPayloadWithStructureInputOutput": "HTTP_PAYLOAD_WITH_STRUCTURE_INPUT_OUTPUT", + "HttpPayloadWithUnionInputOutput": "HTTP_PAYLOAD_WITH_UNION_INPUT_OUTPUT", + "HttpPayloadWithXmlNameInputOutput": "HTTP_PAYLOAD_WITH_XML_NAME_INPUT_OUTPUT", + "HttpPayloadWithXmlNamespaceAndPrefixInputOutput": "HTTP_PAYLOAD_WITH_XML_NAMESPACE_AND_PREFIX_INPUT_OUTPUT", + "HttpPayloadWithXmlNamespaceInputOutput": "HTTP_PAYLOAD_WITH_XML_NAMESPACE_INPUT_OUTPUT", + "HttpPrefixHeadersInputOutput": "HTTP_PREFIX_HEADERS_INPUT_OUTPUT", + "HttpRequestWithFloatLabelsInput": "HTTP_REQUEST_WITH_FLOAT_LABELS_INPUT", + "HttpRequestWithGreedyLabelInPathInput": "HTTP_REQUEST_WITH_GREEDY_LABEL_IN_PATH_INPUT", + "HttpRequestWithLabelsAndTimestampFormatInput": "HTTP_REQUEST_WITH_LABELS_AND_TIMESTAMP_FORMAT_INPUT", + "HttpRequestWithLabelsInput": "HTTP_REQUEST_WITH_LABELS_INPUT", + "HttpResponseCodeOutput": "HTTP_RESPONSE_CODE_OUTPUT", + "IgnoreQueryParamsInResponseOutput": "IGNORE_QUERY_PARAMS_IN_RESPONSE_OUTPUT", + "InputAndOutputWithHeadersIO": "INPUT_AND_OUTPUT_WITH_HEADERS_IO", + "InvalidGreeting": "INVALID_GREETING", + "NestedPayload": "NESTED_PAYLOAD", + "NestedXmlMapWithXmlNameRequest": "NESTED_XML_MAP_WITH_XML_NAME_REQUEST", + "NestedXmlMapWithXmlNameResponse": "NESTED_XML_MAP_WITH_XML_NAME_RESPONSE", + "NestedXmlMapsRequest": "NESTED_XML_MAPS_REQUEST", + "NestedXmlMapsResponse": "NESTED_XML_MAPS_RESPONSE", + "NoInputAndOutputOutput": "NO_INPUT_AND_OUTPUT_OUTPUT", + "NullAndEmptyHeadersIO": "NULL_AND_EMPTY_HEADERS_IO", + "OmitsNullSerializesEmptyStringInput": "OMITS_NULL_SERIALIZES_EMPTY_STRING_INPUT", + "PayloadWithXmlName": "PAYLOAD_WITH_XML_NAME", + "PayloadWithXmlNamespace": "PAYLOAD_WITH_XML_NAMESPACE", + "PayloadWithXmlNamespaceAndPrefix": "PAYLOAD_WITH_XML_NAMESPACE_AND_PREFIX", + "PutWithContentEncodingInput": "PUT_WITH_CONTENT_ENCODING_INPUT", + "QueryIdempotencyTokenAutoFillInput": "QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL_INPUT", + "QueryParamsAsStringListMapInput": "QUERY_PARAMS_AS_STRING_LIST_MAP_INPUT", + "QueryPrecedenceInput": "QUERY_PRECEDENCE_INPUT", + "RecursiveShapesInputOutputNested1": "RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1", + "RecursiveShapesInputOutputNested2": "RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2", + "RecursiveShapesRequest": "RECURSIVE_SHAPES_REQUEST", + "RecursiveShapesResponse": "RECURSIVE_SHAPES_RESPONSE", + "SimpleScalarPropertiesRequest": "SIMPLE_SCALAR_PROPERTIES_REQUEST", + "SimpleScalarPropertiesResponse": "SIMPLE_SCALAR_PROPERTIES_RESPONSE", + "StringEnum": "STRING_ENUM", + "StringPayloadInput": "STRING_PAYLOAD_INPUT", + "StructureListMember": "STRUCTURE_LIST_MEMBER", + "TimestampFormatHeadersIO": "TIMESTAMP_FORMAT_HEADERS_IO", + "UnionPayload": "UNION_PAYLOAD", + "UnionPayloadGreeting": "UNION_PAYLOAD", + "UnionPayloadUnknown": "UNION_PAYLOAD", + "XmlAttributesInMiddlePayloadRequest": "XML_ATTRIBUTES_IN_MIDDLE_PAYLOAD_REQUEST", + "XmlAttributesInMiddlePayloadResponse": "XML_ATTRIBUTES_IN_MIDDLE_PAYLOAD_RESPONSE", + "XmlAttributesInMiddleRequest": "XML_ATTRIBUTES_IN_MIDDLE_REQUEST", + "XmlAttributesInMiddleResponse": "XML_ATTRIBUTES_IN_MIDDLE_RESPONSE", + "XmlAttributesOnPayloadRequest": "XML_ATTRIBUTES_ON_PAYLOAD_REQUEST", + "XmlAttributesOnPayloadResponse": "XML_ATTRIBUTES_ON_PAYLOAD_RESPONSE", + "XmlAttributesPayloadRequest": "XML_ATTRIBUTES_PAYLOAD_REQUEST", + "XmlAttributesPayloadResponse": "XML_ATTRIBUTES_PAYLOAD_RESPONSE", + "XmlAttributesRequest": "XML_ATTRIBUTES_REQUEST", + "XmlAttributesResponse": "XML_ATTRIBUTES_RESPONSE", + "XmlBlobsRequest": "XML_BLOBS_REQUEST", + "XmlBlobsResponse": "XML_BLOBS_RESPONSE", + "XmlEmptyBlobsRequest": "XML_EMPTY_BLOBS_REQUEST", + "XmlEmptyBlobsResponse": "XML_EMPTY_BLOBS_RESPONSE", + "XmlEmptyListsRequest": "XML_EMPTY_LISTS_REQUEST", + "XmlEmptyListsResponse": "XML_EMPTY_LISTS_RESPONSE", + "XmlEmptyMapsRequest": "XML_EMPTY_MAPS_REQUEST", + "XmlEmptyMapsResponse": "XML_EMPTY_MAPS_RESPONSE", + "XmlEmptyStringsRequest": "XML_EMPTY_STRINGS_REQUEST", + "XmlEmptyStringsResponse": "XML_EMPTY_STRINGS_RESPONSE", + "XmlEnumsRequest": "XML_ENUMS_REQUEST", + "XmlEnumsResponse": "XML_ENUMS_RESPONSE", + "XmlIntEnumsRequest": "XML_INT_ENUMS_REQUEST", + "XmlIntEnumsResponse": "XML_INT_ENUMS_RESPONSE", + "XmlListsRequest": "XML_LISTS_REQUEST", + "XmlListsResponse": "XML_LISTS_RESPONSE", + "XmlMapWithXmlNamespaceRequest": "XML_MAP_WITH_XML_NAMESPACE_REQUEST", + "XmlMapWithXmlNamespaceResponse": "XML_MAP_WITH_XML_NAMESPACE_RESPONSE", + "XmlMapsRequest": "XML_MAPS_REQUEST", + "XmlMapsResponse": "XML_MAPS_RESPONSE", + "XmlMapsXmlNameRequest": "XML_MAPS_XML_NAME_REQUEST", + "XmlMapsXmlNameResponse": "XML_MAPS_XML_NAME_RESPONSE", + "XmlNamespaceNested": "XML_NAMESPACE_NESTED", + "XmlNamespacesRequest": "XML_NAMESPACES_REQUEST", + "XmlNamespacesResponse": "XML_NAMESPACES_RESPONSE", + "XmlNestedUnionStruct": "XML_NESTED_UNION_STRUCT", + "XmlTimestampsRequest": "XML_TIMESTAMPS_REQUEST", + "XmlTimestampsResponse": "XML_TIMESTAMPS_RESPONSE", + "XmlUnionShape": "XML_UNION_SHAPE", + "XmlUnionShapeStringValue": "XML_UNION_SHAPE", + "XmlUnionShapeBooleanValue": "XML_UNION_SHAPE", + "XmlUnionShapeByteValue": "XML_UNION_SHAPE", + "XmlUnionShapeShortValue": "XML_UNION_SHAPE", + "XmlUnionShapeIntegerValue": "XML_UNION_SHAPE", + "XmlUnionShapeLongValue": "XML_UNION_SHAPE", + "XmlUnionShapeFloatValue": "XML_UNION_SHAPE", + "XmlUnionShapeDoubleValue": "XML_UNION_SHAPE", + "XmlUnionShapeUnionValue": "XML_UNION_SHAPE", + "XmlUnionShapeStructValue": "XML_UNION_SHAPE", + "XmlUnionShapeUnknown": "XML_UNION_SHAPE", + "XmlUnionsRequest": "XML_UNIONS_REQUEST", + "XmlUnionsResponse": "XML_UNIONS_RESPONSE", + "FooEnum": "FOO_ENUM", + "GreetingStruct": "GREETING_STRUCT", + "IntegerEnum": "INTEGER_ENUM", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "AllQueryStringTypesInput", + "BodyWithXmlNameInputOutput", + "ComplexError", + "ComplexNestedErrorData", + "ConstantAndVariableQueryStringInput", + "ConstantQueryStringInput", + "ContentTypeParametersInput", + "ContentTypeParametersOutput", + "DatetimeOffsetsOutput", + "EmptyInputAndEmptyOutputInput", + "EmptyInputAndEmptyOutputOutput", + "EndpointWithHostLabelOperationRequest", + "EnumPayloadInput", + "FlattenedXmlMapRequest", + "FlattenedXmlMapResponse", + "FlattenedXmlMapWithXmlNameRequest", + "FlattenedXmlMapWithXmlNameResponse", + "FlattenedXmlMapWithXmlNamespaceOutput", + "FooEnum", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "HostLabelHeaderInput", + "HttpEmptyPrefixHeadersInput", + "HttpEmptyPrefixHeadersOutput", + "HttpPayloadTraitsInputOutput", + "HttpPayloadTraitsWithMediaTypeInputOutput", + "HttpPayloadWithMemberXmlNameInputOutput", + "HttpPayloadWithStructureInputOutput", + "HttpPayloadWithUnionInputOutput", + "HttpPayloadWithXmlNameInputOutput", + "HttpPayloadWithXmlNamespaceAndPrefixInputOutput", + "HttpPayloadWithXmlNamespaceInputOutput", + "HttpPrefixHeadersInputOutput", + "HttpRequestWithFloatLabelsInput", + "HttpRequestWithGreedyLabelInPathInput", + "HttpRequestWithLabelsAndTimestampFormatInput", + "HttpRequestWithLabelsInput", + "HttpResponseCodeOutput", + "IgnoreQueryParamsInResponseOutput", + "InputAndOutputWithHeadersIO", + "IntegerEnum", + "InvalidGreeting", + "NestedPayload", + "NestedXmlMapWithXmlNameRequest", + "NestedXmlMapWithXmlNameResponse", + "NestedXmlMapsRequest", + "NestedXmlMapsResponse", + "NoInputAndOutputOutput", + "NullAndEmptyHeadersIO", + "OmitsNullSerializesEmptyStringInput", + "PayloadWithXmlName", + "PayloadWithXmlNamespace", + "PayloadWithXmlNamespaceAndPrefix", + "PutWithContentEncodingInput", + "QueryIdempotencyTokenAutoFillInput", + "QueryParamsAsStringListMapInput", + "QueryPrecedenceInput", + "RecursiveShapesInputOutputNested1", + "RecursiveShapesInputOutputNested2", + "RecursiveShapesRequest", + "RecursiveShapesResponse", + "SimpleScalarPropertiesRequest", + "SimpleScalarPropertiesResponse", + "StringEnum", + "StringPayloadInput", + "StructureListMember", + "TimestampFormatHeadersIO", + "UnionPayload", + "XmlAttributesInMiddlePayloadRequest", + "XmlAttributesInMiddlePayloadResponse", + "XmlAttributesInMiddleRequest", + "XmlAttributesInMiddleResponse", + "XmlAttributesOnPayloadRequest", + "XmlAttributesOnPayloadResponse", + "XmlAttributesPayloadRequest", + "XmlAttributesPayloadResponse", + "XmlAttributesRequest", + "XmlAttributesResponse", + "XmlBlobsRequest", + "XmlBlobsResponse", + "XmlEmptyBlobsRequest", + "XmlEmptyBlobsResponse", + "XmlEmptyListsRequest", + "XmlEmptyListsResponse", + "XmlEmptyMapsRequest", + "XmlEmptyMapsResponse", + "XmlEmptyStringsRequest", + "XmlEmptyStringsResponse", + "XmlEnumsRequest", + "XmlEnumsResponse", + "XmlIntEnumsRequest", + "XmlIntEnumsResponse", + "XmlListsRequest", + "XmlListsResponse", + "XmlMapWithXmlNamespaceRequest", + "XmlMapWithXmlNamespaceResponse", + "XmlMapsRequest", + "XmlMapsResponse", + "XmlMapsXmlNameRequest", + "XmlMapsXmlNameResponse", + "XmlNamespaceNested", + "XmlNamespacesRequest", + "XmlNamespacesResponse", + "XmlNestedUnionStruct", + "XmlTimestampsRequest", + "XmlTimestampsResponse", + "XmlUnionShape", + "XmlUnionsRequest", + "XmlUnionsResponse", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/rest-xml/src/restxml/models.pyi b/codegen-output-py/rest-xml/src/restxml/models.pyi new file mode 100644 index 000000000..9fc3b893e --- /dev/null +++ b/codegen-output-py/rest-xml/src/restxml/models.pyi @@ -0,0 +1,1486 @@ +from dataclasses import dataclass +from datetime import datetime +from enum import IntEnum, StrEnum +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.serializers import ShapeSerializer +from smithy_core.types import UnknownEnumMixin + +__all__ = [ + "AllQueryStringTypesInput", + "BodyWithXmlNameInputOutput", + "ComplexError", + "ComplexNestedErrorData", + "ConstantAndVariableQueryStringInput", + "ConstantQueryStringInput", + "ContentTypeParametersInput", + "ContentTypeParametersOutput", + "DatetimeOffsetsOutput", + "EmptyInputAndEmptyOutputInput", + "EmptyInputAndEmptyOutputOutput", + "EndpointWithHostLabelOperationRequest", + "EnumPayloadInput", + "FlattenedXmlMapRequest", + "FlattenedXmlMapResponse", + "FlattenedXmlMapWithXmlNameRequest", + "FlattenedXmlMapWithXmlNameResponse", + "FlattenedXmlMapWithXmlNamespaceOutput", + "FooEnum", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "HostLabelHeaderInput", + "HttpEmptyPrefixHeadersInput", + "HttpEmptyPrefixHeadersOutput", + "HttpPayloadTraitsInputOutput", + "HttpPayloadTraitsWithMediaTypeInputOutput", + "HttpPayloadWithMemberXmlNameInputOutput", + "HttpPayloadWithStructureInputOutput", + "HttpPayloadWithUnionInputOutput", + "HttpPayloadWithXmlNameInputOutput", + "HttpPayloadWithXmlNamespaceAndPrefixInputOutput", + "HttpPayloadWithXmlNamespaceInputOutput", + "HttpPrefixHeadersInputOutput", + "HttpRequestWithFloatLabelsInput", + "HttpRequestWithGreedyLabelInPathInput", + "HttpRequestWithLabelsAndTimestampFormatInput", + "HttpRequestWithLabelsInput", + "HttpResponseCodeOutput", + "IgnoreQueryParamsInResponseOutput", + "InputAndOutputWithHeadersIO", + "IntegerEnum", + "InvalidGreeting", + "NestedPayload", + "NestedXmlMapWithXmlNameRequest", + "NestedXmlMapWithXmlNameResponse", + "NestedXmlMapsRequest", + "NestedXmlMapsResponse", + "NoInputAndOutputOutput", + "NullAndEmptyHeadersIO", + "OmitsNullSerializesEmptyStringInput", + "PayloadWithXmlName", + "PayloadWithXmlNamespace", + "PayloadWithXmlNamespaceAndPrefix", + "PutWithContentEncodingInput", + "QueryIdempotencyTokenAutoFillInput", + "QueryParamsAsStringListMapInput", + "QueryPrecedenceInput", + "RecursiveShapesInputOutputNested1", + "RecursiveShapesInputOutputNested2", + "RecursiveShapesRequest", + "RecursiveShapesResponse", + "ServiceError", + "SimpleScalarPropertiesRequest", + "SimpleScalarPropertiesResponse", + "StringEnum", + "StringPayloadInput", + "StructureListMember", + "TimestampFormatHeadersIO", + "UnionPayload", + "UnionPayloadGreeting", + "UnionPayloadUnknown", + "XmlAttributesInMiddlePayloadRequest", + "XmlAttributesInMiddlePayloadResponse", + "XmlAttributesInMiddleRequest", + "XmlAttributesInMiddleResponse", + "XmlAttributesOnPayloadRequest", + "XmlAttributesOnPayloadResponse", + "XmlAttributesPayloadRequest", + "XmlAttributesPayloadResponse", + "XmlAttributesRequest", + "XmlAttributesResponse", + "XmlBlobsRequest", + "XmlBlobsResponse", + "XmlEmptyBlobsRequest", + "XmlEmptyBlobsResponse", + "XmlEmptyListsRequest", + "XmlEmptyListsResponse", + "XmlEmptyMapsRequest", + "XmlEmptyMapsResponse", + "XmlEmptyStringsRequest", + "XmlEmptyStringsResponse", + "XmlEnumsRequest", + "XmlEnumsResponse", + "XmlIntEnumsRequest", + "XmlIntEnumsResponse", + "XmlListsRequest", + "XmlListsResponse", + "XmlMapWithXmlNamespaceRequest", + "XmlMapWithXmlNamespaceResponse", + "XmlMapsRequest", + "XmlMapsResponse", + "XmlMapsXmlNameRequest", + "XmlMapsXmlNameResponse", + "XmlNamespaceNested", + "XmlNamespacesRequest", + "XmlNamespacesResponse", + "XmlNestedUnionStruct", + "XmlTimestampsRequest", + "XmlTimestampsResponse", + "XmlUnionShape", + "XmlUnionShapeBooleanValue", + "XmlUnionShapeByteValue", + "XmlUnionShapeDoubleValue", + "XmlUnionShapeFloatValue", + "XmlUnionShapeIntegerValue", + "XmlUnionShapeLongValue", + "XmlUnionShapeShortValue", + "XmlUnionShapeStringValue", + "XmlUnionShapeStructValue", + "XmlUnionShapeUnionValue", + "XmlUnionShapeUnknown", + "XmlUnionsRequest", + "XmlUnionsResponse", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class AllQueryStringTypesInput(_SerdeShape): + "Dataclass for AllQueryStringTypesInput structure." + + query_string: str | None = ... + query_string_list: list[str] | None = ... + query_string_set: list[str] | None = ... + query_byte: int | None = ... + query_short: int | None = ... + query_integer: int | None = ... + query_integer_list: list[int] | None = ... + query_integer_set: list[int] | None = ... + query_long: int | None = ... + query_float: float | None = ... + query_double: float | None = ... + query_double_list: list[float] | None = ... + query_boolean: bool | None = ... + query_boolean_list: list[bool] | None = ... + query_timestamp: datetime | None = ... + query_timestamp_list: list[datetime] | None = ... + query_enum: str | None = ... + query_enum_list: list[str] | None = ... + query_integer_enum: int | None = ... + query_integer_enum_list: list[int] | None = ... + query_params_map_of_strings: dict[str, str] | None = ... + +@dataclass(kw_only=True) +class BodyWithXmlNameInputOutput(_SerdeShape): + "Dataclass for BodyWithXmlNameInputOutput structure." + + nested: PayloadWithXmlName | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ComplexError(ServiceError, _SerdeShape): + "This error is thrown when a request is invalid." + + header: str | None = ... + top_level: str | None = ... + nested: ComplexNestedErrorData | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ComplexNestedErrorData(_SerdeShape): + "Dataclass for ComplexNestedErrorData structure." + + foo: str | None = ... + +@dataclass(kw_only=True) +class ConstantAndVariableQueryStringInput(_SerdeShape): + "Dataclass for ConstantAndVariableQueryStringInput structure." + + baz: str | None = ... + maybe_set: str | None = ... + +@dataclass(kw_only=True) +class ConstantQueryStringInput(_SerdeShape): + "Dataclass for ConstantQueryStringInput structure." + + hello: str | None = ... + +@dataclass(kw_only=True) +class ContentTypeParametersInput(_SerdeShape): + "Dataclass for ContentTypeParametersInput structure." + + value: int | None = ... + +@dataclass(kw_only=True) +class ContentTypeParametersOutput(_SerdeShape): + "Dataclass for ContentTypeParametersOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class DatetimeOffsetsOutput(_SerdeShape): + "Dataclass for DatetimeOffsetsOutput structure." + + datetime_: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class EmptyInputAndEmptyOutputInput(_SerdeShape): + "Dataclass for EmptyInputAndEmptyOutputInput structure." + +@dataclass(kw_only=True) +class EmptyInputAndEmptyOutputOutput(_SerdeShape): + "Dataclass for EmptyInputAndEmptyOutputOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class EndpointWithHostLabelOperationRequest(_SerdeShape): + "Dataclass for EndpointWithHostLabelOperationRequest structure." + + label: str | None = ... + +@dataclass(kw_only=True) +class EnumPayloadInput(_SerdeShape): + "Dataclass for EnumPayloadInput structure." + + payload: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FlattenedXmlMapRequest(_SerdeShape): + "Dataclass for FlattenedXmlMapRequest structure." + + my_map: dict[str, str] | None = ... + +@dataclass(kw_only=True) +class FlattenedXmlMapResponse(_SerdeShape): + "Dataclass for FlattenedXmlMapResponse structure." + + my_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FlattenedXmlMapWithXmlNameRequest(_SerdeShape): + "Dataclass for FlattenedXmlMapWithXmlNameRequest structure." + + my_map: dict[str, str] | None = ... + +@dataclass(kw_only=True) +class FlattenedXmlMapWithXmlNameResponse(_SerdeShape): + "Dataclass for FlattenedXmlMapWithXmlNameResponse structure." + + my_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FlattenedXmlMapWithXmlNamespaceOutput(_SerdeShape): + "Dataclass for FlattenedXmlMapWithXmlNamespaceOutput structure." + + my_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FractionalSecondsOutput(_SerdeShape): + "Dataclass for FractionalSecondsOutput structure." + + datetime_: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class GreetingWithErrorsOutput(_SerdeShape): + "Dataclass for GreetingWithErrorsOutput structure." + + greeting: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HostLabelHeaderInput(_SerdeShape): + "Dataclass for HostLabelHeaderInput structure." + + account_id: str | None = ... + +@dataclass(kw_only=True) +class HttpEmptyPrefixHeadersInput(_SerdeShape): + "Dataclass for HttpEmptyPrefixHeadersInput structure." + + prefix_headers: dict[str, str] | None = ... + specific_header: str | None = ... + +@dataclass(kw_only=True) +class HttpEmptyPrefixHeadersOutput(_SerdeShape): + "Dataclass for HttpEmptyPrefixHeadersOutput structure." + + prefix_headers: dict[str, str] | None = ... + specific_header: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPayloadTraitsInputOutput(_SerdeShape): + "Dataclass for HttpPayloadTraitsInputOutput structure." + + foo: str | None = ... + blob: bytes | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPayloadTraitsWithMediaTypeInputOutput(_SerdeShape): + "Dataclass for HttpPayloadTraitsWithMediaTypeInputOutput structure." + + foo: str | None = ... + blob: bytes | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPayloadWithMemberXmlNameInputOutput(_SerdeShape): + "Dataclass for HttpPayloadWithMemberXmlNameInputOutput structure." + + nested: PayloadWithXmlName | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPayloadWithStructureInputOutput(_SerdeShape): + "Dataclass for HttpPayloadWithStructureInputOutput structure." + + nested: NestedPayload | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPayloadWithUnionInputOutput(_SerdeShape): + "Dataclass for HttpPayloadWithUnionInputOutput structure." + + nested: UnionPayload | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPayloadWithXmlNameInputOutput(_SerdeShape): + "Dataclass for HttpPayloadWithXmlNameInputOutput structure." + + nested: PayloadWithXmlName | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPayloadWithXmlNamespaceAndPrefixInputOutput(_SerdeShape): + "Dataclass for HttpPayloadWithXmlNamespaceAndPrefixInputOutput structure." + + nested: PayloadWithXmlNamespaceAndPrefix | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPayloadWithXmlNamespaceInputOutput(_SerdeShape): + "Dataclass for HttpPayloadWithXmlNamespaceInputOutput structure." + + nested: PayloadWithXmlNamespace | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpPrefixHeadersInputOutput(_SerdeShape): + "Dataclass for HttpPrefixHeadersInputOutput structure." + + foo: str | None = ... + foo_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class HttpRequestWithFloatLabelsInput(_SerdeShape): + "Dataclass for HttpRequestWithFloatLabelsInput structure." + + float_: float | None = ... + double: float | None = ... + +@dataclass(kw_only=True) +class HttpRequestWithGreedyLabelInPathInput(_SerdeShape): + "Dataclass for HttpRequestWithGreedyLabelInPathInput structure." + + foo: str | None = ... + baz: str | None = ... + +@dataclass(kw_only=True) +class HttpRequestWithLabelsAndTimestampFormatInput(_SerdeShape): + "Dataclass for HttpRequestWithLabelsAndTimestampFormatInput structure." + + member_epoch_seconds: datetime | None = ... + member_http_date: datetime | None = ... + member_date_time: datetime | None = ... + default_format: datetime | None = ... + target_epoch_seconds: datetime | None = ... + target_http_date: datetime | None = ... + target_date_time: datetime | None = ... + +@dataclass(kw_only=True) +class HttpRequestWithLabelsInput(_SerdeShape): + "Dataclass for HttpRequestWithLabelsInput structure." + + string: str | None = ... + short: int | None = ... + integer: int | None = ... + long: int | None = ... + float_: float | None = ... + double: float | None = ... + boolean: bool | None = ... + "Serialized in the path as true or false." + timestamp: datetime | None = ... + """ + Note that this member has no format, so it's serialized as an RFC 3399 + date-time. + """ + +@dataclass(kw_only=True) +class HttpResponseCodeOutput(_SerdeShape): + "Dataclass for HttpResponseCodeOutput structure." + + status: int | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class IgnoreQueryParamsInResponseOutput(_SerdeShape): + "Dataclass for IgnoreQueryParamsInResponseOutput structure." + + baz: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class InputAndOutputWithHeadersIO(_SerdeShape): + "Dataclass for InputAndOutputWithHeadersIO structure." + + header_string: str | None = ... + header_byte: int | None = ... + header_short: int | None = ... + header_integer: int | None = ... + header_long: int | None = ... + header_float: float | None = ... + header_double: float | None = ... + header_true_bool: bool | None = ... + header_false_bool: bool | None = ... + header_string_list: list[str] | None = ... + header_string_set: list[str] | None = ... + header_integer_list: list[int] | None = ... + header_boolean_list: list[bool] | None = ... + header_timestamp_list: list[datetime] | None = ... + header_enum: str | None = ... + header_enum_list: list[str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class InvalidGreeting(ServiceError, _SerdeShape): + "This error is thrown when an invalid greeting value is provided." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class NestedPayload(_SerdeShape): + "Dataclass for NestedPayload structure." + + greeting: str | None = ... + name: str | None = ... + +@dataclass(kw_only=True) +class NestedXmlMapWithXmlNameRequest(_SerdeShape): + "Dataclass for NestedXmlMapWithXmlNameRequest structure." + + nested_xml_map_with_xml_name_map: dict[str, dict[str, str]] | None = ... + +@dataclass(kw_only=True) +class NestedXmlMapWithXmlNameResponse(_SerdeShape): + "Dataclass for NestedXmlMapWithXmlNameResponse structure." + + nested_xml_map_with_xml_name_map: dict[str, dict[str, str]] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class NestedXmlMapsRequest(_SerdeShape): + "Dataclass for NestedXmlMapsRequest structure." + + nested_map: dict[str, dict[str, str]] | None = ... + flat_nested_map: dict[str, dict[str, str]] | None = ... + +@dataclass(kw_only=True) +class NestedXmlMapsResponse(_SerdeShape): + "Dataclass for NestedXmlMapsResponse structure." + + nested_map: dict[str, dict[str, str]] | None = ... + flat_nested_map: dict[str, dict[str, str]] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class NoInputAndOutputOutput(_SerdeShape): + "Dataclass for NoInputAndOutputOutput structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class NullAndEmptyHeadersIO(_SerdeShape): + "Dataclass for NullAndEmptyHeadersIO structure." + + a: str | None = ... + b: str | None = ... + c: list[str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class OmitsNullSerializesEmptyStringInput(_SerdeShape): + "Dataclass for OmitsNullSerializesEmptyStringInput structure." + + null_value: str | None = ... + empty_string: str | None = ... + +@dataclass(kw_only=True) +class PayloadWithXmlName(_SerdeShape): + "Dataclass for PayloadWithXmlName structure." + + name: str | None = ... + +@dataclass(kw_only=True) +class PayloadWithXmlNamespace(_SerdeShape): + "Dataclass for PayloadWithXmlNamespace structure." + + name: str | None = ... + +@dataclass(kw_only=True) +class PayloadWithXmlNamespaceAndPrefix(_SerdeShape): + "Dataclass for PayloadWithXmlNamespaceAndPrefix structure." + + name: str | None = ... + +@dataclass(kw_only=True) +class PutWithContentEncodingInput(_SerdeShape): + "Dataclass for PutWithContentEncodingInput structure." + + encoding: str | None = ... + data: str | None = ... + +@dataclass(kw_only=True) +class QueryIdempotencyTokenAutoFillInput(_SerdeShape): + "Dataclass for QueryIdempotencyTokenAutoFillInput structure." + + token: str | None = ... + "This field is autopopulated if not provided." + +@dataclass(kw_only=True) +class QueryParamsAsStringListMapInput(_SerdeShape): + "Dataclass for QueryParamsAsStringListMapInput structure." + + qux: str | None = ... + foo: dict[str, list[str]] | None = ... + +@dataclass(kw_only=True) +class QueryPrecedenceInput(_SerdeShape): + "Dataclass for QueryPrecedenceInput structure." + + foo: str | None = ... + baz: dict[str, str] | None = ... + +@dataclass(kw_only=True) +class RecursiveShapesInputOutputNested1(_SerdeShape): + "Dataclass for RecursiveShapesInputOutputNested1 structure." + + foo: str | None = ... + nested: RecursiveShapesInputOutputNested2 | None = ... + +@dataclass(kw_only=True) +class RecursiveShapesInputOutputNested2(_SerdeShape): + "Dataclass for RecursiveShapesInputOutputNested2 structure." + + bar: str | None = ... + recursive_member: RecursiveShapesInputOutputNested1 | None = ... + +@dataclass(kw_only=True) +class RecursiveShapesRequest(_SerdeShape): + "Dataclass for RecursiveShapesRequest structure." + + nested: RecursiveShapesInputOutputNested1 | None = ... + +@dataclass(kw_only=True) +class RecursiveShapesResponse(_SerdeShape): + "Dataclass for RecursiveShapesResponse structure." + + nested: RecursiveShapesInputOutputNested1 | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class SimpleScalarPropertiesRequest(_SerdeShape): + "Dataclass for SimpleScalarPropertiesRequest structure." + + foo: str | None = ... + string_value: str | None = ... + true_boolean_value: bool | None = ... + false_boolean_value: bool | None = ... + byte_value: int | None = ... + short_value: int | None = ... + integer_value: int | None = ... + long_value: int | None = ... + float_value: float | None = ... + double_value: float | None = ... + +@dataclass(kw_only=True) +class SimpleScalarPropertiesResponse(_SerdeShape): + "Dataclass for SimpleScalarPropertiesResponse structure." + + foo: str | None = ... + string_value: str | None = ... + true_boolean_value: bool | None = ... + false_boolean_value: bool | None = ... + byte_value: int | None = ... + short_value: int | None = ... + integer_value: int | None = ... + long_value: int | None = ... + float_value: float | None = ... + double_value: float | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +class StringEnum(UnknownEnumMixin, StrEnum): + V = "enumvalue" + +@dataclass(kw_only=True) +class StringPayloadInput(_SerdeShape): + "Dataclass for StringPayloadInput structure." + + payload: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class StructureListMember(_SerdeShape): + "Dataclass for StructureListMember structure." + + a: str | None = ... + b: str | None = ... + +@dataclass(kw_only=True) +class TimestampFormatHeadersIO(_SerdeShape): + "Dataclass for TimestampFormatHeadersIO structure." + + member_epoch_seconds: datetime | None = ... + member_http_date: datetime | None = ... + member_date_time: datetime | None = ... + default_format: datetime | None = ... + target_epoch_seconds: datetime | None = ... + target_http_date: datetime | None = ... + target_date_time: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass +class UnionPayloadGreeting(_SerdeShape): + value: str + +@dataclass +class UnionPayloadUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +UnionPayload = UnionPayloadGreeting | UnionPayloadUnknown + +class _UnionPayloadDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> UnionPayload: ... + +@dataclass(kw_only=True) +class XmlAttributesInMiddlePayloadRequest(_SerdeShape): + "Dataclass for XmlAttributesInMiddlePayloadRequest structure." + + foo: str | None = ... + attr: str | None = ... + baz: str | None = ... + +@dataclass(kw_only=True) +class XmlAttributesInMiddlePayloadResponse(_SerdeShape): + "Dataclass for XmlAttributesInMiddlePayloadResponse structure." + + foo: str | None = ... + attr: str | None = ... + baz: str | None = ... + +@dataclass(kw_only=True) +class XmlAttributesInMiddleRequest(_SerdeShape): + "Dataclass for XmlAttributesInMiddleRequest structure." + + payload: XmlAttributesInMiddlePayloadRequest | None = ... + +@dataclass(kw_only=True) +class XmlAttributesInMiddleResponse(_SerdeShape): + "Dataclass for XmlAttributesInMiddleResponse structure." + + payload: XmlAttributesInMiddlePayloadResponse | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlAttributesOnPayloadRequest(_SerdeShape): + "Dataclass for XmlAttributesOnPayloadRequest structure." + + payload: XmlAttributesPayloadRequest | None = ... + +@dataclass(kw_only=True) +class XmlAttributesOnPayloadResponse(_SerdeShape): + "Dataclass for XmlAttributesOnPayloadResponse structure." + + payload: XmlAttributesPayloadResponse | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlAttributesPayloadRequest(_SerdeShape): + "Dataclass for XmlAttributesPayloadRequest structure." + + foo: str | None = ... + attr: str | None = ... + +@dataclass(kw_only=True) +class XmlAttributesPayloadResponse(_SerdeShape): + "Dataclass for XmlAttributesPayloadResponse structure." + + foo: str | None = ... + attr: str | None = ... + +@dataclass(kw_only=True) +class XmlAttributesRequest(_SerdeShape): + "Dataclass for XmlAttributesRequest structure." + + foo: str | None = ... + attr: str | None = ... + +@dataclass(kw_only=True) +class XmlAttributesResponse(_SerdeShape): + "Dataclass for XmlAttributesResponse structure." + + foo: str | None = ... + attr: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlBlobsRequest(_SerdeShape): + "Dataclass for XmlBlobsRequest structure." + + data: bytes | None = ... + +@dataclass(kw_only=True) +class XmlBlobsResponse(_SerdeShape): + "Dataclass for XmlBlobsResponse structure." + + data: bytes | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlEmptyBlobsRequest(_SerdeShape): + "Dataclass for XmlEmptyBlobsRequest structure." + + data: bytes | None = ... + +@dataclass(kw_only=True) +class XmlEmptyBlobsResponse(_SerdeShape): + "Dataclass for XmlEmptyBlobsResponse structure." + + data: bytes | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlEmptyListsRequest(_SerdeShape): + "Dataclass for XmlEmptyListsRequest structure." + + string_list: list[str] | None = ... + string_set: list[str] | None = ... + integer_list: list[int] | None = ... + boolean_list: list[bool] | None = ... + timestamp_list: list[datetime] | None = ... + enum_list: list[str] | None = ... + int_enum_list: list[int] | None = ... + nested_string_list: list[list[str]] | None = ... + renamed_list_members: list[str] | None = ... + flattened_list: list[str] | None = ... + flattened_list2: list[str] | None = ... + flattened_list_with_member_namespace: list[str] | None = ... + flattened_list_with_namespace: list[str] | None = ... + structure_list: list[StructureListMember] | None = ... + flattened_structure_list: list[StructureListMember] | None = ... + +@dataclass(kw_only=True) +class XmlEmptyListsResponse(_SerdeShape): + "Dataclass for XmlEmptyListsResponse structure." + + string_list: list[str] | None = ... + string_set: list[str] | None = ... + integer_list: list[int] | None = ... + boolean_list: list[bool] | None = ... + timestamp_list: list[datetime] | None = ... + enum_list: list[str] | None = ... + int_enum_list: list[int] | None = ... + nested_string_list: list[list[str]] | None = ... + renamed_list_members: list[str] | None = ... + flattened_list: list[str] | None = ... + flattened_list2: list[str] | None = ... + flattened_list_with_member_namespace: list[str] | None = ... + flattened_list_with_namespace: list[str] | None = ... + structure_list: list[StructureListMember] | None = ... + flattened_structure_list: list[StructureListMember] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlEmptyMapsRequest(_SerdeShape): + "Dataclass for XmlEmptyMapsRequest structure." + + my_map: dict[str, GreetingStruct] | None = ... + +@dataclass(kw_only=True) +class XmlEmptyMapsResponse(_SerdeShape): + "Dataclass for XmlEmptyMapsResponse structure." + + my_map: dict[str, GreetingStruct] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlEmptyStringsRequest(_SerdeShape): + "Dataclass for XmlEmptyStringsRequest structure." + + empty_string: str | None = ... + +@dataclass(kw_only=True) +class XmlEmptyStringsResponse(_SerdeShape): + "Dataclass for XmlEmptyStringsResponse structure." + + empty_string: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlEnumsRequest(_SerdeShape): + "Dataclass for XmlEnumsRequest structure." + + foo_enum1: str | None = ... + foo_enum2: str | None = ... + foo_enum3: str | None = ... + foo_enum_list: list[str] | None = ... + foo_enum_set: list[str] | None = ... + foo_enum_map: dict[str, str] | None = ... + +@dataclass(kw_only=True) +class XmlEnumsResponse(_SerdeShape): + "Dataclass for XmlEnumsResponse structure." + + foo_enum1: str | None = ... + foo_enum2: str | None = ... + foo_enum3: str | None = ... + foo_enum_list: list[str] | None = ... + foo_enum_set: list[str] | None = ... + foo_enum_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlIntEnumsRequest(_SerdeShape): + "Dataclass for XmlIntEnumsRequest structure." + + int_enum1: int | None = ... + int_enum2: int | None = ... + int_enum3: int | None = ... + int_enum_list: list[int] | None = ... + int_enum_set: list[int] | None = ... + int_enum_map: dict[str, int] | None = ... + +@dataclass(kw_only=True) +class XmlIntEnumsResponse(_SerdeShape): + "Dataclass for XmlIntEnumsResponse structure." + + int_enum1: int | None = ... + int_enum2: int | None = ... + int_enum3: int | None = ... + int_enum_list: list[int] | None = ... + int_enum_set: list[int] | None = ... + int_enum_map: dict[str, int] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlListsRequest(_SerdeShape): + "Dataclass for XmlListsRequest structure." + + string_list: list[str] | None = ... + string_set: list[str] | None = ... + integer_list: list[int] | None = ... + boolean_list: list[bool] | None = ... + timestamp_list: list[datetime] | None = ... + enum_list: list[str] | None = ... + int_enum_list: list[int] | None = ... + nested_string_list: list[list[str]] | None = ... + renamed_list_members: list[str] | None = ... + flattened_list: list[str] | None = ... + flattened_list2: list[str] | None = ... + flattened_list_with_member_namespace: list[str] | None = ... + flattened_list_with_namespace: list[str] | None = ... + structure_list: list[StructureListMember] | None = ... + flattened_structure_list: list[StructureListMember] | None = ... + +@dataclass(kw_only=True) +class XmlListsResponse(_SerdeShape): + "Dataclass for XmlListsResponse structure." + + string_list: list[str] | None = ... + string_set: list[str] | None = ... + integer_list: list[int] | None = ... + boolean_list: list[bool] | None = ... + timestamp_list: list[datetime] | None = ... + enum_list: list[str] | None = ... + int_enum_list: list[int] | None = ... + nested_string_list: list[list[str]] | None = ... + renamed_list_members: list[str] | None = ... + flattened_list: list[str] | None = ... + flattened_list2: list[str] | None = ... + flattened_list_with_member_namespace: list[str] | None = ... + flattened_list_with_namespace: list[str] | None = ... + structure_list: list[StructureListMember] | None = ... + flattened_structure_list: list[StructureListMember] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlMapWithXmlNamespaceRequest(_SerdeShape): + "Dataclass for XmlMapWithXmlNamespaceRequest structure." + + my_map: dict[str, str] | None = ... + +@dataclass(kw_only=True) +class XmlMapWithXmlNamespaceResponse(_SerdeShape): + "Dataclass for XmlMapWithXmlNamespaceResponse structure." + + my_map: dict[str, str] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlMapsRequest(_SerdeShape): + "Dataclass for XmlMapsRequest structure." + + my_map: dict[str, GreetingStruct] | None = ... + +@dataclass(kw_only=True) +class XmlMapsResponse(_SerdeShape): + "Dataclass for XmlMapsResponse structure." + + my_map: dict[str, GreetingStruct] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlMapsXmlNameRequest(_SerdeShape): + "Dataclass for XmlMapsXmlNameRequest structure." + + my_map: dict[str, GreetingStruct] | None = ... + +@dataclass(kw_only=True) +class XmlMapsXmlNameResponse(_SerdeShape): + "Dataclass for XmlMapsXmlNameResponse structure." + + my_map: dict[str, GreetingStruct] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlNamespaceNested(_SerdeShape): + "Dataclass for XmlNamespaceNested structure." + + foo: str | None = ... + values: list[str] | None = ... + +@dataclass(kw_only=True) +class XmlNamespacesRequest(_SerdeShape): + "Dataclass for XmlNamespacesRequest structure." + + nested: XmlNamespaceNested | None = ... + +@dataclass(kw_only=True) +class XmlNamespacesResponse(_SerdeShape): + "Dataclass for XmlNamespacesResponse structure." + + nested: XmlNamespaceNested | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class XmlNestedUnionStruct(_SerdeShape): + "Dataclass for XmlNestedUnionStruct structure." + + string_value: str | None = ... + boolean_value: bool | None = ... + byte_value: int | None = ... + short_value: int | None = ... + integer_value: int | None = ... + long_value: int | None = ... + float_value: float | None = ... + double_value: float | None = ... + +@dataclass(kw_only=True) +class XmlTimestampsRequest(_SerdeShape): + "Dataclass for XmlTimestampsRequest structure." + + normal: datetime | None = ... + date_time: datetime | None = ... + date_time_on_target: datetime | None = ... + epoch_seconds: datetime | None = ... + epoch_seconds_on_target: datetime | None = ... + http_date: datetime | None = ... + http_date_on_target: datetime | None = ... + +@dataclass(kw_only=True) +class XmlTimestampsResponse(_SerdeShape): + "Dataclass for XmlTimestampsResponse structure." + + normal: datetime | None = ... + date_time: datetime | None = ... + date_time_on_target: datetime | None = ... + epoch_seconds: datetime | None = ... + epoch_seconds_on_target: datetime | None = ... + http_date: datetime | None = ... + http_date_on_target: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass +class XmlUnionShapeStringValue(_SerdeShape): + value: str + +@dataclass +class XmlUnionShapeBooleanValue(_SerdeShape): + value: bool + +@dataclass +class XmlUnionShapeByteValue(_SerdeShape): + value: int + +@dataclass +class XmlUnionShapeShortValue(_SerdeShape): + value: int + +@dataclass +class XmlUnionShapeIntegerValue(_SerdeShape): + value: int + +@dataclass +class XmlUnionShapeLongValue(_SerdeShape): + value: int + +@dataclass +class XmlUnionShapeFloatValue(_SerdeShape): + value: float + +@dataclass +class XmlUnionShapeDoubleValue(_SerdeShape): + value: float + +@dataclass +class XmlUnionShapeUnionValue(_SerdeShape): + value: XmlUnionShape + +@dataclass +class XmlUnionShapeStructValue(_SerdeShape): + value: XmlNestedUnionStruct + +@dataclass +class XmlUnionShapeUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +XmlUnionShape = ( + XmlUnionShapeStringValue + | XmlUnionShapeBooleanValue + | XmlUnionShapeByteValue + | XmlUnionShapeShortValue + | XmlUnionShapeIntegerValue + | XmlUnionShapeLongValue + | XmlUnionShapeFloatValue + | XmlUnionShapeDoubleValue + | XmlUnionShapeUnionValue + | XmlUnionShapeStructValue + | XmlUnionShapeUnknown +) + +class _XmlUnionShapeDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> XmlUnionShape: ... + +@dataclass(kw_only=True) +class XmlUnionsRequest(_SerdeShape): + "Dataclass for XmlUnionsRequest structure." + + union_value: XmlUnionShape | None = ... + +@dataclass(kw_only=True) +class XmlUnionsResponse(_SerdeShape): + "Dataclass for XmlUnionsResponse structure." + + union_value: XmlUnionShape | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +class FooEnum(UnknownEnumMixin, StrEnum): + FOO = "Foo" + BAZ = "Baz" + BAR = "Bar" + ONE = "1" + ZERO = "0" + +@dataclass(kw_only=True) +class GreetingStruct(_SerdeShape): + "Dataclass for GreetingStruct structure." + + hi: str | None = ... + +class IntegerEnum(UnknownEnumMixin, IntEnum): + A = 1 + B = 2 + C = 3 diff --git a/codegen-output-py/rest-xml/src/restxml/py.typed b/codegen-output-py/rest-xml/src/restxml/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/rpcv2-cbor/.smithy-python-manifest.json b/codegen-output-py/rpcv2-cbor/.smithy-python-manifest.json new file mode 100644 index 000000000..8d93b0b07 --- /dev/null +++ b/codegen-output-py/rpcv2-cbor/.smithy-python-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "README.md": "b856f842a89c64e9cb4ff9a7b27607b66029e73b50597d59041db28f4f2b5180", + "pyproject.toml": "afd2621f580244e35b7284be2b93083a6601b89335ef11f911a7085732b661c5", + "src/rpcv2cbor/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/rpcv2cbor/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/rpcv2cbor/_private/schemas.py": "28b99709dc00fee0b0c0c2fe99b5b2428f0d691f4c312e5e1e4190ac419fc53d", + "src/rpcv2cbor/models.py": "eaa2ad0e465fca15726e933adba4b0a2fe981e0746ffac21de01283136d8c187", + "src/rpcv2cbor/models.pyi": "32f751c92a3ac1bab5aeb4b65ceb733d0d0d7e9a5e25c05a9d32a1001cc4cf33", + "src/rpcv2cbor/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/rpcv2-cbor/README.md b/codegen-output-py/rpcv2-cbor/README.md new file mode 100644 index 000000000..dae1be53d --- /dev/null +++ b/codegen-output-py/rpcv2-cbor/README.md @@ -0,0 +1,5 @@ + + +## rpcv2cbor Types Package + +Native Python types for the rpcv2-cbor projection diff --git a/codegen-output-py/rpcv2-cbor/pyproject.toml b/codegen-output-py/rpcv2-cbor/pyproject.toml new file mode 100644 index 000000000..cce9c494c --- /dev/null +++ b/codegen-output-py/rpcv2-cbor/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "rpcv2cbor" +version = "0.0.1" +description = "Native Python types for the rpcv2-cbor projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "rpcv2cbor"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/rpcv2cbor", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/__init__.py b/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/_private/__init__.py b/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/_private/schemas.py b/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/_private/schemas.py new file mode 100644 index 000000000..6725e363f --- /dev/null +++ b/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/_private/schemas.py @@ -0,0 +1,994 @@ +from types import MappingProxyType + +from smithy_core._schema_compact import StaticSchema + +n0 = "smithy.framework" +_s0 = "ValidationExceptionField" +_s1 = "path" +_s2 = "message" +_s3 = "ValidationExceptionFieldList" +_s4 = "member" +_s5 = "ValidationException" +_s6 = "smithy.api#error" +_s7 = "client" +_s8 = "fieldList" +n1 = "smithy.protocoltests.rpcv2Cbor" +_s9 = "ClientOptionalDefaults" +_s10 = "smithy.api#default" +_s11 = "ComplexNestedErrorData" +_s12 = "Foo" +_s13 = "ComplexError" +_s14 = "TopLevel" +_s15 = "Nested" +_s16 = "TestStringList" +_s17 = "TestStringMap" +_s18 = "key" +_s19 = "value" +_s20 = "TestEnum" +_s21 = "FOO" +_s22 = "smithy.api#enumValue" +_s23 = "BAR" +_s24 = "BAZ" +_s25 = "TestIntEnum" +_s26 = "ONE" +_s27 = "TWO" +_s28 = "Defaults" +_s29 = "defaultString" +_s30 = "hi" +_s31 = "defaultBoolean" +_s32 = "defaultList" +_s33 = "defaultTimestamp" +_s34 = "defaultBlob" +_s35 = "YWJj" +_s36 = "defaultByte" +_s37 = "defaultShort" +_s38 = "defaultInteger" +_s39 = "defaultLong" +_s40 = "defaultFloat" +_s41 = "defaultDouble" +_s42 = "defaultMap" +_s43 = "defaultEnum" +_s44 = "defaultIntEnum" +_s45 = "emptyString" +_s46 = "" +_s47 = "falseBoolean" +_s48 = "emptyBlob" +_s49 = "zeroByte" +_s50 = "zeroShort" +_s51 = "zeroInteger" +_s52 = "zeroLong" +_s53 = "zeroFloat" +_s54 = "zeroDouble" +_s55 = "DenseBooleanMap" +_s56 = "DenseNumberMap" +n2 = "smithy.protocoltests.shared" +_s57 = "StringSet" +_s58 = "DenseSetMap" +_s59 = "DenseStringMap" +_s60 = "GreetingStruct" +_s61 = "DenseStructMap" +_s62 = "EmptyStructure" +_s63 = "smithy.api#input" +_s64 = "smithy.api#output" +_s65 = "Float16Output" +_s66 = "DateTime" +_s67 = "smithy.api#timestampFormat" +_s68 = "date-time" +_s69 = "FractionalSecondsOutput" +_s70 = "datetime" +_s71 = "GreetingWithErrorsOutput" +_s72 = "greeting" +_s73 = "InvalidGreeting" +_s74 = "Message" +_s75 = "OperationWithDefaultsInput" +_s76 = "defaults" +_s77 = "clientOptionalDefaults" +_s78 = "topLevelDefault" +_s79 = "otherTopLevelDefault" +_s80 = "OperationWithDefaultsOutput" +_s81 = "RecursiveShapesInputOutput" +_s82 = "nested" +_s83 = "RpcV2CborDenseMapsInputOutput" +_s84 = "denseStructMap" +_s85 = "denseNumberMap" +_s86 = "denseBooleanMap" +_s87 = "denseStringMap" +_s88 = "denseSetMap" +_s89 = "StringList" +_s90 = "IntegerList" +_s91 = "BooleanList" +_s92 = "TimestampList" +_s93 = "FooEnum" +_s94 = "Baz" +_s95 = "Bar" +_s96 = "1" +_s97 = "ZERO" +_s98 = "0" +_s99 = "FooEnumList" +_s100 = "IntegerEnum" +_s101 = "A" +_s102 = "B" +_s103 = "C" +_s104 = "IntegerEnumList" +_s105 = "NestedStringList" +_s106 = "StructureListMember" +_s107 = "a" +_s108 = "b" +_s109 = "StructureList" +_s110 = "BlobList" +_s111 = "RpcV2CborListInputOutput" +_s112 = "stringList" +_s113 = "stringSet" +_s114 = "integerList" +_s115 = "booleanList" +_s116 = "timestampList" +_s117 = "enumList" +_s118 = "intEnumList" +_s119 = "nestedStringList" +_s120 = "structureList" +_s121 = "blobList" +_s122 = "RpcV2CborNestedUnion" +_s123 = "stringValue" +_s124 = "SparseStructMap" +_s125 = "SparseNumberMap" +_s126 = "SparseBooleanMap" +_s127 = "SparseStringMap" +_s128 = "SparseSetMap" +_s129 = "RpcV2CborSparseMapsInputOutput" +_s130 = "sparseStructMap" +_s131 = "sparseNumberMap" +_s132 = "sparseBooleanMap" +_s133 = "sparseStringMap" +_s134 = "sparseSetMap" +_s135 = "RpcV2CborUnion" +_s136 = "unionValue" +_s137 = "RpcV2CborUnionInputOutput" +_s138 = "contents" +_s139 = "otherValue" +_s140 = "SimpleScalarStructure" +_s141 = "trueBooleanValue" +_s142 = "falseBooleanValue" +_s143 = "byteValue" +_s144 = "doubleValue" +_s145 = "floatValue" +_s146 = "integerValue" +_s147 = "longValue" +_s148 = "shortValue" +_s149 = "blobValue" +_s150 = "SimpleStructure" +_s151 = "SparseStringList" +_s152 = "SparseNullsOperationInputOutput" +_s153 = "sparseStringList" +_s154 = "RecursiveShapesInputOutputNested1" +_s155 = "foo" +_s156 = "RecursiveShapesInputOutputNested2" +_s157 = "bar" +_s158 = "recursiveMember" + +VALIDATION_EXCEPTION_FIELD: StaticSchema = ( + 18, + n0, + _s0, + 0, + ( + _s1, + _s2, + ), + ( + (3, 1), + (3, 1), + ), +) + +VALIDATION_EXCEPTION_FIELD_LIST: StaticSchema = ( + 16, + n0, + _s3, + 0, + (_s4,), + ((VALIDATION_EXCEPTION_FIELD, 0),), +) + +VALIDATION_EXCEPTION: StaticSchema = ( + 18, + n0, + _s5, + {_s6: _s7}, + ( + _s2, + _s8, + ), + ( + (3, 1), + (VALIDATION_EXCEPTION_FIELD_LIST, 0), + ), +) + +CLIENT_OPTIONAL_DEFAULTS: StaticSchema = ( + 18, + n1, + _s9, + 0, + (_s4,), + ((7, {_s10: 0}),), +) + +COMPLEX_NESTED_ERROR_DATA: StaticSchema = ( + 18, + n1, + _s11, + 0, + (_s12,), + ((3, 0),), +) + +COMPLEX_ERROR: StaticSchema = ( + 18, + n1, + _s13, + {_s6: _s7}, + ( + _s14, + _s15, + ), + ( + (3, 0), + (COMPLEX_NESTED_ERROR_DATA, 0), + ), +) + +TEST_STRING_LIST: StaticSchema = ( + 16, + n1, + _s16, + 0, + (_s4,), + ((3, 0),), +) + +TEST_STRING_MAP: StaticSchema = ( + 17, + n1, + _s17, + 0, + ( + _s18, + _s19, + ), + ( + (3, 0), + (3, 0), + ), +) + +TEST_ENUM: StaticSchema = ( + 14, + n1, + _s20, + 0, + ( + _s21, + _s23, + _s24, + ), + ( + (-1, {_s22: _s21}), + (-1, {_s22: _s23}), + (-1, {_s22: _s24}), + ), +) + +TEST_INT_ENUM: StaticSchema = ( + 15, + n1, + _s25, + 0, + ( + _s26, + _s27, + ), + ( + (-1, {_s22: 1}), + (-1, {_s22: 2}), + ), +) + +DEFAULTS: StaticSchema = ( + 18, + n1, + _s28, + 0, + ( + _s29, + _s31, + _s32, + _s33, + _s34, + _s36, + _s37, + _s38, + _s39, + _s40, + _s41, + _s42, + _s43, + _s44, + _s45, + _s47, + _s48, + _s49, + _s50, + _s51, + _s52, + _s53, + _s54, + ), + ( + (3, {_s10: _s30}), + (2, {_s10: True}), + (TEST_STRING_LIST, {_s10: ()}), + (4, {_s10: 0}), + (1, {_s10: _s35}), + (5, {_s10: 1}), + (6, {_s10: 1}), + (7, {_s10: 10}), + (8, {_s10: 100}), + (9, {_s10: 1.0}), + (10, {_s10: 1.0}), + (TEST_STRING_MAP, {_s10: MappingProxyType[str, object]({})}), + (TEST_ENUM, {_s10: _s21}), + (TEST_INT_ENUM, {_s10: 1}), + (3, {_s10: _s46}), + (2, {_s10: False}), + (1, {_s10: _s46}), + (5, {_s10: 0}), + (6, {_s10: 0}), + (7, {_s10: 0}), + (8, {_s10: 0}), + (9, {_s10: 0.0}), + (10, {_s10: 0.0}), + ), +) + +DENSE_BOOLEAN_MAP: StaticSchema = ( + 17, + n1, + _s55, + 0, + ( + _s18, + _s19, + ), + ( + (3, 0), + (2, 0), + ), +) + +DENSE_NUMBER_MAP: StaticSchema = ( + 17, + n1, + _s56, + 0, + ( + _s18, + _s19, + ), + ( + (3, 0), + (7, 0), + ), +) + +STRING_SET: StaticSchema = ( + 16, + n2, + _s57, + 0, + (_s4,), + ((3, 0),), +) + +DENSE_SET_MAP: StaticSchema = ( + 17, + n1, + _s58, + 0, + ( + _s18, + _s19, + ), + ( + (3, 0), + (STRING_SET, 0), + ), +) + +DENSE_STRING_MAP: StaticSchema = ( + 17, + n1, + _s59, + 0, + ( + _s18, + _s19, + ), + ( + (3, 0), + (3, 0), + ), +) + +GREETING_STRUCT: StaticSchema = ( + 18, + n2, + _s60, + 0, + (_s30,), + ((3, 0),), +) + +DENSE_STRUCT_MAP: StaticSchema = ( + 17, + n1, + _s61, + 0, + ( + _s18, + _s19, + ), + ( + (3, 0), + (GREETING_STRUCT, 0), + ), +) + +EMPTY_STRUCTURE: StaticSchema = ( + 18, + n1, + _s62, + {_s63: None, _s64: None}, +) + +FLOAT16_OUTPUT: StaticSchema = ( + 18, + n1, + _s65, + {_s64: None}, + (_s19,), + ((10, 0),), +) + +DATE_TIME: StaticSchema = ( + 4, + n2, + _s66, + {_s67: _s68}, +) + +FRACTIONAL_SECONDS_OUTPUT: StaticSchema = ( + 18, + n1, + _s69, + {_s64: None}, + (_s70,), + ((DATE_TIME, 0),), +) + +GREETING_WITH_ERRORS_OUTPUT: StaticSchema = ( + 18, + n1, + _s71, + {_s64: None}, + (_s72,), + ((3, 0),), +) + +INVALID_GREETING: StaticSchema = ( + 18, + n1, + _s73, + {_s6: _s7}, + (_s74,), + ((3, 0),), +) + +OPERATION_WITH_DEFAULTS_INPUT: StaticSchema = ( + 18, + n1, + _s75, + {_s63: None}, + ( + _s76, + _s77, + _s78, + _s79, + ), + ( + (DEFAULTS, 0), + (CLIENT_OPTIONAL_DEFAULTS, 0), + (3, {_s10: _s30}), + (7, {_s10: 0}), + ), +) + +OPERATION_WITH_DEFAULTS_OUTPUT: StaticSchema = ( + 18, + n1, + _s80, + {_s64: None}, + ( + _s29, + _s31, + _s32, + _s33, + _s34, + _s36, + _s37, + _s38, + _s39, + _s40, + _s41, + _s42, + _s43, + _s44, + _s45, + _s47, + _s48, + _s49, + _s50, + _s51, + _s52, + _s53, + _s54, + ), + ( + (3, {_s10: _s30}), + (2, {_s10: True}), + (TEST_STRING_LIST, {_s10: ()}), + (4, {_s10: 0}), + (1, {_s10: _s35}), + (5, {_s10: 1}), + (6, {_s10: 1}), + (7, {_s10: 10}), + (8, {_s10: 100}), + (9, {_s10: 1.0}), + (10, {_s10: 1.0}), + (TEST_STRING_MAP, {_s10: MappingProxyType[str, object]({})}), + (TEST_ENUM, {_s10: _s21}), + (TEST_INT_ENUM, {_s10: 1}), + (3, {_s10: _s46}), + (2, {_s10: False}), + (1, {_s10: _s46}), + (5, {_s10: 0}), + (6, {_s10: 0}), + (7, {_s10: 0}), + (8, {_s10: 0}), + (9, {_s10: 0.0}), + (10, {_s10: 0.0}), + ), +) + +RECURSIVE_SHAPES_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s81, + {_s63: None, _s64: None}, + (_s82,), + ((lambda: RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1, 0),), +) + +RPC_V2_CBOR_DENSE_MAPS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s83, + {_s63: None, _s64: None}, + ( + _s84, + _s85, + _s86, + _s87, + _s88, + ), + ( + (DENSE_STRUCT_MAP, 0), + (DENSE_NUMBER_MAP, 0), + (DENSE_BOOLEAN_MAP, 0), + (DENSE_STRING_MAP, 0), + (DENSE_SET_MAP, 0), + ), +) + +STRING_LIST: StaticSchema = ( + 16, + n2, + _s89, + 0, + (_s4,), + ((3, 0),), +) + +INTEGER_LIST: StaticSchema = ( + 16, + n2, + _s90, + 0, + (_s4,), + ((7, 0),), +) + +BOOLEAN_LIST: StaticSchema = ( + 16, + n2, + _s91, + 0, + (_s4,), + ((2, 0),), +) + +TIMESTAMP_LIST: StaticSchema = ( + 16, + n2, + _s92, + 0, + (_s4,), + ((4, 0),), +) + +FOO_ENUM: StaticSchema = ( + 14, + n2, + _s93, + 0, + ( + _s21, + _s24, + _s23, + _s26, + _s97, + ), + ( + (-1, {_s22: _s12}), + (-1, {_s22: _s94}), + (-1, {_s22: _s95}), + (-1, {_s22: _s96}), + (-1, {_s22: _s98}), + ), +) + +FOO_ENUM_LIST: StaticSchema = ( + 16, + n2, + _s99, + 0, + (_s4,), + ((FOO_ENUM, 0),), +) + +INTEGER_ENUM: StaticSchema = ( + 15, + n2, + _s100, + 0, + ( + _s101, + _s102, + _s103, + ), + ( + (-1, {_s22: 1}), + (-1, {_s22: 2}), + (-1, {_s22: 3}), + ), +) + +INTEGER_ENUM_LIST: StaticSchema = ( + 16, + n2, + _s104, + 0, + (_s4,), + ((INTEGER_ENUM, 0),), +) + +NESTED_STRING_LIST: StaticSchema = ( + 16, + n2, + _s105, + 0, + (_s4,), + ((STRING_LIST, 0),), +) + +STRUCTURE_LIST_MEMBER: StaticSchema = ( + 18, + n1, + _s106, + 0, + ( + _s107, + _s108, + ), + ( + (3, 0), + (3, 0), + ), +) + +STRUCTURE_LIST: StaticSchema = ( + 16, + n1, + _s109, + 0, + (_s4,), + ((STRUCTURE_LIST_MEMBER, 0),), +) + +BLOB_LIST: StaticSchema = ( + 16, + n2, + _s110, + 0, + (_s4,), + ((1, 0),), +) + +RPC_V2_CBOR_LIST_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s111, + {_s63: None, _s64: None}, + ( + _s112, + _s113, + _s114, + _s115, + _s116, + _s117, + _s118, + _s119, + _s120, + _s121, + ), + ( + (STRING_LIST, 0), + (STRING_SET, 0), + (INTEGER_LIST, 0), + (BOOLEAN_LIST, 0), + (TIMESTAMP_LIST, 0), + (FOO_ENUM_LIST, 0), + (INTEGER_ENUM_LIST, 0), + (NESTED_STRING_LIST, 0), + (STRUCTURE_LIST, 0), + (BLOB_LIST, 0), + ), +) + +RPC_V2_CBOR_NESTED_UNION: StaticSchema = ( + 19, + n1, + _s122, + 0, + (_s123,), + ((3, 0),), +) + +SPARSE_STRUCT_MAP: StaticSchema = ( + 17, + n1, + _s124, + 64, + ( + _s18, + _s19, + ), + ( + (3, 0), + (GREETING_STRUCT, 0), + ), +) + +SPARSE_NUMBER_MAP: StaticSchema = ( + 17, + n1, + _s125, + 64, + ( + _s18, + _s19, + ), + ( + (3, 0), + (7, 0), + ), +) + +SPARSE_BOOLEAN_MAP: StaticSchema = ( + 17, + n1, + _s126, + 64, + ( + _s18, + _s19, + ), + ( + (3, 0), + (2, 0), + ), +) + +SPARSE_STRING_MAP: StaticSchema = ( + 17, + n2, + _s127, + 64, + ( + _s18, + _s19, + ), + ( + (3, 0), + (3, 0), + ), +) + +SPARSE_SET_MAP: StaticSchema = ( + 17, + n1, + _s128, + 64, + ( + _s18, + _s19, + ), + ( + (3, 0), + (STRING_SET, 0), + ), +) + +RPC_V2_CBOR_SPARSE_MAPS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s129, + {_s63: None, _s64: None}, + ( + _s130, + _s131, + _s132, + _s133, + _s134, + ), + ( + (SPARSE_STRUCT_MAP, 0), + (SPARSE_NUMBER_MAP, 0), + (SPARSE_BOOLEAN_MAP, 0), + (SPARSE_STRING_MAP, 0), + (SPARSE_SET_MAP, 0), + ), +) + +RPC_V2_CBOR_UNION: StaticSchema = ( + 19, + n1, + _s135, + 0, + ( + _s123, + _s136, + ), + ( + (3, 0), + (RPC_V2_CBOR_NESTED_UNION, 0), + ), +) + +RPC_V2_CBOR_UNION_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s137, + {_s63: None, _s64: None}, + ( + _s138, + _s139, + ), + ( + (RPC_V2_CBOR_UNION, 0), + (3, 0), + ), +) + +SIMPLE_SCALAR_STRUCTURE: StaticSchema = ( + 18, + n1, + _s140, + {_s63: None, _s64: None}, + ( + _s141, + _s142, + _s143, + _s144, + _s145, + _s146, + _s147, + _s148, + _s123, + _s149, + ), + ( + (2, 0), + (2, 0), + (5, 0), + (10, 0), + (9, 0), + (7, 0), + (8, 0), + (6, 0), + (3, 0), + (1, 0), + ), +) + +SIMPLE_STRUCTURE: StaticSchema = ( + 18, + n1, + _s150, + {_s63: None, _s64: None}, + (_s19,), + ((3, 0),), +) + +SPARSE_STRING_LIST: StaticSchema = ( + 16, + n2, + _s151, + 64, + (_s4,), + ((3, 0),), +) + +SPARSE_NULLS_OPERATION_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s152, + {_s63: None, _s64: None}, + ( + _s153, + _s133, + ), + ( + (SPARSE_STRING_LIST, 0), + (SPARSE_STRING_MAP, 0), + ), +) + +RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1: StaticSchema = ( + 18, + n1, + _s154, + 0, + ( + _s155, + _s82, + ), + ( + (3, 0), + (lambda: RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2, 0), + ), +) + +RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2: StaticSchema = ( + 18, + n1, + _s156, + 0, + ( + _s157, + _s158, + ), + ( + (3, 0), + (RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1, 0), + ), +) diff --git a/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/models.py b/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/models.py new file mode 100644 index 000000000..f14666095 --- /dev/null +++ b/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/models.py @@ -0,0 +1,115 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "ValidationException": "VALIDATION_EXCEPTION", + "ValidationExceptionField": "VALIDATION_EXCEPTION_FIELD", + "ClientOptionalDefaults": "CLIENT_OPTIONAL_DEFAULTS", + "ComplexError": "COMPLEX_ERROR", + "ComplexNestedErrorData": "COMPLEX_NESTED_ERROR_DATA", + "Defaults": "DEFAULTS", + "EmptyStructure": "EMPTY_STRUCTURE", + "Float16Output": "FLOAT16_OUTPUT", + "FractionalSecondsOutput": "FRACTIONAL_SECONDS_OUTPUT", + "GreetingWithErrorsOutput": "GREETING_WITH_ERRORS_OUTPUT", + "InvalidGreeting": "INVALID_GREETING", + "OperationWithDefaultsInput": "OPERATION_WITH_DEFAULTS_INPUT", + "OperationWithDefaultsOutput": "OPERATION_WITH_DEFAULTS_OUTPUT", + "RecursiveShapesInputOutput": "RECURSIVE_SHAPES_INPUT_OUTPUT", + "RecursiveShapesInputOutputNested1": "RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1", + "RecursiveShapesInputOutputNested2": "RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2", + "RpcV2CborDenseMapsInputOutput": "RPC_V2_CBOR_DENSE_MAPS_INPUT_OUTPUT", + "RpcV2CborListInputOutput": "RPC_V2_CBOR_LIST_INPUT_OUTPUT", + "RpcV2CborNestedUnion": "RPC_V2_CBOR_NESTED_UNION", + "RpcV2CborNestedUnionStringValue": "RPC_V2_CBOR_NESTED_UNION", + "RpcV2CborNestedUnionUnknown": "RPC_V2_CBOR_NESTED_UNION", + "RpcV2CborSparseMapsInputOutput": "RPC_V2_CBOR_SPARSE_MAPS_INPUT_OUTPUT", + "RpcV2CborUnion": "RPC_V2_CBOR_UNION", + "RpcV2CborUnionStringValue": "RPC_V2_CBOR_UNION", + "RpcV2CborUnionUnionValue": "RPC_V2_CBOR_UNION", + "RpcV2CborUnionUnknown": "RPC_V2_CBOR_UNION", + "RpcV2CborUnionInputOutput": "RPC_V2_CBOR_UNION_INPUT_OUTPUT", + "SimpleScalarStructure": "SIMPLE_SCALAR_STRUCTURE", + "SimpleStructure": "SIMPLE_STRUCTURE", + "SparseNullsOperationInputOutput": "SPARSE_NULLS_OPERATION_INPUT_OUTPUT", + "StructureListMember": "STRUCTURE_LIST_MEMBER", + "TestEnum": "TEST_ENUM", + "TestIntEnum": "TEST_INT_ENUM", + "FooEnum": "FOO_ENUM", + "GreetingStruct": "GREETING_STRUCT", + "IntegerEnum": "INTEGER_ENUM", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "ClientOptionalDefaults", + "ComplexError", + "ComplexNestedErrorData", + "Defaults", + "EmptyStructure", + "Float16Output", + "FooEnum", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "IntegerEnum", + "InvalidGreeting", + "OperationWithDefaultsInput", + "OperationWithDefaultsOutput", + "RecursiveShapesInputOutput", + "RecursiveShapesInputOutputNested1", + "RecursiveShapesInputOutputNested2", + "RpcV2CborDenseMapsInputOutput", + "RpcV2CborListInputOutput", + "RpcV2CborNestedUnion", + "RpcV2CborSparseMapsInputOutput", + "RpcV2CborUnion", + "RpcV2CborUnionInputOutput", + "SimpleScalarStructure", + "SimpleStructure", + "SparseNullsOperationInputOutput", + "StructureListMember", + "TestEnum", + "TestIntEnum", + "ValidationException", + "ValidationExceptionField", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/models.pyi b/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/models.pyi new file mode 100644 index 000000000..f65ddd3ba --- /dev/null +++ b/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/models.pyi @@ -0,0 +1,505 @@ +from dataclasses import dataclass +from datetime import datetime +from enum import IntEnum, StrEnum +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.serializers import ShapeSerializer +from smithy_core.types import UnknownEnumMixin + +__all__ = [ + "ClientOptionalDefaults", + "ComplexError", + "ComplexNestedErrorData", + "Defaults", + "EmptyStructure", + "Float16Output", + "FooEnum", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "IntegerEnum", + "InvalidGreeting", + "OperationWithDefaultsInput", + "OperationWithDefaultsOutput", + "RecursiveShapesInputOutput", + "RecursiveShapesInputOutputNested1", + "RecursiveShapesInputOutputNested2", + "RpcV2CborDenseMapsInputOutput", + "RpcV2CborListInputOutput", + "RpcV2CborNestedUnion", + "RpcV2CborNestedUnionStringValue", + "RpcV2CborNestedUnionUnknown", + "RpcV2CborSparseMapsInputOutput", + "RpcV2CborUnion", + "RpcV2CborUnionInputOutput", + "RpcV2CborUnionStringValue", + "RpcV2CborUnionUnionValue", + "RpcV2CborUnionUnknown", + "ServiceError", + "SimpleScalarStructure", + "SimpleStructure", + "SparseNullsOperationInputOutput", + "StructureListMember", + "TestEnum", + "TestIntEnum", + "ValidationException", + "ValidationExceptionField", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class ValidationException(ServiceError, _SerdeShape): + """ + 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. + """ + + field_list: list[ValidationExceptionField] | None = ... + """ + 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. + """ + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ValidationExceptionField(_SerdeShape): + "Describes one specific validation failure for an input member." + + path: str + """ + A JSONPointer expression to the structure member whose value failed to + satisfy the modeled constraints. + """ + message: str + "A detailed description of the validation failure." + +@dataclass(kw_only=True) +class ClientOptionalDefaults(_SerdeShape): + "Dataclass for ClientOptionalDefaults structure." + + member: int | None = ... + +@dataclass(kw_only=True) +class ComplexError(ServiceError, _SerdeShape): + "This error is thrown when a request is invalid." + + top_level: str | None = ... + nested: ComplexNestedErrorData | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ComplexNestedErrorData(_SerdeShape): + "Dataclass for ComplexNestedErrorData structure." + + foo: str | None = ... + +@dataclass(kw_only=True) +class Defaults(_SerdeShape): + "Dataclass for Defaults structure." + + default_string: str | None = ... + default_boolean: bool | None = ... + default_list: list[str] | None = ... + default_timestamp: datetime | None = ... + default_blob: bytes | None = ... + default_byte: int | None = ... + default_short: int | None = ... + default_integer: int | None = ... + default_long: int | None = ... + default_float: float | None = ... + default_double: float | None = ... + default_map: dict[str, str] | None = ... + default_enum: str | None = ... + default_int_enum: int | None = ... + empty_string: str | None = ... + false_boolean: bool | None = ... + empty_blob: bytes | None = ... + zero_byte: int | None = ... + zero_short: int | None = ... + zero_integer: int | None = ... + zero_long: int | None = ... + zero_float: float | None = ... + zero_double: float | None = ... + +@dataclass(kw_only=True) +class EmptyStructure(_SerdeShape): + "Dataclass for EmptyStructure structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class Float16Output(_SerdeShape): + "Dataclass for Float16Output structure." + + value: float | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FractionalSecondsOutput(_SerdeShape): + "Dataclass for FractionalSecondsOutput structure." + + datetime_: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class GreetingWithErrorsOutput(_SerdeShape): + "Dataclass for GreetingWithErrorsOutput structure." + + greeting: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class InvalidGreeting(ServiceError, _SerdeShape): + "This error is thrown when an invalid greeting value is provided." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class OperationWithDefaultsInput(_SerdeShape): + "Dataclass for OperationWithDefaultsInput structure." + + defaults: Defaults | None = ... + client_optional_defaults: ClientOptionalDefaults | None = ... + top_level_default: str | None = ... + other_top_level_default: int | None = ... + +@dataclass(kw_only=True) +class OperationWithDefaultsOutput(_SerdeShape): + "Dataclass for OperationWithDefaultsOutput structure." + + default_string: str | None = ... + default_boolean: bool | None = ... + default_list: list[str] | None = ... + default_timestamp: datetime | None = ... + default_blob: bytes | None = ... + default_byte: int | None = ... + default_short: int | None = ... + default_integer: int | None = ... + default_long: int | None = ... + default_float: float | None = ... + default_double: float | None = ... + default_map: dict[str, str] | None = ... + default_enum: str | None = ... + default_int_enum: int | None = ... + empty_string: str | None = ... + false_boolean: bool | None = ... + empty_blob: bytes | None = ... + zero_byte: int | None = ... + zero_short: int | None = ... + zero_integer: int | None = ... + zero_long: int | None = ... + zero_float: float | None = ... + zero_double: float | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class RecursiveShapesInputOutput(_SerdeShape): + "Dataclass for RecursiveShapesInputOutput structure." + + nested: RecursiveShapesInputOutputNested1 | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class RecursiveShapesInputOutputNested1(_SerdeShape): + "Dataclass for RecursiveShapesInputOutputNested1 structure." + + foo: str | None = ... + nested: RecursiveShapesInputOutputNested2 | None = ... + +@dataclass(kw_only=True) +class RecursiveShapesInputOutputNested2(_SerdeShape): + "Dataclass for RecursiveShapesInputOutputNested2 structure." + + bar: str | None = ... + recursive_member: RecursiveShapesInputOutputNested1 | None = ... + +@dataclass(kw_only=True) +class RpcV2CborDenseMapsInputOutput(_SerdeShape): + "Dataclass for RpcV2CborDenseMapsInputOutput structure." + + dense_struct_map: dict[str, GreetingStruct] | None = ... + dense_number_map: dict[str, int] | None = ... + dense_boolean_map: dict[str, bool] | None = ... + dense_string_map: dict[str, str] | None = ... + dense_set_map: dict[str, list[str]] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class RpcV2CborListInputOutput(_SerdeShape): + "Dataclass for RpcV2CborListInputOutput structure." + + string_list: list[str] | None = ... + string_set: list[str] | None = ... + integer_list: list[int] | None = ... + boolean_list: list[bool] | None = ... + timestamp_list: list[datetime] | None = ... + enum_list: list[str] | None = ... + int_enum_list: list[int] | None = ... + nested_string_list: list[list[str]] | None = ... + structure_list: list[StructureListMember] | None = ... + blob_list: list[bytes] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass +class RpcV2CborNestedUnionStringValue(_SerdeShape): + value: str + +@dataclass +class RpcV2CborNestedUnionUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +RpcV2CborNestedUnion = RpcV2CborNestedUnionStringValue | RpcV2CborNestedUnionUnknown + +class _RpcV2CborNestedUnionDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> RpcV2CborNestedUnion: ... + +@dataclass(kw_only=True) +class RpcV2CborSparseMapsInputOutput(_SerdeShape): + "Dataclass for RpcV2CborSparseMapsInputOutput structure." + + sparse_struct_map: dict[str, GreetingStruct | None] | None = ... + sparse_number_map: dict[str, int | None] | None = ... + sparse_boolean_map: dict[str, bool | None] | None = ... + sparse_string_map: dict[str, str | None] | None = ... + sparse_set_map: dict[str, list[str] | None] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass +class RpcV2CborUnionStringValue(_SerdeShape): + value: str + +@dataclass +class RpcV2CborUnionUnionValue(_SerdeShape): + value: RpcV2CborNestedUnion + +@dataclass +class RpcV2CborUnionUnknown(_SerdeShape): + """ + Represents an unknown variant. + + If you receive this value, you will need to update your library to + receive the parsed value. + + This value may not be deliberately sent. + """ + + tag: str + +RpcV2CborUnion = ( + RpcV2CborUnionStringValue | RpcV2CborUnionUnionValue | RpcV2CborUnionUnknown +) + +class _RpcV2CborUnionDeserializer: + def deserialize(self, deserializer: ShapeDeserializer) -> RpcV2CborUnion: ... + +@dataclass(kw_only=True) +class RpcV2CborUnionInputOutput(_SerdeShape): + "Dataclass for RpcV2CborUnionInputOutput structure." + + contents: RpcV2CborUnion | None = ... + other_value: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class SimpleScalarStructure(_SerdeShape): + "Dataclass for SimpleScalarStructure structure." + + true_boolean_value: bool | None = ... + false_boolean_value: bool | None = ... + byte_value: int | None = ... + double_value: float | None = ... + float_value: float | None = ... + integer_value: int | None = ... + long_value: int | None = ... + short_value: int | None = ... + string_value: str | None = ... + blob_value: bytes | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class SimpleStructure(_SerdeShape): + "Dataclass for SimpleStructure structure." + + value: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class SparseNullsOperationInputOutput(_SerdeShape): + "Dataclass for SparseNullsOperationInputOutput structure." + + sparse_string_list: list[str | None] | None = ... + sparse_string_map: dict[str, str | None] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class StructureListMember(_SerdeShape): + "Dataclass for StructureListMember structure." + + a: str | None = ... + b: str | None = ... + +class TestEnum(UnknownEnumMixin, StrEnum): + FOO = "FOO" + BAR = "BAR" + BAZ = "BAZ" + +class TestIntEnum(UnknownEnumMixin, IntEnum): + ONE = 1 + TWO = 2 + +class FooEnum(UnknownEnumMixin, StrEnum): + FOO = "Foo" + BAZ = "Baz" + BAR = "Bar" + ONE = "1" + ZERO = "0" + +@dataclass(kw_only=True) +class GreetingStruct(_SerdeShape): + "Dataclass for GreetingStruct structure." + + hi: str | None = ... + +class IntegerEnum(UnknownEnumMixin, IntEnum): + A = 1 + B = 2 + C = 3 diff --git a/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/py.typed b/codegen-output-py/rpcv2-cbor/src/rpcv2cbor/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/rpcv2-json/.smithy-python-manifest.json b/codegen-output-py/rpcv2-json/.smithy-python-manifest.json new file mode 100644 index 000000000..a1dc31c61 --- /dev/null +++ b/codegen-output-py/rpcv2-json/.smithy-python-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "README.md": "94b31362a2e131ea489a05430091f33d2320726f788873fd27452809a3d6aa6e", + "pyproject.toml": "640aeb917e3ccd802def14ecc7faad3f450bdb58b9f9f878d667f6329e4a5385", + "src/rpcv2json/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", + "src/rpcv2json/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/rpcv2json/_private/schemas.py": "4b6f857c9ca2c01c266c4c4450efbe90d61f38c6eea485ac27c64c6d77b3a673", + "src/rpcv2json/models.py": "9bee571614e1f16c21be9de13c3681bb6c13c4a79aaf74c9e9f6c8bc357c8f49", + "src/rpcv2json/models.pyi": "3e69f95d47602c24b54823d168672865160932ac836218efc151a0653105b24c", + "src/rpcv2json/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "version": 1 +} diff --git a/codegen-output-py/rpcv2-json/README.md b/codegen-output-py/rpcv2-json/README.md new file mode 100644 index 000000000..861e65ceb --- /dev/null +++ b/codegen-output-py/rpcv2-json/README.md @@ -0,0 +1,5 @@ + + +## rpcv2json Types Package + +Native Python types for the rpcv2-json projection diff --git a/codegen-output-py/rpcv2-json/pyproject.toml b/codegen-output-py/rpcv2-json/pyproject.toml new file mode 100644 index 000000000..8c488f825 --- /dev/null +++ b/codegen-output-py/rpcv2-json/pyproject.toml @@ -0,0 +1,36 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "rpcv2json" +version = "0.0.1" +description = "Native Python types for the rpcv2-json projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "rpcv2json"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-core~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/rpcv2json", +] + +[tool.pyright] +typeCheckingMode = "strict" + +[tool.ruff] +target-version = "py312" + +[tool.ruff.lint] +ignore = ["F841"] + +[tool.ruff.format] +skip-magic-trailing-comma = true diff --git a/codegen-output-py/rpcv2-json/src/rpcv2json/__init__.py b/codegen-output-py/rpcv2-json/src/rpcv2json/__init__.py new file mode 100644 index 000000000..9d177767f --- /dev/null +++ b/codegen-output-py/rpcv2-json/src/rpcv2json/__init__.py @@ -0,0 +1 @@ +__version__: str = "0.0.1" diff --git a/codegen-output-py/rpcv2-json/src/rpcv2json/_private/__init__.py b/codegen-output-py/rpcv2-json/src/rpcv2json/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/rpcv2-json/src/rpcv2json/_private/schemas.py b/codegen-output-py/rpcv2-json/src/rpcv2json/_private/schemas.py new file mode 100644 index 000000000..d6c77628a --- /dev/null +++ b/codegen-output-py/rpcv2-json/src/rpcv2json/_private/schemas.py @@ -0,0 +1,1001 @@ +from types import MappingProxyType + +from smithy_core._schema_compact import StaticSchema + +n0 = "smithy.framework" +_s0 = "ValidationExceptionField" +_s1 = "path" +_s2 = "message" +_s3 = "ValidationExceptionFieldList" +_s4 = "member" +_s5 = "ValidationException" +_s6 = "smithy.api#error" +_s7 = "client" +_s8 = "fieldList" +n1 = "smithy.protocoltests.rpcv2Json" +_s9 = "BigDecimalStructure" +_s10 = "smithy.api#input" +_s11 = "smithy.api#output" +_s12 = "value" +_s13 = "BigIntegerStructure" +_s14 = "ClientOptionalDefaults" +_s15 = "smithy.api#default" +_s16 = "ComplexNestedErrorData" +_s17 = "Foo" +_s18 = "ComplexError" +_s19 = "TopLevel" +_s20 = "Nested" +_s21 = "TestStringList" +_s22 = "TestStringMap" +_s23 = "key" +_s24 = "TestEnum" +_s25 = "FOO" +_s26 = "smithy.api#enumValue" +_s27 = "BAR" +_s28 = "BAZ" +_s29 = "TestIntEnum" +_s30 = "ONE" +_s31 = "TWO" +_s32 = "Defaults" +_s33 = "defaultString" +_s34 = "hi" +_s35 = "defaultBoolean" +_s36 = "defaultList" +_s37 = "defaultTimestamp" +_s38 = "defaultBlob" +_s39 = "YWJj" +_s40 = "defaultByte" +_s41 = "defaultShort" +_s42 = "defaultInteger" +_s43 = "defaultLong" +_s44 = "defaultFloat" +_s45 = "defaultDouble" +_s46 = "defaultMap" +_s47 = "defaultEnum" +_s48 = "defaultIntEnum" +_s49 = "emptyString" +_s50 = "" +_s51 = "falseBoolean" +_s52 = "emptyBlob" +_s53 = "zeroByte" +_s54 = "zeroShort" +_s55 = "zeroInteger" +_s56 = "zeroLong" +_s57 = "zeroFloat" +_s58 = "zeroDouble" +_s59 = "DenseBooleanMap" +_s60 = "DenseNumberMap" +n2 = "smithy.protocoltests.shared" +_s61 = "StringSet" +_s62 = "DenseSetMap" +_s63 = "DenseStringMap" +_s64 = "GreetingStruct" +_s65 = "DenseStructMap" +_s66 = "EmptyStructure" +_s67 = "FractionalSecondsOutput" +_s68 = "datetime" +_s69 = "GreetingWithErrorsOutput" +_s70 = "greeting" +_s71 = "InvalidGreeting" +_s72 = "Message" +_s73 = "OperationWithDefaultsInput" +_s74 = "defaults" +_s75 = "clientOptionalDefaults" +_s76 = "topLevelDefault" +_s77 = "otherTopLevelDefault" +_s78 = "OperationWithDefaultsOutput" +_s79 = "RecursiveShapesInputOutput" +_s80 = "nested" +_s81 = "RpcV2JsonDenseMapsInputOutput" +_s82 = "denseStructMap" +_s83 = "denseNumberMap" +_s84 = "denseBooleanMap" +_s85 = "denseStringMap" +_s86 = "denseSetMap" +_s87 = "StringList" +_s88 = "IntegerList" +_s89 = "BooleanList" +_s90 = "TimestampList" +_s91 = "FooEnum" +_s92 = "Baz" +_s93 = "Bar" +_s94 = "1" +_s95 = "ZERO" +_s96 = "0" +_s97 = "FooEnumList" +_s98 = "IntegerEnum" +_s99 = "A" +_s100 = "B" +_s101 = "C" +_s102 = "IntegerEnumList" +_s103 = "NestedStringList" +_s104 = "StructureListMember" +_s105 = "a" +_s106 = "b" +_s107 = "StructureList" +_s108 = "BlobList" +_s109 = "RpcV2JsonListInputOutput" +_s110 = "stringList" +_s111 = "stringSet" +_s112 = "integerList" +_s113 = "booleanList" +_s114 = "timestampList" +_s115 = "enumList" +_s116 = "intEnumList" +_s117 = "nestedStringList" +_s118 = "structureList" +_s119 = "blobList" +_s120 = "SparseStructMap" +_s121 = "SparseNumberMap" +_s122 = "SparseBooleanMap" +_s123 = "SparseStringMap" +_s124 = "SparseSetMap" +_s125 = "RpcV2JsonSparseMapsInputOutput" +_s126 = "sparseStructMap" +_s127 = "sparseNumberMap" +_s128 = "sparseBooleanMap" +_s129 = "sparseStringMap" +_s130 = "sparseSetMap" +_s131 = "SimpleScalarStructure" +_s132 = "trueBooleanValue" +_s133 = "falseBooleanValue" +_s134 = "byteValue" +_s135 = "doubleValue" +_s136 = "floatValue" +_s137 = "integerValue" +_s138 = "longValue" +_s139 = "shortValue" +_s140 = "stringValue" +_s141 = "blobValue" +_s142 = "SimpleStructure" +_s143 = "SparseStringList" +_s144 = "SparseNullsOperationInputOutput" +_s145 = "sparseStringList" +_s146 = "DateTime" +_s147 = "smithy.api#timestampFormat" +_s148 = "date-time" +_s149 = "HttpDate" +_s150 = "http-date" +_s151 = "EpochSeconds" +_s152 = "epoch-seconds" +_s153 = "TimestampFormatIgnoredIO" +_s154 = "dateTime" +_s155 = "httpDate" +_s156 = "epochSeconds" +_s157 = "normal" +_s158 = "RecursiveShapesInputOutputNested1" +_s159 = "foo" +_s160 = "RecursiveShapesInputOutputNested2" +_s161 = "bar" +_s162 = "recursiveMember" + +VALIDATION_EXCEPTION_FIELD: StaticSchema = ( + 18, + n0, + _s0, + 0, + ( + _s1, + _s2, + ), + ( + (3, 1), + (3, 1), + ), +) + +VALIDATION_EXCEPTION_FIELD_LIST: StaticSchema = ( + 16, + n0, + _s3, + 0, + (_s4,), + ((VALIDATION_EXCEPTION_FIELD, 0),), +) + +VALIDATION_EXCEPTION: StaticSchema = ( + 18, + n0, + _s5, + {_s6: _s7}, + ( + _s2, + _s8, + ), + ( + (3, 1), + (VALIDATION_EXCEPTION_FIELD_LIST, 0), + ), +) + +BIG_DECIMAL_STRUCTURE: StaticSchema = ( + 18, + n1, + _s9, + {_s10: None, _s11: None}, + (_s12,), + ((12, 0),), +) + +BIG_INTEGER_STRUCTURE: StaticSchema = ( + 18, + n1, + _s13, + {_s10: None, _s11: None}, + (_s12,), + ((11, 0),), +) + +CLIENT_OPTIONAL_DEFAULTS: StaticSchema = ( + 18, + n1, + _s14, + 0, + (_s4,), + ((7, {_s15: 0}),), +) + +COMPLEX_NESTED_ERROR_DATA: StaticSchema = ( + 18, + n1, + _s16, + 0, + (_s17,), + ((3, 0),), +) + +COMPLEX_ERROR: StaticSchema = ( + 18, + n1, + _s18, + {_s6: _s7}, + ( + _s19, + _s20, + ), + ( + (3, 0), + (COMPLEX_NESTED_ERROR_DATA, 0), + ), +) + +TEST_STRING_LIST: StaticSchema = ( + 16, + n1, + _s21, + 0, + (_s4,), + ((3, 0),), +) + +TEST_STRING_MAP: StaticSchema = ( + 17, + n1, + _s22, + 0, + ( + _s23, + _s12, + ), + ( + (3, 0), + (3, 0), + ), +) + +TEST_ENUM: StaticSchema = ( + 14, + n1, + _s24, + 0, + ( + _s25, + _s27, + _s28, + ), + ( + (-1, {_s26: _s25}), + (-1, {_s26: _s27}), + (-1, {_s26: _s28}), + ), +) + +TEST_INT_ENUM: StaticSchema = ( + 15, + n1, + _s29, + 0, + ( + _s30, + _s31, + ), + ( + (-1, {_s26: 1}), + (-1, {_s26: 2}), + ), +) + +DEFAULTS: StaticSchema = ( + 18, + n1, + _s32, + 0, + ( + _s33, + _s35, + _s36, + _s37, + _s38, + _s40, + _s41, + _s42, + _s43, + _s44, + _s45, + _s46, + _s47, + _s48, + _s49, + _s51, + _s52, + _s53, + _s54, + _s55, + _s56, + _s57, + _s58, + ), + ( + (3, {_s15: _s34}), + (2, {_s15: True}), + (TEST_STRING_LIST, {_s15: ()}), + (4, {_s15: 0}), + (1, {_s15: _s39}), + (5, {_s15: 1}), + (6, {_s15: 1}), + (7, {_s15: 10}), + (8, {_s15: 100}), + (9, {_s15: 1.0}), + (10, {_s15: 1.0}), + (TEST_STRING_MAP, {_s15: MappingProxyType[str, object]({})}), + (TEST_ENUM, {_s15: _s25}), + (TEST_INT_ENUM, {_s15: 1}), + (3, {_s15: _s50}), + (2, {_s15: False}), + (1, {_s15: _s50}), + (5, {_s15: 0}), + (6, {_s15: 0}), + (7, {_s15: 0}), + (8, {_s15: 0}), + (9, {_s15: 0.0}), + (10, {_s15: 0.0}), + ), +) + +DENSE_BOOLEAN_MAP: StaticSchema = ( + 17, + n1, + _s59, + 0, + ( + _s23, + _s12, + ), + ( + (3, 0), + (2, 0), + ), +) + +DENSE_NUMBER_MAP: StaticSchema = ( + 17, + n1, + _s60, + 0, + ( + _s23, + _s12, + ), + ( + (3, 0), + (7, 0), + ), +) + +STRING_SET: StaticSchema = ( + 16, + n2, + _s61, + 0, + (_s4,), + ((3, 0),), +) + +DENSE_SET_MAP: StaticSchema = ( + 17, + n1, + _s62, + 0, + ( + _s23, + _s12, + ), + ( + (3, 0), + (STRING_SET, 0), + ), +) + +DENSE_STRING_MAP: StaticSchema = ( + 17, + n1, + _s63, + 0, + ( + _s23, + _s12, + ), + ( + (3, 0), + (3, 0), + ), +) + +GREETING_STRUCT: StaticSchema = ( + 18, + n2, + _s64, + 0, + (_s34,), + ((3, 0),), +) + +DENSE_STRUCT_MAP: StaticSchema = ( + 17, + n1, + _s65, + 0, + ( + _s23, + _s12, + ), + ( + (3, 0), + (GREETING_STRUCT, 0), + ), +) + +EMPTY_STRUCTURE: StaticSchema = ( + 18, + n1, + _s66, + {_s10: None, _s11: None}, +) + +FRACTIONAL_SECONDS_OUTPUT: StaticSchema = ( + 18, + n1, + _s67, + {_s11: None}, + (_s68,), + ((4, 0),), +) + +GREETING_WITH_ERRORS_OUTPUT: StaticSchema = ( + 18, + n1, + _s69, + {_s11: None}, + (_s70,), + ((3, 0),), +) + +INVALID_GREETING: StaticSchema = ( + 18, + n1, + _s71, + {_s6: _s7}, + (_s72,), + ((3, 0),), +) + +OPERATION_WITH_DEFAULTS_INPUT: StaticSchema = ( + 18, + n1, + _s73, + {_s10: None}, + ( + _s74, + _s75, + _s76, + _s77, + ), + ( + (DEFAULTS, 0), + (CLIENT_OPTIONAL_DEFAULTS, 0), + (3, {_s15: _s34}), + (7, {_s15: 0}), + ), +) + +OPERATION_WITH_DEFAULTS_OUTPUT: StaticSchema = ( + 18, + n1, + _s78, + {_s11: None}, + ( + _s33, + _s35, + _s36, + _s37, + _s38, + _s40, + _s41, + _s42, + _s43, + _s44, + _s45, + _s46, + _s47, + _s48, + _s49, + _s51, + _s52, + _s53, + _s54, + _s55, + _s56, + _s57, + _s58, + ), + ( + (3, {_s15: _s34}), + (2, {_s15: True}), + (TEST_STRING_LIST, {_s15: ()}), + (4, {_s15: 0}), + (1, {_s15: _s39}), + (5, {_s15: 1}), + (6, {_s15: 1}), + (7, {_s15: 10}), + (8, {_s15: 100}), + (9, {_s15: 1.0}), + (10, {_s15: 1.0}), + (TEST_STRING_MAP, {_s15: MappingProxyType[str, object]({})}), + (TEST_ENUM, {_s15: _s25}), + (TEST_INT_ENUM, {_s15: 1}), + (3, {_s15: _s50}), + (2, {_s15: False}), + (1, {_s15: _s50}), + (5, {_s15: 0}), + (6, {_s15: 0}), + (7, {_s15: 0}), + (8, {_s15: 0}), + (9, {_s15: 0.0}), + (10, {_s15: 0.0}), + ), +) + +RECURSIVE_SHAPES_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s79, + {_s10: None, _s11: None}, + (_s80,), + ((lambda: RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1, 0),), +) + +RPC_V2_JSON_DENSE_MAPS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s81, + {_s10: None, _s11: None}, + ( + _s82, + _s83, + _s84, + _s85, + _s86, + ), + ( + (DENSE_STRUCT_MAP, 0), + (DENSE_NUMBER_MAP, 0), + (DENSE_BOOLEAN_MAP, 0), + (DENSE_STRING_MAP, 0), + (DENSE_SET_MAP, 0), + ), +) + +STRING_LIST: StaticSchema = ( + 16, + n2, + _s87, + 0, + (_s4,), + ((3, 0),), +) + +INTEGER_LIST: StaticSchema = ( + 16, + n2, + _s88, + 0, + (_s4,), + ((7, 0),), +) + +BOOLEAN_LIST: StaticSchema = ( + 16, + n2, + _s89, + 0, + (_s4,), + ((2, 0),), +) + +TIMESTAMP_LIST: StaticSchema = ( + 16, + n2, + _s90, + 0, + (_s4,), + ((4, 0),), +) + +FOO_ENUM: StaticSchema = ( + 14, + n2, + _s91, + 0, + ( + _s25, + _s28, + _s27, + _s30, + _s95, + ), + ( + (-1, {_s26: _s17}), + (-1, {_s26: _s92}), + (-1, {_s26: _s93}), + (-1, {_s26: _s94}), + (-1, {_s26: _s96}), + ), +) + +FOO_ENUM_LIST: StaticSchema = ( + 16, + n2, + _s97, + 0, + (_s4,), + ((FOO_ENUM, 0),), +) + +INTEGER_ENUM: StaticSchema = ( + 15, + n2, + _s98, + 0, + ( + _s99, + _s100, + _s101, + ), + ( + (-1, {_s26: 1}), + (-1, {_s26: 2}), + (-1, {_s26: 3}), + ), +) + +INTEGER_ENUM_LIST: StaticSchema = ( + 16, + n2, + _s102, + 0, + (_s4,), + ((INTEGER_ENUM, 0),), +) + +NESTED_STRING_LIST: StaticSchema = ( + 16, + n2, + _s103, + 0, + (_s4,), + ((STRING_LIST, 0),), +) + +STRUCTURE_LIST_MEMBER: StaticSchema = ( + 18, + n1, + _s104, + 0, + ( + _s105, + _s106, + ), + ( + (3, 0), + (3, 0), + ), +) + +STRUCTURE_LIST: StaticSchema = ( + 16, + n1, + _s107, + 0, + (_s4,), + ((STRUCTURE_LIST_MEMBER, 0),), +) + +BLOB_LIST: StaticSchema = ( + 16, + n2, + _s108, + 0, + (_s4,), + ((1, 0),), +) + +RPC_V2_JSON_LIST_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s109, + {_s10: None, _s11: None}, + ( + _s110, + _s111, + _s112, + _s113, + _s114, + _s115, + _s116, + _s117, + _s118, + _s119, + ), + ( + (STRING_LIST, 0), + (STRING_SET, 0), + (INTEGER_LIST, 0), + (BOOLEAN_LIST, 0), + (TIMESTAMP_LIST, 0), + (FOO_ENUM_LIST, 0), + (INTEGER_ENUM_LIST, 0), + (NESTED_STRING_LIST, 0), + (STRUCTURE_LIST, 0), + (BLOB_LIST, 0), + ), +) + +SPARSE_STRUCT_MAP: StaticSchema = ( + 17, + n1, + _s120, + 64, + ( + _s23, + _s12, + ), + ( + (3, 0), + (GREETING_STRUCT, 0), + ), +) + +SPARSE_NUMBER_MAP: StaticSchema = ( + 17, + n1, + _s121, + 64, + ( + _s23, + _s12, + ), + ( + (3, 0), + (7, 0), + ), +) + +SPARSE_BOOLEAN_MAP: StaticSchema = ( + 17, + n1, + _s122, + 64, + ( + _s23, + _s12, + ), + ( + (3, 0), + (2, 0), + ), +) + +SPARSE_STRING_MAP: StaticSchema = ( + 17, + n2, + _s123, + 64, + ( + _s23, + _s12, + ), + ( + (3, 0), + (3, 0), + ), +) + +SPARSE_SET_MAP: StaticSchema = ( + 17, + n1, + _s124, + 64, + ( + _s23, + _s12, + ), + ( + (3, 0), + (STRING_SET, 0), + ), +) + +RPC_V2_JSON_SPARSE_MAPS_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s125, + {_s10: None, _s11: None}, + ( + _s126, + _s127, + _s128, + _s129, + _s130, + ), + ( + (SPARSE_STRUCT_MAP, 0), + (SPARSE_NUMBER_MAP, 0), + (SPARSE_BOOLEAN_MAP, 0), + (SPARSE_STRING_MAP, 0), + (SPARSE_SET_MAP, 0), + ), +) + +SIMPLE_SCALAR_STRUCTURE: StaticSchema = ( + 18, + n1, + _s131, + {_s10: None, _s11: None}, + ( + _s132, + _s133, + _s134, + _s135, + _s136, + _s137, + _s138, + _s139, + _s140, + _s141, + ), + ( + (2, 0), + (2, 0), + (5, 0), + (10, 0), + (9, 0), + (7, 0), + (8, 0), + (6, 0), + (3, 0), + (1, 0), + ), +) + +SIMPLE_STRUCTURE: StaticSchema = ( + 18, + n1, + _s142, + {_s10: None, _s11: None}, + (_s12,), + ((3, 0),), +) + +SPARSE_STRING_LIST: StaticSchema = ( + 16, + n2, + _s143, + 64, + (_s4,), + ((3, 0),), +) + +SPARSE_NULLS_OPERATION_INPUT_OUTPUT: StaticSchema = ( + 18, + n1, + _s144, + {_s10: None, _s11: None}, + ( + _s145, + _s129, + ), + ( + (SPARSE_STRING_LIST, 0), + (SPARSE_STRING_MAP, 0), + ), +) + +DATE_TIME: StaticSchema = ( + 4, + n2, + _s146, + {_s147: _s148}, +) + +HTTP_DATE: StaticSchema = ( + 4, + n2, + _s149, + {_s147: _s150}, +) + +EPOCH_SECONDS: StaticSchema = ( + 4, + n2, + _s151, + {_s147: _s152}, +) + +TIMESTAMP_FORMAT_IGNORED_IO: StaticSchema = ( + 18, + n1, + _s153, + {_s10: None, _s11: None}, + ( + _s154, + _s155, + _s156, + _s157, + ), + ( + (DATE_TIME, 0), + (HTTP_DATE, 0), + (EPOCH_SECONDS, 0), + (4, 0), + ), +) + +RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1: StaticSchema = ( + 18, + n1, + _s158, + 0, + ( + _s159, + _s80, + ), + ( + (3, 0), + (lambda: RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2, 0), + ), +) + +RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2: StaticSchema = ( + 18, + n1, + _s160, + 0, + ( + _s161, + _s162, + ), + ( + (3, 0), + (RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1, 0), + ), +) diff --git a/codegen-output-py/rpcv2-json/src/rpcv2json/models.py b/codegen-output-py/rpcv2-json/src/rpcv2json/models.py new file mode 100644 index 000000000..eecbb4d78 --- /dev/null +++ b/codegen-output-py/rpcv2-json/src/rpcv2json/models.py @@ -0,0 +1,108 @@ +from smithy_core._dynamic_models import ModelRegistry +from smithy_core.exceptions import ModeledError + +from ._private import schemas + + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + + +_MODEL_INDEX = { + "ValidationException": "VALIDATION_EXCEPTION", + "ValidationExceptionField": "VALIDATION_EXCEPTION_FIELD", + "BigDecimalStructure": "BIG_DECIMAL_STRUCTURE", + "BigIntegerStructure": "BIG_INTEGER_STRUCTURE", + "ClientOptionalDefaults": "CLIENT_OPTIONAL_DEFAULTS", + "ComplexError": "COMPLEX_ERROR", + "ComplexNestedErrorData": "COMPLEX_NESTED_ERROR_DATA", + "Defaults": "DEFAULTS", + "EmptyStructure": "EMPTY_STRUCTURE", + "FractionalSecondsOutput": "FRACTIONAL_SECONDS_OUTPUT", + "GreetingWithErrorsOutput": "GREETING_WITH_ERRORS_OUTPUT", + "InvalidGreeting": "INVALID_GREETING", + "OperationWithDefaultsInput": "OPERATION_WITH_DEFAULTS_INPUT", + "OperationWithDefaultsOutput": "OPERATION_WITH_DEFAULTS_OUTPUT", + "RecursiveShapesInputOutput": "RECURSIVE_SHAPES_INPUT_OUTPUT", + "RecursiveShapesInputOutputNested1": "RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED1", + "RecursiveShapesInputOutputNested2": "RECURSIVE_SHAPES_INPUT_OUTPUT_NESTED2", + "RpcV2JsonDenseMapsInputOutput": "RPC_V2_JSON_DENSE_MAPS_INPUT_OUTPUT", + "RpcV2JsonListInputOutput": "RPC_V2_JSON_LIST_INPUT_OUTPUT", + "RpcV2JsonSparseMapsInputOutput": "RPC_V2_JSON_SPARSE_MAPS_INPUT_OUTPUT", + "SimpleScalarStructure": "SIMPLE_SCALAR_STRUCTURE", + "SimpleStructure": "SIMPLE_STRUCTURE", + "SparseNullsOperationInputOutput": "SPARSE_NULLS_OPERATION_INPUT_OUTPUT", + "StructureListMember": "STRUCTURE_LIST_MEMBER", + "TestEnum": "TEST_ENUM", + "TestIntEnum": "TEST_INT_ENUM", + "TimestampFormatIgnoredIO": "TIMESTAMP_FORMAT_IGNORED_IO", + "FooEnum": "FOO_ENUM", + "GreetingStruct": "GREETING_STRUCT", + "IntegerEnum": "INTEGER_ENUM", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "BigDecimalStructure", + "BigIntegerStructure", + "ClientOptionalDefaults", + "ComplexError", + "ComplexNestedErrorData", + "Defaults", + "EmptyStructure", + "FooEnum", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "IntegerEnum", + "InvalidGreeting", + "OperationWithDefaultsInput", + "OperationWithDefaultsOutput", + "RecursiveShapesInputOutput", + "RecursiveShapesInputOutputNested1", + "RecursiveShapesInputOutputNested2", + "RpcV2JsonDenseMapsInputOutput", + "RpcV2JsonListInputOutput", + "RpcV2JsonSparseMapsInputOutput", + "SimpleScalarStructure", + "SimpleStructure", + "SparseNullsOperationInputOutput", + "StructureListMember", + "TestEnum", + "TestIntEnum", + "TimestampFormatIgnoredIO", + "ValidationException", + "ValidationExceptionField", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + value = _registry.build(name) + globals()[name] = value + return value + + +def __dir__() -> list[str]: + return sorted({*globals(), *__all__}) diff --git a/codegen-output-py/rpcv2-json/src/rpcv2json/models.pyi b/codegen-output-py/rpcv2-json/src/rpcv2json/models.pyi new file mode 100644 index 000000000..65e2e1d45 --- /dev/null +++ b/codegen-output-py/rpcv2-json/src/rpcv2json/models.pyi @@ -0,0 +1,466 @@ +from dataclasses import dataclass +from datetime import datetime +from decimal import Decimal +from enum import IntEnum, StrEnum +from typing import Self + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.serializers import ShapeSerializer +from smithy_core.types import UnknownEnumMixin + +__all__ = [ + "BigDecimalStructure", + "BigIntegerStructure", + "ClientOptionalDefaults", + "ComplexError", + "ComplexNestedErrorData", + "Defaults", + "EmptyStructure", + "FooEnum", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsOutput", + "IntegerEnum", + "InvalidGreeting", + "OperationWithDefaultsInput", + "OperationWithDefaultsOutput", + "RecursiveShapesInputOutput", + "RecursiveShapesInputOutputNested1", + "RecursiveShapesInputOutputNested2", + "RpcV2JsonDenseMapsInputOutput", + "RpcV2JsonListInputOutput", + "RpcV2JsonSparseMapsInputOutput", + "ServiceError", + "SimpleScalarStructure", + "SimpleStructure", + "SparseNullsOperationInputOutput", + "StructureListMember", + "TestEnum", + "TestIntEnum", + "TimestampFormatIgnoredIO", + "ValidationException", + "ValidationExceptionField", +] + +class _SerdeShape: + def serialize(self, serializer: ShapeSerializer) -> None: ... + def serialize_members(self, serializer: ShapeSerializer) -> None: ... + @classmethod + def deserialize(cls, deserializer: ShapeDeserializer) -> Self: ... + +class ServiceError(ModeledError): + """ + Base error for all errors in the service. + + Some exceptions do not extend from this class, including synthetic, + implicit, and shared exception types. + """ + +@dataclass(kw_only=True) +class ValidationException(ServiceError, _SerdeShape): + """ + 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. + """ + + field_list: list[ValidationExceptionField] | None = ... + """ + 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. + """ + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ValidationExceptionField(_SerdeShape): + "Describes one specific validation failure for an input member." + + path: str + """ + A JSONPointer expression to the structure member whose value failed to + satisfy the modeled constraints. + """ + message: str + "A detailed description of the validation failure." + +@dataclass(kw_only=True) +class BigDecimalStructure(_SerdeShape): + "Dataclass for BigDecimalStructure structure." + + value: Decimal | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class BigIntegerStructure(_SerdeShape): + "Dataclass for BigIntegerStructure structure." + + value: int | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ClientOptionalDefaults(_SerdeShape): + "Dataclass for ClientOptionalDefaults structure." + + member: int | None = ... + +@dataclass(kw_only=True) +class ComplexError(ServiceError, _SerdeShape): + "This error is thrown when a request is invalid." + + top_level: str | None = ... + nested: ComplexNestedErrorData | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class ComplexNestedErrorData(_SerdeShape): + "Dataclass for ComplexNestedErrorData structure." + + foo: str | None = ... + +@dataclass(kw_only=True) +class Defaults(_SerdeShape): + "Dataclass for Defaults structure." + + default_string: str | None = ... + default_boolean: bool | None = ... + default_list: list[str] | None = ... + default_timestamp: datetime | None = ... + default_blob: bytes | None = ... + default_byte: int | None = ... + default_short: int | None = ... + default_integer: int | None = ... + default_long: int | None = ... + default_float: float | None = ... + default_double: float | None = ... + default_map: dict[str, str] | None = ... + default_enum: str | None = ... + default_int_enum: int | None = ... + empty_string: str | None = ... + false_boolean: bool | None = ... + empty_blob: bytes | None = ... + zero_byte: int | None = ... + zero_short: int | None = ... + zero_integer: int | None = ... + zero_long: int | None = ... + zero_float: float | None = ... + zero_double: float | None = ... + +@dataclass(kw_only=True) +class EmptyStructure(_SerdeShape): + "Dataclass for EmptyStructure structure." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class FractionalSecondsOutput(_SerdeShape): + "Dataclass for FractionalSecondsOutput structure." + + datetime_: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class GreetingWithErrorsOutput(_SerdeShape): + "Dataclass for GreetingWithErrorsOutput structure." + + greeting: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class InvalidGreeting(ServiceError, _SerdeShape): + "This error is thrown when an invalid greeting value is provided." + + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class OperationWithDefaultsInput(_SerdeShape): + "Dataclass for OperationWithDefaultsInput structure." + + defaults: Defaults | None = ... + client_optional_defaults: ClientOptionalDefaults | None = ... + top_level_default: str | None = ... + other_top_level_default: int | None = ... + +@dataclass(kw_only=True) +class OperationWithDefaultsOutput(_SerdeShape): + "Dataclass for OperationWithDefaultsOutput structure." + + default_string: str | None = ... + default_boolean: bool | None = ... + default_list: list[str] | None = ... + default_timestamp: datetime | None = ... + default_blob: bytes | None = ... + default_byte: int | None = ... + default_short: int | None = ... + default_integer: int | None = ... + default_long: int | None = ... + default_float: float | None = ... + default_double: float | None = ... + default_map: dict[str, str] | None = ... + default_enum: str | None = ... + default_int_enum: int | None = ... + empty_string: str | None = ... + false_boolean: bool | None = ... + empty_blob: bytes | None = ... + zero_byte: int | None = ... + zero_short: int | None = ... + zero_integer: int | None = ... + zero_long: int | None = ... + zero_float: float | None = ... + zero_double: float | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class RecursiveShapesInputOutput(_SerdeShape): + "Dataclass for RecursiveShapesInputOutput structure." + + nested: RecursiveShapesInputOutputNested1 | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class RecursiveShapesInputOutputNested1(_SerdeShape): + "Dataclass for RecursiveShapesInputOutputNested1 structure." + + foo: str | None = ... + nested: RecursiveShapesInputOutputNested2 | None = ... + +@dataclass(kw_only=True) +class RecursiveShapesInputOutputNested2(_SerdeShape): + "Dataclass for RecursiveShapesInputOutputNested2 structure." + + bar: str | None = ... + recursive_member: RecursiveShapesInputOutputNested1 | None = ... + +@dataclass(kw_only=True) +class RpcV2JsonDenseMapsInputOutput(_SerdeShape): + "Dataclass for RpcV2JsonDenseMapsInputOutput structure." + + dense_struct_map: dict[str, GreetingStruct] | None = ... + dense_number_map: dict[str, int] | None = ... + dense_boolean_map: dict[str, bool] | None = ... + dense_string_map: dict[str, str] | None = ... + dense_set_map: dict[str, list[str]] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class RpcV2JsonListInputOutput(_SerdeShape): + "Dataclass for RpcV2JsonListInputOutput structure." + + string_list: list[str] | None = ... + string_set: list[str] | None = ... + integer_list: list[int] | None = ... + boolean_list: list[bool] | None = ... + timestamp_list: list[datetime] | None = ... + enum_list: list[str] | None = ... + int_enum_list: list[int] | None = ... + nested_string_list: list[list[str]] | None = ... + structure_list: list[StructureListMember] | None = ... + blob_list: list[bytes] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class RpcV2JsonSparseMapsInputOutput(_SerdeShape): + "Dataclass for RpcV2JsonSparseMapsInputOutput structure." + + sparse_struct_map: dict[str, GreetingStruct | None] | None = ... + sparse_number_map: dict[str, int | None] | None = ... + sparse_boolean_map: dict[str, bool | None] | None = ... + sparse_string_map: dict[str, str | None] | None = ... + sparse_set_map: dict[str, list[str] | None] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class SimpleScalarStructure(_SerdeShape): + "Dataclass for SimpleScalarStructure structure." + + true_boolean_value: bool | None = ... + false_boolean_value: bool | None = ... + byte_value: int | None = ... + double_value: float | None = ... + float_value: float | None = ... + integer_value: int | None = ... + long_value: int | None = ... + short_value: int | None = ... + string_value: str | None = ... + blob_value: bytes | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class SimpleStructure(_SerdeShape): + "Dataclass for SimpleStructure structure." + + value: str | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class SparseNullsOperationInputOutput(_SerdeShape): + "Dataclass for SparseNullsOperationInputOutput structure." + + sparse_string_list: list[str | None] | None = ... + sparse_string_map: dict[str, str | None] | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +@dataclass(kw_only=True) +class StructureListMember(_SerdeShape): + "Dataclass for StructureListMember structure." + + a: str | None = ... + b: str | None = ... + +class TestEnum(UnknownEnumMixin, StrEnum): + FOO = "FOO" + BAR = "BAR" + BAZ = "BAZ" + +class TestIntEnum(UnknownEnumMixin, IntEnum): + ONE = 1 + TWO = 2 + +@dataclass(kw_only=True) +class TimestampFormatIgnoredIO(_SerdeShape): + "Dataclass for TimestampFormatIgnoredIO structure." + + date_time: datetime | None = ... + http_date: datetime | None = ... + epoch_seconds: datetime | None = ... + normal: datetime | None = ... + response_metadata: ResponseMetadata = ... + """ + Metadata about the response that produced this output. + + Use this to recover the request identifiers a service's support team + needs in order to investigate a call. Members of the metadata are + individually optional. + """ + +class FooEnum(UnknownEnumMixin, StrEnum): + FOO = "Foo" + BAZ = "Baz" + BAR = "Bar" + ONE = "1" + ZERO = "0" + +@dataclass(kw_only=True) +class GreetingStruct(_SerdeShape): + "Dataclass for GreetingStruct structure." + + hi: str | None = ... + +class IntegerEnum(UnknownEnumMixin, IntEnum): + A = 1 + B = 2 + C = 3 diff --git a/codegen-output-py/rpcv2-json/src/rpcv2json/py.typed b/codegen-output-py/rpcv2-json/src/rpcv2json/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output/my-handwritten-json-model/README.md b/codegen-output/my-handwritten-json-model/README.md index 5a1e0a519..006564531 100644 --- a/codegen-output/my-handwritten-json-model/README.md +++ b/codegen-output/my-handwritten-json-model/README.md @@ -2,7 +2,7 @@ ## My Handwritten JSON Model Client -my_handwritten_json_model client +Python client for My Handwritten JSON Model ### Documentation diff --git a/codegen-output/my-handwritten-json-model/pyproject.toml b/codegen-output/my-handwritten-json-model/pyproject.toml index d32fb8be3..6f1e2134b 100644 --- a/codegen-output/my-handwritten-json-model/pyproject.toml +++ b/codegen-output/my-handwritten-json-model/pyproject.toml @@ -3,7 +3,7 @@ [project] name = "my_handwritten_json_model" version = "0.0.1" -description = "my_handwritten_json_model client" +description = "Python client for My Handwritten JSON Model" readme = "README.md" requires-python = ">=3.12" keywords = ["smithy", "my_handwritten_json_model"] diff --git a/codegen-output/rpcv2-json/README.md b/codegen-output/rpcv2-json/README.md index 76e479278..49b85983a 100644 --- a/codegen-output/rpcv2-json/README.md +++ b/codegen-output/rpcv2-json/README.md @@ -2,4 +2,4 @@ ## RpcV2 JSON Protocol Service Client -rpcv2json client +Python client for RpcV2 JSON Protocol Service diff --git a/codegen-output/rpcv2-json/pyproject.toml b/codegen-output/rpcv2-json/pyproject.toml index 294023a45..68835928e 100644 --- a/codegen-output/rpcv2-json/pyproject.toml +++ b/codegen-output/rpcv2-json/pyproject.toml @@ -3,7 +3,7 @@ [project] name = "rpcv2json" version = "0.0.1" -description = "rpcv2json client" +description = "Python client for RpcV2 JSON Protocol Service" readme = "README.md" requires-python = ">=3.12" keywords = ["smithy", "rpcv2json"] diff --git a/designs/codegen/index.md b/designs/codegen/index.md index 81d968097..2841631ab 100644 --- a/designs/codegen/index.md +++ b/designs/codegen/index.md @@ -66,3 +66,4 @@ behavior of generated packages. * [Python Writer](writer.md) * [Standalone Types Generation](types.md) * [Code Generation Partitioning](partitioning.md) +* [Native Python Codegen Snapshots](snapshots.md) diff --git a/designs/codegen/snapshots.md b/designs/codegen/snapshots.md new file mode 100644 index 000000000..42c4a2259 --- /dev/null +++ b/designs/codegen/snapshots.md @@ -0,0 +1,170 @@ +# Native Python Codegen Snapshots + +`codegen-output-py` records the model and schema surface currently supported by +`smithy-python generate types`. It gives the native generator the same model +families as the Java-generated `codegen-output` tree without making the Python +workflow depend on Java, Gradle, Maven, or the Smithy CLI. + +## Coverage + +The reference projections retain the projection names, import package names, +service IDs, and package versions from +`codegen/protocol-test/smithy-build.json`. All use the public `types` command with +`--service` and `--include-operation-io`. + +| Projection | Import package | Data schemas | +| --- | --- | ---: | +| `rest-json-1` | `restjson` | 205 | +| `rest-xml` | `restxml` | 144 | +| `rest-xml-with-namespace` | `restxmlwithnamespace` | 3 | +| `aws-json-1-0` | `awsjson10` | 44 | +| `query-compatible-aws-json-1-0` | `querycompatibleawsjson10` | 2 | +| `aws-json-1-1` | `awsjson11` | 53 | +| `aws-query` | `awsquery` | 73 | +| `ec2-query` | `ec2query` | 56 | +| `rpcv2-cbor` | `rpcv2cbor` | 56 | +| `rpcv2-json` | `rpcv2json` | 57 | +| `query-compatible-rpcv2-cbor` | `querycompatiblerpcv2cbor` | 2 | +| `non-query-compatible-rpcv2-cbor` | `nonquerycompatiblerpcv2cbor` | 0 | +| `my-handwritten-model` | `my_handwritten_model` | 20 | +| `my-handwritten-json-model` | `my_handwritten_json_model` | 10 | +| `types` | `example_types` | 10 | +| `partitioned-types` | `partitioned_types` | 270 | + +The fourteen reference projections contribute 725 data schemas. The original +example adds service renames, string and integer enums, unknown enum and union +values, a Unit union member, collections, a modeled error, and streaming +members. The native partition stress fixture extends that example with 260 +linked structures, including a recursive pair. Default partition settings +produce three schema partitions and two private stub partitions for it. + +Protocol names identify the source models; the native artifacts do not generate +protocol implementations or AWS integrations. The non-query-compatible RPCv2 +CBOR service has no standalone declaration roots, so its snapshot contains an +empty schema module and the `ServiceError` base. Java's synthetic operation +input/output structures are deliberately absent. + +Each snapshot contains only: + +* `models.py` and `models.pyi`, with private model stub partitions when needed; +* `_private/schemas.py`, with private schema partitions when needed; +* package initialization, `py.typed`, package metadata, and a README; +* the native generator's file ownership and content hash manifest. + +No client, config, auth, endpoint, protocol implementation, user agent, or +generated protocol tests are included. + +## Inputs and maintenance + +`scripts/codegen-output-py/projections.json` declares the generation inputs and +settings. Model inputs are checked-in Smithy JSON ASTs, taken from the assembled +protocol-test projections using Smithy 1.74.1. They retain the original model +order, mixins, model documentation, traits, and operation references. +`smithy.test#httpRequestTests` and `smithy.test#httpResponseTests` vectors and +their trait definitions are removed because they exercise client protocols. +Native model loading flattens mixins before generation. + +`models/provenance.json` records hashes of both the original assembled ASTs and +the checked-in fixtures. Regeneration reads only checked-in files. It neither +reads a build directory nor installs or invokes a JVM tool. + +To refresh reference inputs when their models change, obtain assembled JSON ASTs +and run: + +```sh +PATH="$PWD/.venv/bin:$PATH" python scripts/codegen-output-py/refresh_models.py \ + /path/to/assembled/projections +make generate-codegen-output-py +make check-codegen-output-py +make test-codegen-output-py +``` + +The maintenance command expects `/model/model.json` for each +reference projection. It reads the projection settings as ordinary JSON and +also rebuilds the native partition stress input. It does not assemble Smithy +IDL or invoke a build system. Review fixture and provenance changes together. + +Generated files must never be edited directly. Update model inputs, generation +settings, the generation script, or the native generator, then regenerate. + +## Determinism and validation + +`make generate-codegen-output-py` generates the complete tree in a temporary +directory, applies the repository's Ruff rules, and refreshes each package's +content hashes. It publishes only if file contents differ. A second run against +the same inputs changes no files. + +`make check-codegen-output-py` compares a fresh temporary generation with the +working tree without publishing it. It reports missing, changed, and obsolete +files, then checks Ruff and strict Pyright over generated runtime modules, +stubs, private partitions, and a consumer usage fixture. The usage fixture +imports all projection packages through their public model modules. + +Separating generation from checking allows intentional, uncommitted snapshot +updates to be validated. In a clean CI checkout, the same comparison checks the +committed snapshots. These commands use only Python and Python tools. +`make static-analysis` runs the snapshot check; `make test-integration` runs the +check and native conformance suite alongside the existing Java checks. + +The conformance suite checks: + +* complete generated file surfaces, metadata, and manifest hashes; +* public model exports, lazy construction, caching, star imports, and field + agreement with stubs, including facade re-exports; +* schema IDs, types, retained trait values, inherited mixin members, member + order, indexes, and targets against the loaded input ASTs; +* schema facade imports and object identity across partitions; +* common model fields, enum values, and schema metadata against the committed + Java-generated Python packages, with isolated package imports; +* JSON model round trips and RPCv2 CBOR model round trips, without constructing + clients; +* streaming blob serializer/deserializer dispatch. Document codecs cannot + encode data streams, so these members use a separate stream check. + +Generator unit tests additionally cover concurrent first access, naming +collisions, constructor semantics, serde behavior, and strict typing of empty +model maps and both partitioned and unpartitioned stubs. + +## Java behavior that remains outside these snapshots + +The Java tree is a behavioral reference, not a byte-for-byte template. These +differences are explicit: + +* Java client generation creates dedicated operation input/output structures, + including empty structures for operations without modeled I/O. Native types + use the original selected data shapes. Shared structures retain their + input/output markers and resulting standalone constructor and response + metadata behavior. +* Operation schemas, `APIOperation` metadata, service/resource metadata, and + operation-to-schema partition affinity are client planning concerns. Types + artifacts omit operation schemas, and their partition boundaries may differ + from Java clients. +* Java AWS integrations retain provider-specific metadata such as + `aws.protocols#awsQueryError`. Native snapshots do not claim parity for this + metadata or implement AWS behavior. +* Java still produces clients, sync/async configs, auth, endpoints, user agents, + protocol serializers/deserializers, and operation-level protocol tests. +* Source documentation and package descriptions can render differently; public + model behavior and supported schema semantics are the compatibility target. + +The common-schema comparison accounts specifically for input/output markers +and `awsQueryError`; it compares the remaining metadata without excluding +shape IDs, types, member order, indexes, targets, or provider-neutral trait +values. + +## Next client milestone + +The next task is a provider-neutral client design followed by an RPCv2 CBOR +vertical slice. Define `ClientSettings` and `ClientPlan`, operation discovery and +dedicated I/O normalization, operation/schema metadata, protocol extension +points, and runtime transport/config integration. The client plan should +compose model and schema plans while owning operation metadata and partition +affinity. Do not force operation schemas through `TypesSettings` or alter the +standalone types contract to obtain client parity. + +The vertical slice should generate and exercise a minimal RPCv2 CBOR operation +end to end, covering public client/config surfaces, operation metadata, +request serialization, transport dispatch, response deserialization, modeled +errors, and strict typing. AWS-specific integrations remain a subsequent +milestone. `smithy-python generate client` remains explicitly unimplemented in +this snapshot task. diff --git a/packages/smithy-python/.changes/next-release/smithy-python-enhancement-typed-model-maps.json b/packages/smithy-python/.changes/next-release/smithy-python-enhancement-typed-model-maps.json new file mode 100644 index 000000000..d72457df1 --- /dev/null +++ b/packages/smithy-python/.changes/next-release/smithy-python-enhancement-typed-model-maps.json @@ -0,0 +1,4 @@ +{ + "type": "enhancement", + "description": "Make empty model registry maps and private stub partition imports pass strict type checking, including services without data shapes." +} diff --git a/packages/smithy-python/src/smithy_python/models.py b/packages/smithy-python/src/smithy_python/models.py index 1c346472d..9f5503a99 100644 --- a/packages/smithy-python/src/smithy_python/models.py +++ b/packages/smithy-python/src/smithy_python/models.py @@ -193,11 +193,7 @@ def __init__( self.symbols = context.symbols self.module = f"{context.settings.package}.models" self.external_bases = external_bases - self.serde_shape: str | _symbols.TypeReference = ( - _symbols.TypeReference("_SerdeShape", "..models") - if external_bases - else "_SerdeShape" - ) + self.serde_shape = "_SerdeShape" self.service_error: str | _symbols.TypeReference = ( _symbols.TypeReference("ServiceError", "..models") if external_bases @@ -233,6 +229,14 @@ def write_facade(self, partitions: tuple[tuple[_model.Shape, ...], ...]) -> None def write_partition(self, shapes: tuple[_model.Shape, ...]) -> None: """Write declarations assigned to one private stub partition.""" + if any( + shape.type in (_model.ShapeType.STRUCTURE, _model.ShapeType.UNION) + for shape in shapes + ): + self.writer.line( + "from ..models import _SerdeShape # pyright: ignore[reportPrivateUsage]" + ) + self.writer.line() self._write_shapes(shapes) def _write_preamble(self) -> None: @@ -449,7 +453,7 @@ def _stub_shape_names(plan: ModelPlan, shape: _model.Shape) -> tuple[str, ...]: def _write_mapping(writer: PythonWriter, name: str, values: Mapping[str, str]) -> None: if not values: - writer.line(name, " = {}") + writer.line(name, ": dict[str, str] = {}") return writer.line(name, " = {") with writer.indent(): diff --git a/packages/smithy-python/tests/unit/test_models.py b/packages/smithy-python/tests/unit/test_models.py index 9b57bd399..42d32c296 100644 --- a/packages/smithy-python/tests/unit/test_models.py +++ b/packages/smithy-python/tests/unit/test_models.py @@ -446,18 +446,21 @@ def read_struct(self, schema: Any, consumer: Any) -> None: models.Original +@pytest.mark.parametrize(("stub_partition_size", "partition_count"), [(1, 8), (2, 4)]) def test_partitioned_stub_preserves_public_models( tmp_path: Path, monkeypatch: pytest.MonkeyPatch, + stub_partition_size: int, + partition_count: int, ) -> None: _, source_root = _generate( tmp_path, - stub_partition_size=2, + stub_partition_size=stub_partition_size, ) package = source_root / _PACKAGE facade = (package / "models.pyi").read_text() partitions = sorted((package / "_private").glob("models_*.pyi")) - assert len(partitions) == 4 + assert len(partitions) == partition_count assert "class Input(" not in facade assert "from ._private.models_0 import (" in facade assert "Input," in facade @@ -872,7 +875,7 @@ def test_modeled_unit_does_not_shadow_prelude_unit( assert isinstance(decoded.action.value, models.Unit) -@pytest.mark.parametrize("stub_partition_size", [None, 2]) +@pytest.mark.parametrize("stub_partition_size", [None, 1, 2]) def test_generated_stub_passes_strict_pyright( tmp_path: Path, stub_partition_size: int | None, @@ -892,7 +895,7 @@ def test_generated_stub_passes_strict_pyright( (tmp_path / "pyrightconfig.json").write_text( json.dumps( { - "include": ["check.py"], + "include": ["check.py", str(source_root)], "extraPaths": [str(source_root)], "typeCheckingMode": "strict", } @@ -907,6 +910,39 @@ def test_generated_stub_passes_strict_pyright( assert result.returncode == 0, result.stdout + result.stderr +@pytest.mark.parametrize( + "model", + [ + {"smithy": "2.0"}, + { + "smithy": "2.0", + "shapes": { + "example#Item": { + "type": "structure", + "members": {"value": {"target": "smithy.api#String"}}, + } + }, + }, + ], +) +def test_generated_runtime_with_empty_maps_passes_strict_pyright( + tmp_path: Path, model: dict[str, object] +) -> None: + source_root = _generate_custom(tmp_path, model, "empty_maps") + config = tmp_path / "pyrightconfig.json" + config.write_text( + json.dumps( + { + "include": [str(source_root)], + "extraPaths": [str(source_root)], + "typeCheckingMode": "strict", + } + ) + ) + result = _run_tool("pyright", "--project", str(config)) + assert result.returncode == 0, result.stdout + result.stderr + + def test_generated_models_pass_ruff(tmp_path: Path) -> None: _, source_root = _generate(tmp_path) models = source_root / _PACKAGE / "models.py" diff --git a/packages/smithy-test/.changes/next-release/smithy-test-enhancement-conformance-union-names.json b/packages/smithy-test/.changes/next-release/smithy-test-enhancement-conformance-union-names.json new file mode 100644 index 000000000..092f1ec03 --- /dev/null +++ b/packages/smithy-test/.changes/next-release/smithy-test-enhancement-conformance-union-names.json @@ -0,0 +1,4 @@ +{ + "type": "enhancement", + "description": "Resolve generated union variant names correctly when constructing serde conformance values." +} diff --git a/packages/smithy-test/src/smithy_test/_private/conformance.py b/packages/smithy-test/src/smithy_test/_private/conformance.py index d28dbf66b..be243decf 100644 --- a/packages/smithy-test/src/smithy_test/_private/conformance.py +++ b/packages/smithy-test/src/smithy_test/_private/conformance.py @@ -180,9 +180,19 @@ def _trivial_value(member: Any, models: ModuleType) -> Any: nested = getattr(models, target.id.name) return _build_instance(nested, target, models) if st == ShapeType.UNION: + from smithy_core._model_naming import variant_class_name + target = member.expect_member_target() first = target.members_by_index[0] - variant = getattr(models, target.id.name + first.expect_member_name()) + registry = getattr(models, "_registry", None) + target_names = getattr(registry, "_target_names", {}) + container = target_names.get(str(target.id), target.id.name) + name = variant_class_name( + container, + first.expect_member_name(), + getattr(registry, "_shape_names", ()), + ) + variant = getattr(models, name) return variant(value=_trivial_value(first, models)) return None diff --git a/packages/smithy-test/tests/unit/test_conformance.py b/packages/smithy-test/tests/unit/test_conformance.py index 1b7857e2b..4df85b0d7 100644 --- a/packages/smithy-test/tests/unit/test_conformance.py +++ b/packages/smithy-test/tests/unit/test_conformance.py @@ -76,3 +76,47 @@ def deserialize( stub.write_text(declaration) assert verify_models(models, schemas, codec=_Codec(), pyi_path=str(stub)) == 1 + + +def test_serde_conformance_capitalizes_union_member_names() -> None: + choice: StaticSchema = ( + ShapeType.UNION.value, + "example", + "Choice", + 0, + ("myValue",), + ((ShapeType.STRING.value, 0),), + ) + request: StaticSchema = ( + ShapeType.STRUCTURE.value, + "example", + "Request", + 0, + ("choice",), + ((lambda: choice, _REQUIRED),), + ) + schemas = ModuleType("example._private.schemas") + schemas.CHOICE = choice # type: ignore[attr-defined] + schemas.REQUEST = request # type: ignore[attr-defined] + + @dataclass + class ChoiceMyValue: + value: str + + @dataclass + class Request: + choice: ChoiceMyValue + + models = ModuleType("example.models") + models.ChoiceMyValue = ChoiceMyValue # type: ignore[attr-defined] + models.Request = Request # type: ignore[attr-defined] + + class _Codec: + def serialize(self, value: Request) -> bytes: + assert value.choice == ChoiceMyValue(value="x") + return b"" + + def deserialize(self, body: bytes, cls: type[Request]) -> Request: + return cls(choice=ChoiceMyValue(value="x")) + + assert verify_models(models, schemas, codec=_Codec()) == 1 diff --git a/scripts/codegen-output-py/generate.py b/scripts/codegen-output-py/generate.py index 991806d4d..3d4567bdb 100644 --- a/scripts/codegen-output-py/generate.py +++ b/scripts/codegen-output-py/generate.py @@ -1,71 +1,119 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 # pyright: reportPrivateUsage=false -"""Regenerate the committed Python codegen snapshot.""" +"""Generate standalone types snapshots from checked-in Smithy JSON ASTs.""" +import argparse import hashlib import json +import shutil import subprocess import sys from pathlib import Path +from tempfile import TemporaryDirectory from smithy_python.cli import main as generate _ROOT = Path(__file__).resolve().parents[2] -_MODEL = Path(__file__).with_name("model.json") -_OUTPUT = _ROOT / "codegen-output-py" / "types" -_PACKAGE = "example_types" -_SERVICE = "example#ExampleService" +_INPUTS = Path(__file__).parent +_OUTPUT = _ROOT / "codegen-output-py" def main() -> None: - result = generate( - ( - "generate", - "types", - "--model", - str(_MODEL), - "--output", - str(_OUTPUT), - "--service", - _SERVICE, - "--package", - _PACKAGE, - "--package-version", - "1.0.0", - "--package-description", - "Example Python codegen output", - "--include-operation-io", - ), - environ={}, + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--check", action="store_true", help="Check without publishing." ) - if result: - raise SystemExit(result) - _format_output() + parser.add_argument("--output", type=Path, default=_OUTPUT) + args = parser.parse_args() + # A fresh tree also detects removed projections and obsolete partitions. + with TemporaryDirectory(prefix="smithy-python-snapshots-") as temporary: + staged = Path(temporary) + projections = json.loads((_INPUTS / "projections.json").read_text()) + for name, settings in sorted(projections.items()): + result = generate( + ( + "generate", + "types", + "--model", + str(_INPUTS / settings["model"]), + "--output", + str(staged / name), + "--service", + settings["service"], + "--package", + settings["package"], + "--package-version", + settings["version"], + "--package-description", + settings["description"], + "--include-operation-io", + ), + environ={}, + ) + if result: + raise SystemExit(result) + _format_output(staged) + expected = _files(staged) + actual = _files(args.output) + changed = sorted( + path + for path in expected.keys() | actual.keys() + if expected.get(path) != actual.get(path) + ) + if args.check: + if changed: + sys.stderr.write( + "codegen-output-py differs from fresh generation:\n" + + "\n".join(changed) + + "\nRun make generate-codegen-output-py to update the snapshots.\n" + ) + raise SystemExit(1) + sys.stdout.write("codegen-output-py is up to date.\n") + elif changed: + if args.output.exists(): + shutil.rmtree(args.output) + shutil.copytree(staged, args.output) + sys.stdout.write(f"Updated {len(changed)} snapshot file(s).\n") + else: + sys.stdout.write("codegen-output-py is up to date; no files changed.\n") + + +def _files(root: Path) -> dict[str, bytes]: + return { + path.relative_to(root).as_posix(): path.read_bytes() + for path in sorted(root.rglob("*")) + if path.is_file() + and not any( + part.startswith(".") or part == "__pycache__" + for part in path.relative_to(root).parts[:-1] + ) + and path.suffix != ".pyc" + } -def _format_output() -> None: + +def _format_output(output: Path) -> None: config = _ROOT / "pyproject.toml" for command in ("check", "format"): args = [sys.executable, "-m", "ruff", command] if command == "check": args.append("--fix") subprocess.run( # noqa: S603 - [*args, str(_OUTPUT), "--config", str(config)], + [*args, str(output), "--config", str(config), "--no-cache"], check=True, ) - manifest = _OUTPUT / ".smithy-python-manifest.json" - files = { - path.relative_to(_OUTPUT).as_posix(): hashlib.sha256( - path.read_bytes() - ).hexdigest() - for path in sorted(_OUTPUT.rglob("*")) - if path.is_file() and path != manifest - } - manifest.write_text( - json.dumps({"version": 1, "files": files}, indent=2, sort_keys=True) + "\n" - ) + for projection in sorted(output.iterdir()): + manifest = projection / ".smithy-python-manifest.json" + files = { + path: hashlib.sha256(content).hexdigest() + for path, content in _files(projection).items() + if path != manifest.name + } + manifest.write_text( + json.dumps({"version": 1, "files": files}, indent=2, sort_keys=True) + "\n" + ) if __name__ == "__main__": diff --git a/scripts/codegen-output-py/models/aws-json-1-0.json b/scripts/codegen-output-py/models/aws-json-1-0.json new file mode 100644 index 000000000..300c32352 --- /dev/null +++ b/scripts/codegen-output-py/models/aws-json-1-0.json @@ -0,0 +1,1831 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "aws.api#ArnNamespace": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a service's ARN namespace.", + "smithy.api#pattern": "^[a-z0-9.\\-]{1,63}$", + "smithy.api#private": {} + } + }, + "aws.api#CloudFormationName": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a CloudFormation service name.", + "smithy.api#pattern": "^[A-Z][A-Za-z0-9]+$", + "smithy.api#private": {} + } + }, + "aws.api#CloudWatchMetricNamespace": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[^:].*$", + "smithy.api#private": {} + } + }, + "aws.api#service": { + "type": "structure", + "members": { + "sdkId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `sdkId` property is a required string value that specifies the AWS\nSDK service ID (e.g., \"API Gateway\"). This value is used for generating\nclient names in SDKs and for linking between services.", + "smithy.api#required": {} + } + }, + "arnNamespace": { + "target": "aws.api#ArnNamespace", + "traits": { + "smithy.api#documentation": "The `arnNamespace` property is a string value that defines the ARN service\nnamespace of the service (e.g., \"apigateway\"). This value is used in\nARNs assigned to resources in the service. If not set, this value\ndefaults to the lowercase name of the service shape." + } + }, + "cloudFormationName": { + "target": "aws.api#CloudFormationName", + "traits": { + "smithy.api#documentation": "The `cloudFormationName` property is a string value that specifies the\nAWS CloudFormation service name (e.g., `ApiGateway`). When not set,\nthis value defaults to the name of the service shape. This value is\npart of the CloudFormation resource type name that is automatically\nassigned to resources in the service (e.g., `AWS::::resourceName`)." + } + }, + "cloudTrailEventSource": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `cloudTrailEventSource` property is a string value that defines the\nAWS customer-facing eventSource property contained in CloudTrail event\nrecords emitted by the service. If not specified, this value defaults\nto the `arnNamespace` plus `.amazonaws.com`." + } + }, + "docId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `docId` property is a string value that defines the identifier\nused to implement linking between service and SDK documentation for\nAWS services. If not specified, this value defaults to the `sdkId` in\nlower case plus the service `version` property, separated by dashes." + } + }, + "endpointPrefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `endpointPrefix` property is a string value that identifies which\nendpoint in a given region should be used to connect to the service.\nFor example, most services in the AWS standard partition have endpoints\nwhich follow the format: `{endpointPrefix}.{region}.amazonaws.com`. A\nservice with the endpoint prefix example in the region us-west-2 might\nhave the endpoint example.us-west-2.amazonaws.com.\n\nThis value is not unique across services and is subject to change.\nTherefore, it MUST NOT be used for client naming or for any other\npurpose that requires a static, unique identifier. sdkId should be used\nfor those purposes. Additionally, this value can be used to attempt to\nresolve endpoints." + } + }, + "cloudWatchNamespace": { + "target": "aws.api#CloudWatchMetricNamespace", + "traits": { + "smithy.api#documentation": "The `cloudWatchNamespace` property is a string value that defines the\nAWS customer-facing namespace of most metrics emitted by the service." + } + } + }, + "traits": { + "smithy.api#documentation": "An AWS service is defined using the `aws.api#service` trait. This trait\nprovides information about the service like the name used to generate AWS\nSDK client classes and the namespace used in ARNs.", + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.auth#sigv4": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The signature version 4 service signing name to use in the credential\nscope when signing requests. This value SHOULD match the `arnNamespace`\nproperty of the `aws.api#service` trait if present and the `name`\nproperty of the `aws.api#sigv4a` trait if present.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html" + }, + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#authDefinition": {}, + "smithy.api#documentation": "[Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)\nis the process to add authentication information to AWS requests sent by HTTP. For\nsecurity, most requests to AWS must be signed with an access key, which consists\nof an access key ID and secret access key. These two keys are commonly referred to\nas your security credentials.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html" + }, + "smithy.api#trait": { + "selector": "service", + "breakingChanges": [ + { + "change": "remove", + "message": "Removing the existing authentication scheme is not backward compatible and can break existing clients' authentication." + } + ] + } + } + }, + "aws.protocols#HttpConfiguration": { + "type": "structure", + "members": { + "http": { + "target": "aws.protocols#StringList", + "traits": { + "smithy.api#documentation": "The priority ordered list of supported HTTP protocol versions." + } + }, + "eventStreamHttp": { + "target": "aws.protocols#StringList", + "traits": { + "smithy.api#documentation": "The priority ordered list of supported HTTP protocol versions that\nare required when using event streams with the service. If not set,\nthis value defaults to the value of the `http` member. Any entry in\n`eventStreamHttp` MUST also appear in `http`." + } + } + }, + "traits": { + "smithy.api#documentation": "Contains HTTP protocol configuration for HTTP-based protocols.", + "smithy.api#mixin": { + "localTraits": [ + "smithy.api#private" + ] + }, + "smithy.api#private": {} + } + }, + "aws.protocols#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "aws.protocols#awsJson1_0": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocols#HttpConfiguration" + } + ], + "members": {}, + "traits": { + "smithy.api#documentation": "An RPC-based protocol that sends JSON payloads. This protocol does not use\nHTTP binding traits.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#timestampFormat", + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel" + ] + }, + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.protocoltests.json10#ClientOptionalDefaults": { + "type": "structure", + "members": { + "member": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#default": 0 + } + } + } + }, + "aws.protocoltests.json10#ComplexError": { + "type": "structure", + "members": { + "TopLevel": { + "target": "smithy.api#String" + }, + "Nested": { + "target": "aws.protocoltests.json10#ComplexNestedErrorData" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when a request is invalid.", + "smithy.api#error": "client" + } + }, + "aws.protocoltests.json10#ComplexNestedErrorData": { + "type": "structure", + "members": { + "Foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "Fooooo" + } + } + } + }, + "aws.protocoltests.json10#ContentTypeParameters": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json10#ContentTypeParametersInput" + }, + "output": { + "target": "aws.protocoltests.json10#ContentTypeParametersOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how servers must support requests\ncontaining a `Content-Type` header with parameters." + } + }, + "aws.protocoltests.json10#ContentTypeParametersInput": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#Integer" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.json10#ContentTypeParametersOutput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.json10#Defaults": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.json10#DefaultsMixin" + } + ], + "members": {} + }, + "aws.protocoltests.json10#DefaultsMixin": { + "type": "structure", + "members": { + "defaultString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "hi" + } + }, + "defaultBoolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#default": true + } + }, + "defaultList": { + "target": "aws.protocoltests.json10#TestStringList", + "traits": { + "smithy.api#default": [] + } + }, + "defaultDocumentMap": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#default": {} + } + }, + "defaultDocumentString": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#default": "hi" + } + }, + "defaultDocumentBoolean": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#default": true + } + }, + "defaultDocumentList": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#default": [] + } + }, + "defaultNullDocument": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#default": null + } + }, + "defaultTimestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#default": 0 + } + }, + "defaultBlob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#default": "YWJj" + } + }, + "defaultByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#default": 1 + } + }, + "defaultShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#default": 1 + } + }, + "defaultInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 10 + } + }, + "defaultLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#default": 100 + } + }, + "defaultFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#default": 1.0 + } + }, + "defaultDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#default": 1.0 + } + }, + "defaultMap": { + "target": "aws.protocoltests.json10#TestStringMap", + "traits": { + "smithy.api#default": {} + } + }, + "defaultEnum": { + "target": "aws.protocoltests.json10#TestEnum", + "traits": { + "smithy.api#default": "FOO" + } + }, + "defaultIntEnum": { + "target": "aws.protocoltests.json10#TestIntEnum", + "traits": { + "smithy.api#default": 1 + } + }, + "emptyString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "" + } + }, + "falseBoolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#default": false + } + }, + "emptyBlob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#default": "" + } + }, + "zeroByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#default": 0.0 + } + }, + "zeroDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#default": 0.0 + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.json10#Dialog": { + "type": "structure", + "members": { + "language": { + "target": "smithy.api#String" + }, + "greeting": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "hi" + } + }, + "farewell": { + "target": "aws.protocoltests.json10#Farewell" + } + } + }, + "aws.protocoltests.json10#DialogList": { + "type": "list", + "member": { + "target": "aws.protocoltests.json10#Dialog" + } + }, + "aws.protocoltests.json10#DialogMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.json10#Dialog" + } + }, + "aws.protocoltests.json10#EmptyInputAndEmptyOutput": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json10#EmptyInputAndEmptyOutputInput" + }, + "output": { + "target": "aws.protocoltests.json10#EmptyInputAndEmptyOutputOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request or response payload because the operation has an empty input\nand empty output structure that reuses the same shape. While this should\nbe rare, code generators must support this." + } + }, + "aws.protocoltests.json10#EmptyInputAndEmptyOutputInput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.json10#EmptyInputAndEmptyOutputOutput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.json10#EndpointOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#endpoint": { + "hostPrefix": "foo." + } + } + }, + "aws.protocoltests.json10#EndpointWithHostLabelOperation": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json10#EndpointWithHostLabelOperationInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#endpoint": { + "hostPrefix": "foo.{label}." + } + } + }, + "aws.protocoltests.json10#EndpointWithHostLabelOperationInput": { + "type": "structure", + "members": { + "label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#hostLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.json10#Farewell": { + "type": "structure", + "members": { + "phrase": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "bye" + } + } + } + }, + "aws.protocoltests.json10#FooError": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "This error has test cases that test some of the dark corners of Amazon service\nframework history. It should only be implemented by clients.", + "smithy.api#error": "server", + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.json10#GreetingWithErrors": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json10#GreetingWithErrorsInput" + }, + "output": { + "target": "aws.protocoltests.json10#GreetingWithErrorsOutput" + }, + "errors": [ + { + "target": "aws.protocoltests.json10#ComplexError" + }, + { + "target": "aws.protocoltests.json10#FooError" + }, + { + "target": "aws.protocoltests.json10#InvalidGreeting" + } + ], + "traits": { + "smithy.api#documentation": "This operation has three possible return values:\n\n1. A successful response in the form of GreetingWithErrorsOutput\n2. An InvalidGreeting error.\n3. A ComplexError error.\n\nImplementations must be able to successfully take a response and\nproperly deserialize successful and error responses.", + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.json10#GreetingWithErrorsInput": { + "type": "structure", + "members": { + "greeting": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.json10#GreetingWithErrorsOutput": { + "type": "structure", + "members": { + "greeting": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.json10#HostWithPathOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": {} + }, + "aws.protocoltests.json10#InvalidGreeting": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when an invalid greeting value is provided.", + "smithy.api#error": "client" + } + }, + "aws.protocoltests.json10#JsonRpc10": { + "type": "service", + "version": "2020-07-14", + "operations": [ + { + "target": "aws.protocoltests.json10#ContentTypeParameters" + }, + { + "target": "aws.protocoltests.json10#EmptyInputAndEmptyOutput" + }, + { + "target": "aws.protocoltests.json10#EndpointOperation" + }, + { + "target": "aws.protocoltests.json10#EndpointWithHostLabelOperation" + }, + { + "target": "aws.protocoltests.json10#GreetingWithErrors" + }, + { + "target": "aws.protocoltests.json10#HostWithPathOperation" + }, + { + "target": "aws.protocoltests.json10#JsonUnions" + }, + { + "target": "aws.protocoltests.json10#NoInputAndNoOutput" + }, + { + "target": "aws.protocoltests.json10#NoInputAndOutput" + }, + { + "target": "aws.protocoltests.json10#OperationWithDefaults" + }, + { + "target": "aws.protocoltests.json10#OperationWithNestedStructure" + }, + { + "target": "aws.protocoltests.json10#OperationWithRequiredMembers" + }, + { + "target": "aws.protocoltests.json10#OperationWithRequiredMembersWithDefaults" + }, + { + "target": "aws.protocoltests.json10#PutWithContentEncoding" + }, + { + "target": "aws.protocoltests.json10#QueryIncompatibleOperation" + }, + { + "target": "aws.protocoltests.json10#SimpleScalarProperties" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "JSON RPC 10" + }, + "aws.auth#sigv4": { + "name": "jsonrpc10" + }, + "aws.protocols#awsJson1_0": {}, + "smithy.api#title": "Sample Json 1.0 Protocol Service" + } + }, + "aws.protocoltests.json10#JsonUnions": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json10#JsonUnionsInput" + }, + "output": { + "target": "aws.protocoltests.json10#JsonUnionsOutput" + }, + "traits": { + "smithy.api#documentation": "This operation uses unions for inputs and outputs.", + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.json10#JsonUnionsInput": { + "type": "structure", + "members": { + "contents": { + "target": "aws.protocoltests.json10#MyUnion" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.json10#JsonUnionsOutput": { + "type": "structure", + "members": { + "contents": { + "target": "aws.protocoltests.json10#MyUnion" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.json10#MyUnion": { + "type": "union", + "members": { + "stringValue": { + "target": "smithy.api#String" + }, + "booleanValue": { + "target": "smithy.api#Boolean" + }, + "numberValue": { + "target": "smithy.api#Integer" + }, + "blobValue": { + "target": "smithy.api#Blob" + }, + "timestampValue": { + "target": "smithy.api#Timestamp" + }, + "enumValue": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "intEnumValue": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "listValue": { + "target": "aws.protocoltests.shared#StringList" + }, + "mapValue": { + "target": "aws.protocoltests.shared#StringMap" + }, + "structureValue": { + "target": "aws.protocoltests.shared#GreetingStruct" + } + }, + "traits": { + "smithy.api#documentation": "A union with a representative set of types for members." + } + }, + "aws.protocoltests.json10#NestedDefaultsMixin": { + "type": "structure", + "members": { + "dialog": { + "target": "aws.protocoltests.json10#Dialog", + "traits": { + "smithy.api#required": {} + } + }, + "dialogList": { + "target": "aws.protocoltests.json10#DialogList", + "traits": { + "smithy.api#default": [] + } + }, + "dialogMap": { + "target": "aws.protocoltests.json10#DialogMap", + "traits": { + "smithy.api#default": {} + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.json10#NoInputAndNoOutput": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request or response payload because the operation has no input or output.\nWhile this should be rare, code generators must support this." + } + }, + "aws.protocoltests.json10#NoInputAndOutput": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.json10#NoInputAndOutputOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request or response payload because the operation has no input and the\noutput is empty. While this should be rare, code generators must support\nthis." + } + }, + "aws.protocoltests.json10#NoInputAndOutputOutput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.json10#OperationWithDefaults": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json10#OperationWithDefaultsInput" + }, + "output": { + "target": "aws.protocoltests.json10#OperationWithDefaultsOutput" + }, + "traits": {} + }, + "aws.protocoltests.json10#OperationWithDefaultsInput": { + "type": "structure", + "members": { + "defaults": { + "target": "aws.protocoltests.json10#Defaults" + }, + "clientOptionalDefaults": { + "target": "aws.protocoltests.json10#ClientOptionalDefaults" + }, + "topLevelDefault": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "hi" + } + }, + "otherTopLevelDefault": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 0 + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.json10#OperationWithDefaultsOutput": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.json10#DefaultsMixin" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.json10#OperationWithNestedStructure": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json10#OperationWithNestedStructureInput" + }, + "output": { + "target": "aws.protocoltests.json10#OperationWithNestedStructureOutput" + }, + "traits": {} + }, + "aws.protocoltests.json10#OperationWithNestedStructureInput": { + "type": "structure", + "members": { + "topLevel": { + "target": "aws.protocoltests.json10#TopLevel", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.json10#OperationWithNestedStructureOutput": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.json10#NestedDefaultsMixin" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.json10#OperationWithRequiredMembers": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.json10#OperationWithRequiredMembersOutput" + }, + "traits": {} + }, + "aws.protocoltests.json10#OperationWithRequiredMembersOutput": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.json10#RequiredMembersMixin" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.json10#OperationWithRequiredMembersWithDefaults": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.json10#OperationWithRequiredMembersWithDefaultsOutput" + }, + "traits": {} + }, + "aws.protocoltests.json10#OperationWithRequiredMembersWithDefaultsOutput": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.json10#RequiredMembersWithDefaultsMixin" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.json10#PutWithContentEncoding": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json10#PutWithContentEncodingInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#requestCompression": { + "encodings": [ + "gzip" + ] + } + } + }, + "aws.protocoltests.json10#PutWithContentEncodingInput": { + "type": "structure", + "members": { + "encoding": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "data": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.json10#QueryIncompatibleOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.json10#RequiredEnum": { + "type": "enum", + "members": { + "FOO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FOO" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BAR" + } + }, + "BAZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BAZ" + } + } + } + }, + "aws.protocoltests.json10#RequiredIntEnum": { + "type": "intEnum", + "members": { + "ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 1 + } + }, + "TWO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 2 + } + } + } + }, + "aws.protocoltests.json10#RequiredMembersMixin": { + "type": "structure", + "members": { + "requiredString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "requiredBoolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + }, + "requiredList": { + "target": "aws.protocoltests.json10#RequiredStringList", + "traits": { + "smithy.api#required": {} + } + }, + "requiredTimestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#required": {} + } + }, + "requiredBlob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#required": {} + } + }, + "requiredByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#required": {} + } + }, + "requiredShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#required": {} + } + }, + "requiredInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "requiredLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#required": {} + } + }, + "requiredFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#required": {} + } + }, + "requiredDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#required": {} + } + }, + "requiredMap": { + "target": "aws.protocoltests.json10#RequiredStringMap", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.json10#RequiredMembersWithDefaultsMixin": { + "type": "structure", + "members": { + "requiredString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "hi", + "smithy.api#required": {} + } + }, + "requiredBoolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#default": true, + "smithy.api#required": {} + } + }, + "requiredList": { + "target": "aws.protocoltests.json10#RequiredStringList", + "traits": { + "smithy.api#default": [], + "smithy.api#required": {} + } + }, + "requiredTimestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#default": 1, + "smithy.api#required": {} + } + }, + "requiredBlob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#default": "YmxvYg==", + "smithy.api#required": {} + } + }, + "requiredByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#default": 1, + "smithy.api#required": {} + } + }, + "requiredShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#default": 1, + "smithy.api#required": {} + } + }, + "requiredInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 10, + "smithy.api#required": {} + } + }, + "requiredLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#default": 100, + "smithy.api#required": {} + } + }, + "requiredFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#default": 1.0, + "smithy.api#required": {} + } + }, + "requiredDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#default": 1.0, + "smithy.api#required": {} + } + }, + "requiredMap": { + "target": "aws.protocoltests.json10#RequiredStringMap", + "traits": { + "smithy.api#default": {}, + "smithy.api#required": {} + } + }, + "requiredEnum": { + "target": "aws.protocoltests.json10#RequiredEnum", + "traits": { + "smithy.api#default": "FOO", + "smithy.api#required": {} + } + }, + "requiredIntEnum": { + "target": "aws.protocoltests.json10#RequiredIntEnum", + "traits": { + "smithy.api#default": 1, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.json10#RequiredStringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.json10#RequiredStringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.json10#SimpleScalarProperties": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json10#SimpleScalarPropertiesInput" + }, + "output": { + "target": "aws.protocoltests.json10#SimpleScalarPropertiesOutput" + }, + "traits": {} + }, + "aws.protocoltests.json10#SimpleScalarPropertiesInput": { + "type": "structure", + "members": { + "floatValue": { + "target": "smithy.api#Float" + }, + "doubleValue": { + "target": "smithy.api#Double" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.json10#SimpleScalarPropertiesOutput": { + "type": "structure", + "members": { + "floatValue": { + "target": "smithy.api#Float" + }, + "doubleValue": { + "target": "smithy.api#Double" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.json10#TestEnum": { + "type": "enum", + "members": { + "FOO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FOO" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BAR" + } + }, + "BAZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BAZ" + } + } + } + }, + "aws.protocoltests.json10#TestIntEnum": { + "type": "intEnum", + "members": { + "ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 1 + } + }, + "TWO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 2 + } + } + } + }, + "aws.protocoltests.json10#TestStringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.json10#TestStringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.json10#TopLevel": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.json10#NestedDefaultsMixin" + } + ], + "members": {} + }, + "aws.protocoltests.shared#FooEnum": { + "type": "enum", + "members": { + "FOO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Foo" + } + }, + "BAZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Baz" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Bar" + } + }, + "ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "1" + } + }, + "ZERO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "0" + } + } + } + }, + "aws.protocoltests.shared#GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.shared#IntegerEnum": { + "type": "intEnum", + "members": { + "A": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 1 + } + }, + "B": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 2 + } + }, + "C": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 3 + } + } + } + }, + "aws.protocoltests.shared#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.shared#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "smithy.test#AppliesTo": { + "type": "enum", + "members": { + "CLIENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to client implementations.", + "smithy.api#enumValue": "client" + } + }, + "SERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to server implementations.", + "smithy.api#enumValue": "server" + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMessageMixin": { + "type": "structure", + "members": { + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of expected HTTP headers.\n\nHeaders that are not listed in this map are ignored unless they are\nexplicitly forbidden through `forbidHeaders`." + } + }, + "forbidHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must not appear in the serialized\nHTTP request." + } + }, + "requireHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must appear in the serialized\nHTTP message, but no assertion is made on the value.\n\nHeaders listed in `headers` do not need to appear in this list." + } + }, + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected HTTP message body.\n\nIf no request body is defined, then no assertions are made about\nthe body of the message." + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP message members and supporting protocol test members,\nsuitable for both requests and responses.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "method": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected serialized HTTP request method.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request-target of the HTTP request, not including\nthe query string (for example, \"/foo/bar\").", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint provided to the client, not including the path\nor scheme (for example, \"example.com\")." + } + }, + "resolvedHost": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint that the client should send to, not including\nthe path or scheme (for example, \"prefix.example.com\").\n\nThis can differ from the host provided to the client if the `hostPrefix`\nmember of the `endpoint` trait is set, for instance." + } + }, + "queryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of the expected serialized query string parameters.\n\nEach element in the list is a query string key value pair\nthat starts with the query string parameter name optionally\nfollowed by \"=\", optionally followed by the query string\nparameter value. For example, \"foo=bar\", \"foo=\", and \"foo\"\nare all valid values. The query string parameter name and\nthe value MUST appear in the format in which it is expected\nto be sent over the wire; if a key or value needs to be\npercent-encoded, then it MUST appear percent-encoded in this list.\n\nA serialized HTTP request is not in compliance with the protocol\nif any query string parameter defined in `queryParams` is not\ndefined in the request or if the value of a query string parameter\nin the request differs from the expected value.\n\n`queryParams` applies no constraints on additional query parameters." + } + }, + "forbidQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that must not appear in the\nserialized HTTP request.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + }, + "requireQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that MUST appear in the\nserialized request URI, but no assertion is made on the value.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP request members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpRequestMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpRequestTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's\npossible that specific authentication schemes might influence\nthe serialization logic of an HTTP request.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the input parameters used to generated the HTTP request.\n\nThese parameters MUST be compatible with the input of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "code": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Defines the HTTP response code.", + "smithy.api#range": { + "min": 100, + "max": 599 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP response members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpResponseMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpResponseTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The shape ID of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's possible\nthat specific authentication schemes might influence the serialization\nlogic of an HTTP response.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the output parameters deserialized from the HTTP response.\n\nThese parameters MUST be compatible with the output of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nresponse. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + }, + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyStringList": { + "type": "list", + "member": { + "target": "smithy.test#NonEmptyString" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + } + } +} diff --git a/scripts/codegen-output-py/models/aws-json-1-1.json b/scripts/codegen-output-py/models/aws-json-1-1.json new file mode 100644 index 000000000..a239cd6cf --- /dev/null +++ b/scripts/codegen-output-py/models/aws-json-1-1.json @@ -0,0 +1,1572 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "aws.api#ArnNamespace": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a service's ARN namespace.", + "smithy.api#pattern": "^[a-z0-9.\\-]{1,63}$", + "smithy.api#private": {} + } + }, + "aws.api#CloudFormationName": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a CloudFormation service name.", + "smithy.api#pattern": "^[A-Z][A-Za-z0-9]+$", + "smithy.api#private": {} + } + }, + "aws.api#CloudWatchMetricNamespace": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[^:].*$", + "smithy.api#private": {} + } + }, + "aws.api#service": { + "type": "structure", + "members": { + "sdkId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `sdkId` property is a required string value that specifies the AWS\nSDK service ID (e.g., \"API Gateway\"). This value is used for generating\nclient names in SDKs and for linking between services.", + "smithy.api#required": {} + } + }, + "arnNamespace": { + "target": "aws.api#ArnNamespace", + "traits": { + "smithy.api#documentation": "The `arnNamespace` property is a string value that defines the ARN service\nnamespace of the service (e.g., \"apigateway\"). This value is used in\nARNs assigned to resources in the service. If not set, this value\ndefaults to the lowercase name of the service shape." + } + }, + "cloudFormationName": { + "target": "aws.api#CloudFormationName", + "traits": { + "smithy.api#documentation": "The `cloudFormationName` property is a string value that specifies the\nAWS CloudFormation service name (e.g., `ApiGateway`). When not set,\nthis value defaults to the name of the service shape. This value is\npart of the CloudFormation resource type name that is automatically\nassigned to resources in the service (e.g., `AWS::::resourceName`)." + } + }, + "cloudTrailEventSource": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `cloudTrailEventSource` property is a string value that defines the\nAWS customer-facing eventSource property contained in CloudTrail event\nrecords emitted by the service. If not specified, this value defaults\nto the `arnNamespace` plus `.amazonaws.com`." + } + }, + "docId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `docId` property is a string value that defines the identifier\nused to implement linking between service and SDK documentation for\nAWS services. If not specified, this value defaults to the `sdkId` in\nlower case plus the service `version` property, separated by dashes." + } + }, + "endpointPrefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `endpointPrefix` property is a string value that identifies which\nendpoint in a given region should be used to connect to the service.\nFor example, most services in the AWS standard partition have endpoints\nwhich follow the format: `{endpointPrefix}.{region}.amazonaws.com`. A\nservice with the endpoint prefix example in the region us-west-2 might\nhave the endpoint example.us-west-2.amazonaws.com.\n\nThis value is not unique across services and is subject to change.\nTherefore, it MUST NOT be used for client naming or for any other\npurpose that requires a static, unique identifier. sdkId should be used\nfor those purposes. Additionally, this value can be used to attempt to\nresolve endpoints." + } + }, + "cloudWatchNamespace": { + "target": "aws.api#CloudWatchMetricNamespace", + "traits": { + "smithy.api#documentation": "The `cloudWatchNamespace` property is a string value that defines the\nAWS customer-facing namespace of most metrics emitted by the service." + } + } + }, + "traits": { + "smithy.api#documentation": "An AWS service is defined using the `aws.api#service` trait. This trait\nprovides information about the service like the name used to generate AWS\nSDK client classes and the namespace used in ARNs.", + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.auth#sigv4": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The signature version 4 service signing name to use in the credential\nscope when signing requests. This value SHOULD match the `arnNamespace`\nproperty of the `aws.api#service` trait if present and the `name`\nproperty of the `aws.api#sigv4a` trait if present.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html" + }, + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#authDefinition": {}, + "smithy.api#documentation": "[Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)\nis the process to add authentication information to AWS requests sent by HTTP. For\nsecurity, most requests to AWS must be signed with an access key, which consists\nof an access key ID and secret access key. These two keys are commonly referred to\nas your security credentials.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html" + }, + "smithy.api#trait": { + "selector": "service", + "breakingChanges": [ + { + "change": "remove", + "message": "Removing the existing authentication scheme is not backward compatible and can break existing clients' authentication." + } + ] + } + } + }, + "aws.protocols#HttpConfiguration": { + "type": "structure", + "members": { + "http": { + "target": "aws.protocols#StringList", + "traits": { + "smithy.api#documentation": "The priority ordered list of supported HTTP protocol versions." + } + }, + "eventStreamHttp": { + "target": "aws.protocols#StringList", + "traits": { + "smithy.api#documentation": "The priority ordered list of supported HTTP protocol versions that\nare required when using event streams with the service. If not set,\nthis value defaults to the value of the `http` member. Any entry in\n`eventStreamHttp` MUST also appear in `http`." + } + } + }, + "traits": { + "smithy.api#documentation": "Contains HTTP protocol configuration for HTTP-based protocols.", + "smithy.api#mixin": { + "localTraits": [ + "smithy.api#private" + ] + }, + "smithy.api#private": {} + } + }, + "aws.protocols#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "aws.protocols#awsJson1_1": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocols#HttpConfiguration" + } + ], + "members": {}, + "traits": { + "smithy.api#documentation": "An RPC-based protocol that sends JSON payloads. This protocol does not use\nHTTP binding traits.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#timestampFormat", + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel" + ] + }, + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.protocoltests.json#ComplexError": { + "type": "structure", + "members": { + "TopLevel": { + "target": "smithy.api#String" + }, + "Nested": { + "target": "aws.protocoltests.json#ComplexNestedErrorData" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when a request is invalid.", + "smithy.api#error": "client" + } + }, + "aws.protocoltests.json#ComplexNestedErrorData": { + "type": "structure", + "members": { + "Foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "Fooooo" + } + } + } + }, + "aws.protocoltests.json#ContentTypeParameters": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json#ContentTypeParametersInput" + }, + "output": { + "target": "aws.protocoltests.json#ContentTypeParametersOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how servers must support requests\ncontaining a `Content-Type` header with parameters." + } + }, + "aws.protocoltests.json#ContentTypeParametersInput": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#Integer" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.json#ContentTypeParametersOutput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.json#DatetimeOffsets": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.json#DatetimeOffsetsOutput" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.json#DatetimeOffsetsOutput": { + "type": "structure", + "members": { + "datetime": { + "target": "aws.protocoltests.shared#DateTime" + } + } + }, + "aws.protocoltests.json#Document": { + "type": "document" + }, + "aws.protocoltests.json#EmptyOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": {} + }, + "aws.protocoltests.json#EmptyStruct": { + "type": "structure", + "members": {} + }, + "aws.protocoltests.json#EndpointOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#endpoint": { + "hostPrefix": "foo." + } + } + }, + "aws.protocoltests.json#EndpointWithHostLabelOperation": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json#HostLabelInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#endpoint": { + "hostPrefix": "foo.{label}." + } + } + }, + "aws.protocoltests.json#ErrorWithMembers": { + "type": "structure", + "members": { + "Code": { + "target": "smithy.api#String" + }, + "ComplexData": { + "target": "aws.protocoltests.json#KitchenSink" + }, + "IntegerField": { + "target": "smithy.api#Integer" + }, + "ListField": { + "target": "aws.protocoltests.json#ListOfStrings" + }, + "MapField": { + "target": "aws.protocoltests.json#MapOfStrings" + }, + "Message": { + "target": "smithy.api#String" + }, + "StringField": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "abc" + } + } + }, + "traits": { + "smithy.api#error": "client" + } + }, + "aws.protocoltests.json#ErrorWithoutMembers": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#error": "server" + } + }, + "aws.protocoltests.json#FooError": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "This error has test cases that test some of the dark corners of Amazon service\nframework history. It should only be implemented by clients.", + "smithy.api#error": "server", + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.json#FractionalSeconds": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.json#FractionalSecondsOutput" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.json#FractionalSecondsOutput": { + "type": "structure", + "members": { + "datetime": { + "target": "aws.protocoltests.shared#DateTime" + } + } + }, + "aws.protocoltests.json#GreetingWithErrors": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.json#GreetingWithErrorsOutput" + }, + "errors": [ + { + "target": "aws.protocoltests.json#ComplexError" + }, + { + "target": "aws.protocoltests.json#FooError" + }, + { + "target": "aws.protocoltests.json#InvalidGreeting" + } + ], + "traits": { + "smithy.api#documentation": "This operation has three possible return values:\n\n1. A successful response in the form of GreetingWithErrorsOutput\n2. An InvalidGreeting error.\n3. A ComplexError error.\n\nImplementations must be able to successfully take a response and\nproperly deserialize successful and error responses.", + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.json#GreetingWithErrorsOutput": { + "type": "structure", + "members": { + "greeting": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.json#HostLabelInput": { + "type": "structure", + "members": { + "label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#hostLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.json#HostWithPathOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": {} + }, + "aws.protocoltests.json#InvalidGreeting": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when an invalid greeting value is provided.", + "smithy.api#error": "client" + } + }, + "aws.protocoltests.json#JsonEnums": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json#JsonEnumsInputOutput" + }, + "output": { + "target": "aws.protocoltests.json#JsonEnumsInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes enums as top level properties, in lists, sets, and maps.", + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.json#JsonEnumsInputOutput": { + "type": "structure", + "members": { + "fooEnum1": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnum2": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnum3": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnumList": { + "target": "aws.protocoltests.shared#FooEnumList" + }, + "fooEnumSet": { + "target": "aws.protocoltests.shared#FooEnumSet" + }, + "fooEnumMap": { + "target": "aws.protocoltests.shared#FooEnumMap" + } + } + }, + "aws.protocoltests.json#JsonIntEnums": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json#JsonIntEnumsInputOutput" + }, + "output": { + "target": "aws.protocoltests.json#JsonIntEnumsInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes intEnums as top level properties, in lists, sets, and maps.", + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.json#JsonIntEnumsInputOutput": { + "type": "structure", + "members": { + "intEnum1": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "intEnum2": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "intEnum3": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "intEnumList": { + "target": "aws.protocoltests.shared#IntegerEnumList" + }, + "intEnumSet": { + "target": "aws.protocoltests.shared#IntegerEnumSet" + }, + "intEnumMap": { + "target": "aws.protocoltests.shared#IntegerEnumMap" + } + } + }, + "aws.protocoltests.json#JsonProtocol": { + "type": "service", + "version": "2018-01-01", + "operations": [ + { + "target": "aws.protocoltests.json#ContentTypeParameters" + }, + { + "target": "aws.protocoltests.json#DatetimeOffsets" + }, + { + "target": "aws.protocoltests.json#EmptyOperation" + }, + { + "target": "aws.protocoltests.json#EndpointOperation" + }, + { + "target": "aws.protocoltests.json#EndpointWithHostLabelOperation" + }, + { + "target": "aws.protocoltests.json#FractionalSeconds" + }, + { + "target": "aws.protocoltests.json#GreetingWithErrors" + }, + { + "target": "aws.protocoltests.json#HostWithPathOperation" + }, + { + "target": "aws.protocoltests.json#JsonEnums" + }, + { + "target": "aws.protocoltests.json#JsonIntEnums" + }, + { + "target": "aws.protocoltests.json#JsonUnions" + }, + { + "target": "aws.protocoltests.json#KitchenSinkOperation" + }, + { + "target": "aws.protocoltests.json#NullOperation" + }, + { + "target": "aws.protocoltests.json#OperationWithOptionalInputOutput" + }, + { + "target": "aws.protocoltests.json#PutAndGetInlineDocuments" + }, + { + "target": "aws.protocoltests.json#PutWithContentEncoding" + }, + { + "target": "aws.protocoltests.json#SimpleScalarProperties" + }, + { + "target": "aws.protocoltests.json#SparseNullsOperation" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Json Protocol", + "arnNamespace": "jsonprotocol", + "cloudFormationName": "JsonProtocol", + "cloudTrailEventSource": "jsonprotocol.amazonaws.com" + }, + "aws.auth#sigv4": { + "name": "jsonprotocol" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#title": "Sample Json 1.1 Protocol Service" + } + }, + "aws.protocoltests.json#JsonUnions": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json#UnionInputOutput" + }, + "output": { + "target": "aws.protocoltests.json#UnionInputOutput" + }, + "traits": { + "smithy.api#documentation": "This operation uses unions for inputs and outputs.", + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.json#JsonValue": { + "type": "string", + "traits": { + "smithy.api#mediaType": "application/json" + } + }, + "aws.protocoltests.json#KitchenSink": { + "type": "structure", + "members": { + "Blob": { + "target": "smithy.api#Blob" + }, + "Boolean": { + "target": "smithy.api#Boolean" + }, + "Double": { + "target": "smithy.api#Double" + }, + "EmptyStruct": { + "target": "aws.protocoltests.json#EmptyStruct" + }, + "Float": { + "target": "smithy.api#Float" + }, + "HttpdateTimestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "Integer": { + "target": "smithy.api#Integer" + }, + "Iso8601Timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "JsonValue": { + "target": "aws.protocoltests.json#JsonValue" + }, + "ListOfLists": { + "target": "aws.protocoltests.json#ListOfListOfStrings" + }, + "ListOfMapsOfStrings": { + "target": "aws.protocoltests.json#ListOfMapsOfStrings" + }, + "ListOfStrings": { + "target": "aws.protocoltests.json#ListOfStrings" + }, + "ListOfStructs": { + "target": "aws.protocoltests.json#ListOfStructs" + }, + "Long": { + "target": "smithy.api#Long" + }, + "MapOfListsOfStrings": { + "target": "aws.protocoltests.json#MapOfListsOfStrings" + }, + "MapOfMaps": { + "target": "aws.protocoltests.json#MapOfMapOfStrings" + }, + "MapOfStrings": { + "target": "aws.protocoltests.json#MapOfStrings" + }, + "MapOfStructs": { + "target": "aws.protocoltests.json#MapOfStructs" + }, + "RecursiveList": { + "target": "aws.protocoltests.json#ListOfKitchenSinks" + }, + "RecursiveMap": { + "target": "aws.protocoltests.json#MapOfKitchenSinks" + }, + "RecursiveStruct": { + "target": "aws.protocoltests.json#KitchenSink" + }, + "SimpleStruct": { + "target": "aws.protocoltests.json#SimpleStruct" + }, + "String": { + "target": "smithy.api#String" + }, + "StructWithJsonName": { + "target": "aws.protocoltests.json#StructWithJsonName" + }, + "Timestamp": { + "target": "smithy.api#Timestamp" + }, + "UnixTimestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "epoch-seconds" + } + } + } + }, + "aws.protocoltests.json#KitchenSinkOperation": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json#KitchenSink" + }, + "output": { + "target": "aws.protocoltests.json#KitchenSink" + }, + "errors": [ + { + "target": "aws.protocoltests.json#ErrorWithMembers" + }, + { + "target": "aws.protocoltests.json#ErrorWithoutMembers" + } + ], + "traits": {} + }, + "aws.protocoltests.json#ListOfKitchenSinks": { + "type": "list", + "member": { + "target": "aws.protocoltests.json#KitchenSink" + } + }, + "aws.protocoltests.json#ListOfListOfStrings": { + "type": "list", + "member": { + "target": "aws.protocoltests.json#ListOfStrings" + } + }, + "aws.protocoltests.json#ListOfMapsOfStrings": { + "type": "list", + "member": { + "target": "aws.protocoltests.json#MapOfStrings" + } + }, + "aws.protocoltests.json#ListOfStrings": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.json#ListOfStructs": { + "type": "list", + "member": { + "target": "aws.protocoltests.json#SimpleStruct" + } + }, + "aws.protocoltests.json#MapOfKitchenSinks": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.json#KitchenSink" + } + }, + "aws.protocoltests.json#MapOfListsOfStrings": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.json#ListOfStrings" + } + }, + "aws.protocoltests.json#MapOfMapOfStrings": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.json#MapOfStrings" + } + }, + "aws.protocoltests.json#MapOfStrings": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.json#MapOfStructs": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.json#SimpleStruct" + } + }, + "aws.protocoltests.json#MyUnion": { + "type": "union", + "members": { + "stringValue": { + "target": "smithy.api#String" + }, + "booleanValue": { + "target": "smithy.api#Boolean" + }, + "numberValue": { + "target": "smithy.api#Integer" + }, + "blobValue": { + "target": "smithy.api#Blob" + }, + "timestampValue": { + "target": "smithy.api#Timestamp" + }, + "enumValue": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "listValue": { + "target": "aws.protocoltests.shared#StringList" + }, + "mapValue": { + "target": "aws.protocoltests.shared#StringMap" + }, + "structureValue": { + "target": "aws.protocoltests.shared#GreetingStruct" + } + }, + "traits": { + "smithy.api#documentation": "A union with a representative set of types for members." + } + }, + "aws.protocoltests.json#NullOperation": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json#NullOperationInputOutput" + }, + "output": { + "target": "aws.protocoltests.json#NullOperationInputOutput" + }, + "traits": {} + }, + "aws.protocoltests.json#NullOperationInputOutput": { + "type": "structure", + "members": { + "string": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.json#OperationWithOptionalInputOutput": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json#OperationWithOptionalInputOutputInput" + }, + "output": { + "target": "aws.protocoltests.json#OperationWithOptionalInputOutputOutput" + }, + "traits": {} + }, + "aws.protocoltests.json#OperationWithOptionalInputOutputInput": { + "type": "structure", + "members": { + "Value": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.json#OperationWithOptionalInputOutputOutput": { + "type": "structure", + "members": { + "Value": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.json#PutAndGetInlineDocuments": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json#PutAndGetInlineDocumentsInputOutput" + }, + "output": { + "target": "aws.protocoltests.json#PutAndGetInlineDocumentsInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes an inline document as part of the payload." + } + }, + "aws.protocoltests.json#PutAndGetInlineDocumentsInputOutput": { + "type": "structure", + "members": { + "inlineDocument": { + "target": "aws.protocoltests.json#Document" + } + } + }, + "aws.protocoltests.json#PutWithContentEncoding": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json#PutWithContentEncodingInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#requestCompression": { + "encodings": [ + "gzip" + ] + } + } + }, + "aws.protocoltests.json#PutWithContentEncodingInput": { + "type": "structure", + "members": { + "encoding": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "data": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.json#SimpleScalarProperties": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json#SimpleScalarPropertiesInputOutput" + }, + "output": { + "target": "aws.protocoltests.json#SimpleScalarPropertiesInputOutput" + }, + "traits": {} + }, + "aws.protocoltests.json#SimpleScalarPropertiesInputOutput": { + "type": "structure", + "members": { + "floatValue": { + "target": "smithy.api#Float" + }, + "doubleValue": { + "target": "smithy.api#Double" + } + } + }, + "aws.protocoltests.json#SimpleStruct": { + "type": "structure", + "members": { + "Value": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.json#SparseNullsOperation": { + "type": "operation", + "input": { + "target": "aws.protocoltests.json#SparseNullsOperationInputOutput" + }, + "output": { + "target": "aws.protocoltests.json#SparseNullsOperationInputOutput" + }, + "traits": {} + }, + "aws.protocoltests.json#SparseNullsOperationInputOutput": { + "type": "structure", + "members": { + "sparseStringList": { + "target": "aws.protocoltests.shared#SparseStringList" + }, + "sparseStringMap": { + "target": "aws.protocoltests.shared#SparseStringMap" + } + } + }, + "aws.protocoltests.json#StructWithJsonName": { + "type": "structure", + "members": { + "Value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "RenamedMember" + } + } + } + }, + "aws.protocoltests.json#UnionInputOutput": { + "type": "structure", + "members": { + "contents": { + "target": "aws.protocoltests.json#MyUnion" + } + }, + "traits": { + "smithy.api#documentation": "A shared structure that contains a single union member." + } + }, + "aws.protocoltests.shared#DateTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "aws.protocoltests.shared#FooEnum": { + "type": "enum", + "members": { + "FOO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Foo" + } + }, + "BAZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Baz" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Bar" + } + }, + "ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "1" + } + }, + "ZERO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "0" + } + } + } + }, + "aws.protocoltests.shared#FooEnumList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#FooEnum" + } + }, + "aws.protocoltests.shared#FooEnumMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#FooEnum" + } + }, + "aws.protocoltests.shared#FooEnumSet": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.shared#IntegerEnum": { + "type": "intEnum", + "members": { + "A": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 1 + } + }, + "B": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 2 + } + }, + "C": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 3 + } + } + } + }, + "aws.protocoltests.shared#IntegerEnumList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#IntegerEnum" + } + }, + "aws.protocoltests.shared#IntegerEnumMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#IntegerEnum" + } + }, + "aws.protocoltests.shared#IntegerEnumSet": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#SparseStringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "aws.protocoltests.shared#SparseStringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "aws.protocoltests.shared#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.shared#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "smithy.test#AppliesTo": { + "type": "enum", + "members": { + "CLIENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to client implementations.", + "smithy.api#enumValue": "client" + } + }, + "SERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to server implementations.", + "smithy.api#enumValue": "server" + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMessageMixin": { + "type": "structure", + "members": { + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of expected HTTP headers.\n\nHeaders that are not listed in this map are ignored unless they are\nexplicitly forbidden through `forbidHeaders`." + } + }, + "forbidHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must not appear in the serialized\nHTTP request." + } + }, + "requireHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must appear in the serialized\nHTTP message, but no assertion is made on the value.\n\nHeaders listed in `headers` do not need to appear in this list." + } + }, + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected HTTP message body.\n\nIf no request body is defined, then no assertions are made about\nthe body of the message." + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP message members and supporting protocol test members,\nsuitable for both requests and responses.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "method": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected serialized HTTP request method.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request-target of the HTTP request, not including\nthe query string (for example, \"/foo/bar\").", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint provided to the client, not including the path\nor scheme (for example, \"example.com\")." + } + }, + "resolvedHost": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint that the client should send to, not including\nthe path or scheme (for example, \"prefix.example.com\").\n\nThis can differ from the host provided to the client if the `hostPrefix`\nmember of the `endpoint` trait is set, for instance." + } + }, + "queryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of the expected serialized query string parameters.\n\nEach element in the list is a query string key value pair\nthat starts with the query string parameter name optionally\nfollowed by \"=\", optionally followed by the query string\nparameter value. For example, \"foo=bar\", \"foo=\", and \"foo\"\nare all valid values. The query string parameter name and\nthe value MUST appear in the format in which it is expected\nto be sent over the wire; if a key or value needs to be\npercent-encoded, then it MUST appear percent-encoded in this list.\n\nA serialized HTTP request is not in compliance with the protocol\nif any query string parameter defined in `queryParams` is not\ndefined in the request or if the value of a query string parameter\nin the request differs from the expected value.\n\n`queryParams` applies no constraints on additional query parameters." + } + }, + "forbidQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that must not appear in the\nserialized HTTP request.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + }, + "requireQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that MUST appear in the\nserialized request URI, but no assertion is made on the value.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP request members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpRequestMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpRequestTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's\npossible that specific authentication schemes might influence\nthe serialization logic of an HTTP request.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the input parameters used to generated the HTTP request.\n\nThese parameters MUST be compatible with the input of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "code": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Defines the HTTP response code.", + "smithy.api#range": { + "min": 100, + "max": 599 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP response members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpResponseMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpResponseTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The shape ID of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's possible\nthat specific authentication schemes might influence the serialization\nlogic of an HTTP response.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the output parameters deserialized from the HTTP response.\n\nThese parameters MUST be compatible with the output of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nresponse. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + }, + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyStringList": { + "type": "list", + "member": { + "target": "smithy.test#NonEmptyString" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + } + } +} diff --git a/scripts/codegen-output-py/models/aws-query.json b/scripts/codegen-output-py/models/aws-query.json new file mode 100644 index 000000000..595adbf40 --- /dev/null +++ b/scripts/codegen-output-py/models/aws-query.json @@ -0,0 +1,2145 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "aws.api#ArnNamespace": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a service's ARN namespace.", + "smithy.api#pattern": "^[a-z0-9.\\-]{1,63}$", + "smithy.api#private": {} + } + }, + "aws.api#CloudFormationName": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a CloudFormation service name.", + "smithy.api#pattern": "^[A-Z][A-Za-z0-9]+$", + "smithy.api#private": {} + } + }, + "aws.api#CloudWatchMetricNamespace": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[^:].*$", + "smithy.api#private": {} + } + }, + "aws.api#service": { + "type": "structure", + "members": { + "sdkId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `sdkId` property is a required string value that specifies the AWS\nSDK service ID (e.g., \"API Gateway\"). This value is used for generating\nclient names in SDKs and for linking between services.", + "smithy.api#required": {} + } + }, + "arnNamespace": { + "target": "aws.api#ArnNamespace", + "traits": { + "smithy.api#documentation": "The `arnNamespace` property is a string value that defines the ARN service\nnamespace of the service (e.g., \"apigateway\"). This value is used in\nARNs assigned to resources in the service. If not set, this value\ndefaults to the lowercase name of the service shape." + } + }, + "cloudFormationName": { + "target": "aws.api#CloudFormationName", + "traits": { + "smithy.api#documentation": "The `cloudFormationName` property is a string value that specifies the\nAWS CloudFormation service name (e.g., `ApiGateway`). When not set,\nthis value defaults to the name of the service shape. This value is\npart of the CloudFormation resource type name that is automatically\nassigned to resources in the service (e.g., `AWS::::resourceName`)." + } + }, + "cloudTrailEventSource": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `cloudTrailEventSource` property is a string value that defines the\nAWS customer-facing eventSource property contained in CloudTrail event\nrecords emitted by the service. If not specified, this value defaults\nto the `arnNamespace` plus `.amazonaws.com`." + } + }, + "docId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `docId` property is a string value that defines the identifier\nused to implement linking between service and SDK documentation for\nAWS services. If not specified, this value defaults to the `sdkId` in\nlower case plus the service `version` property, separated by dashes." + } + }, + "endpointPrefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `endpointPrefix` property is a string value that identifies which\nendpoint in a given region should be used to connect to the service.\nFor example, most services in the AWS standard partition have endpoints\nwhich follow the format: `{endpointPrefix}.{region}.amazonaws.com`. A\nservice with the endpoint prefix example in the region us-west-2 might\nhave the endpoint example.us-west-2.amazonaws.com.\n\nThis value is not unique across services and is subject to change.\nTherefore, it MUST NOT be used for client naming or for any other\npurpose that requires a static, unique identifier. sdkId should be used\nfor those purposes. Additionally, this value can be used to attempt to\nresolve endpoints." + } + }, + "cloudWatchNamespace": { + "target": "aws.api#CloudWatchMetricNamespace", + "traits": { + "smithy.api#documentation": "The `cloudWatchNamespace` property is a string value that defines the\nAWS customer-facing namespace of most metrics emitted by the service." + } + } + }, + "traits": { + "smithy.api#documentation": "An AWS service is defined using the `aws.api#service` trait. This trait\nprovides information about the service like the name used to generate AWS\nSDK client classes and the namespace used in ARNs.", + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.auth#sigv4": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The signature version 4 service signing name to use in the credential\nscope when signing requests. This value SHOULD match the `arnNamespace`\nproperty of the `aws.api#service` trait if present and the `name`\nproperty of the `aws.api#sigv4a` trait if present.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html" + }, + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#authDefinition": {}, + "smithy.api#documentation": "[Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)\nis the process to add authentication information to AWS requests sent by HTTP. For\nsecurity, most requests to AWS must be signed with an access key, which consists\nof an access key ID and secret access key. These two keys are commonly referred to\nas your security credentials.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html" + }, + "smithy.api#trait": { + "selector": "service", + "breakingChanges": [ + { + "change": "remove", + "message": "Removing the existing authentication scheme is not backward compatible and can break existing clients' authentication." + } + ] + } + } + }, + "aws.protocols#awsQuery": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#deprecated": {}, + "smithy.api#documentation": "An RPC-based protocol that sends 'POST' requests in the body as\n`x-www-form-urlencoded` strings and responses in XML documents. This\nprotocol does not use HTTP binding traits.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#timestampFormat", + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel", + "aws.protocols#awsQueryError", + "smithy.api#xmlAttribute", + "smithy.api#xmlFlattened", + "smithy.api#xmlName", + "smithy.api#xmlNamespace" + ] + }, + "smithy.api#trait": { + "selector": "service [trait|xmlNamespace]" + }, + "smithy.api#traitValidators": { + "UnsupportedProtocolDocument": { + "selector": "~> member :test(> document)", + "message": "Document types are not supported with awsQuery" + } + } + } + }, + "aws.protocols#awsQueryError": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The value used to distinguish this error shape during serialization.", + "smithy.api#required": {} + } + }, + "httpResponseCode": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The HTTP response code used on a response containing this error shape.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Provides the value in the 'Code' distinguishing field and HTTP response\ncode for an operation error.", + "smithy.api#trait": { + "selector": "structure [trait|error]", + "breakingChanges": [ + { + "change": "any" + } + ] + } + } + }, + "aws.protocoltests.config#ErrorCodeParams": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The error code exposed to the customer.\n\nIf the SDK exposes the error code to customers, this value MUST be\nasserted to match the exposed error code.\n\nThis is modifiable by the awsQueryError trait. For services with\nawsQueryCompatible, it will be exposed in the `x-amzn-query-error`\nheader which takes the form `Code;Fault`. This value represents\nthe `Code` portion.", + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The query error type exposed to the customer.\n\nIf the SDK exposes the query error type to customers, this value MUST be\nasserted to match the exposed query error type.\n\nThis is modifiable by the awsQueryError trait. For services with\nawsQueryCompatible, it will be exposed in the `x-amzn-query-error`\nheader which takes the form `Code;Fault`. This value represents\nthe `Fault` portion." + } + } + }, + "traits": { + "smithy.api#documentation": "Vendor params to use when making assertions about error code or query\nerror type." + } + }, + "aws.protocoltests.query#AwsQuery": { + "type": "service", + "version": "2020-01-08", + "operations": [ + { + "target": "aws.protocoltests.query#DatetimeOffsets" + }, + { + "target": "aws.protocoltests.query#EmptyInputAndEmptyOutput" + }, + { + "target": "aws.protocoltests.query#EndpointOperation" + }, + { + "target": "aws.protocoltests.query#EndpointWithHostLabelOperation" + }, + { + "target": "aws.protocoltests.query#FlattenedXmlMap" + }, + { + "target": "aws.protocoltests.query#FlattenedXmlMapWithXmlName" + }, + { + "target": "aws.protocoltests.query#FlattenedXmlMapWithXmlNamespace" + }, + { + "target": "aws.protocoltests.query#FractionalSeconds" + }, + { + "target": "aws.protocoltests.query#GreetingWithErrors" + }, + { + "target": "aws.protocoltests.query#HostWithPathOperation" + }, + { + "target": "aws.protocoltests.query#IgnoresWrappingXmlName" + }, + { + "target": "aws.protocoltests.query#NestedStructures" + }, + { + "target": "aws.protocoltests.query#NoInputAndNoOutput" + }, + { + "target": "aws.protocoltests.query#NoInputAndOutput" + }, + { + "target": "aws.protocoltests.query#PutWithContentEncoding" + }, + { + "target": "aws.protocoltests.query#QueryIdempotencyTokenAutoFill" + }, + { + "target": "aws.protocoltests.query#QueryLists" + }, + { + "target": "aws.protocoltests.query#QueryMaps" + }, + { + "target": "aws.protocoltests.query#QueryTimestamps" + }, + { + "target": "aws.protocoltests.query#RecursiveXmlShapes" + }, + { + "target": "aws.protocoltests.query#SimpleInputParams" + }, + { + "target": "aws.protocoltests.query#SimpleScalarXmlProperties" + }, + { + "target": "aws.protocoltests.query#XmlBlobs" + }, + { + "target": "aws.protocoltests.query#XmlEmptyBlobs" + }, + { + "target": "aws.protocoltests.query#XmlEmptyLists" + }, + { + "target": "aws.protocoltests.query#XmlEmptyMaps" + }, + { + "target": "aws.protocoltests.query#XmlEnums" + }, + { + "target": "aws.protocoltests.query#XmlIntEnums" + }, + { + "target": "aws.protocoltests.query#XmlLists" + }, + { + "target": "aws.protocoltests.query#XmlMaps" + }, + { + "target": "aws.protocoltests.query#XmlMapsXmlName" + }, + { + "target": "aws.protocoltests.query#XmlNamespaces" + }, + { + "target": "aws.protocoltests.query#XmlTimestamps" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Query Protocol" + }, + "aws.auth#sigv4": { + "name": "awsquery" + }, + "aws.protocols#awsQuery": {}, + "smithy.api#documentation": "A query service that sends query requests and XML responses.", + "smithy.api#title": "Sample Query Protocol Service", + "smithy.api#xmlNamespace": { + "uri": "https://example.com/" + } + } + }, + "aws.protocoltests.query#ComplexError": { + "type": "structure", + "members": { + "TopLevel": { + "target": "smithy.api#String" + }, + "Nested": { + "target": "aws.protocoltests.query#ComplexNestedErrorData" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when a request is invalid.", + "smithy.api#error": "client" + } + }, + "aws.protocoltests.query#ComplexMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#GreetingStruct" + } + }, + "aws.protocoltests.query#ComplexNestedErrorData": { + "type": "structure", + "members": { + "Foo": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.query#CustomCodeError": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "Customized", + "httpResponseCode": 402 + }, + "smithy.api#error": "client" + } + }, + "aws.protocoltests.query#DatetimeOffsets": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#DatetimeOffsetsOutput" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.query#DatetimeOffsetsOutput": { + "type": "structure", + "members": { + "datetime": { + "target": "aws.protocoltests.shared#DateTime" + } + } + }, + "aws.protocoltests.query#EmptyInputAndEmptyOutput": { + "type": "operation", + "input": { + "target": "aws.protocoltests.query#EmptyInputAndEmptyOutputInput" + }, + "output": { + "target": "aws.protocoltests.query#EmptyInputAndEmptyOutputOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request or response members.\n\nWhile this should be rare, code generators must support this." + } + }, + "aws.protocoltests.query#EmptyInputAndEmptyOutputInput": { + "type": "structure", + "members": {} + }, + "aws.protocoltests.query#EmptyInputAndEmptyOutputOutput": { + "type": "structure", + "members": {} + }, + "aws.protocoltests.query#EndpointOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#endpoint": { + "hostPrefix": "foo." + } + } + }, + "aws.protocoltests.query#EndpointWithHostLabelOperation": { + "type": "operation", + "input": { + "target": "aws.protocoltests.query#HostLabelInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#endpoint": { + "hostPrefix": "foo.{label}." + } + } + }, + "aws.protocoltests.query#FlattenedXmlMap": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#FlattenedXmlMapOutput" + }, + "traits": { + "smithy.api#documentation": "Flattened maps" + } + }, + "aws.protocoltests.query#FlattenedXmlMapOutput": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.shared#FooEnumMap", + "traits": { + "smithy.api#xmlFlattened": {} + } + } + } + }, + "aws.protocoltests.query#FlattenedXmlMapWithXmlName": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#FlattenedXmlMapWithXmlNameOutput" + }, + "traits": { + "smithy.api#documentation": "Flattened maps with @xmlName" + } + }, + "aws.protocoltests.query#FlattenedXmlMapWithXmlNameOutput": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.query#FlattenedXmlMapWithXmlNameOutputMap", + "traits": { + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "KVP" + } + } + } + }, + "aws.protocoltests.query#FlattenedXmlMapWithXmlNameOutputMap": { + "type": "map", + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "K" + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "V" + } + } + }, + "aws.protocoltests.query#FlattenedXmlMapWithXmlNamespace": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#FlattenedXmlMapWithXmlNamespaceOutput" + }, + "traits": { + "smithy.api#documentation": "Flattened maps with @xmlNamespace and @xmlName" + } + }, + "aws.protocoltests.query#FlattenedXmlMapWithXmlNamespaceOutput": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.query#FlattenedXmlMapWithXmlNamespaceOutputMap", + "traits": { + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "KVP", + "smithy.api#xmlNamespace": { + "uri": "https://the-member.example.com" + } + } + } + } + }, + "aws.protocoltests.query#FlattenedXmlMapWithXmlNamespaceOutputMap": { + "type": "map", + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "K", + "smithy.api#xmlNamespace": { + "uri": "https://the-key.example.com" + } + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "V", + "smithy.api#xmlNamespace": { + "uri": "https://the-value.example.com" + } + } + } + }, + "aws.protocoltests.query#FractionalSeconds": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#FractionalSecondsOutput" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.query#FractionalSecondsOutput": { + "type": "structure", + "members": { + "datetime": { + "target": "aws.protocoltests.shared#DateTime" + } + } + }, + "aws.protocoltests.query#GreetingWithErrors": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#GreetingWithErrorsOutput" + }, + "errors": [ + { + "target": "aws.protocoltests.query#ComplexError" + }, + { + "target": "aws.protocoltests.query#CustomCodeError" + }, + { + "target": "aws.protocoltests.query#InvalidGreeting" + } + ], + "traits": { + "smithy.api#documentation": "This operation has three possible return values:\n\n1. A successful response in the form of GreetingWithErrorsOutput\n2. An InvalidGreeting error.\n3. A BadRequest error." + } + }, + "aws.protocoltests.query#GreetingWithErrorsOutput": { + "type": "structure", + "members": { + "greeting": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.query#HostLabelInput": { + "type": "structure", + "members": { + "label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#hostLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.query#HostWithPathOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": {} + }, + "aws.protocoltests.query#IgnoresWrappingXmlName": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#IgnoresWrappingXmlNameOutput" + }, + "traits": { + "smithy.api#documentation": "The xmlName trait on the output structure is ignored in AWS Query.\n\nThe wrapping element is always operation name + \"Response\", and\ninside of that wrapper is another wrapper named operation name + \"Result\"." + } + }, + "aws.protocoltests.query#IgnoresWrappingXmlNameOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#xmlName": "IgnoreMe" + } + }, + "aws.protocoltests.query#InvalidGreeting": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when an invalid greeting value is provided.", + "smithy.api#error": "client" + } + }, + "aws.protocoltests.query#ListWithMemberNamespace": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlNamespace": { + "uri": "https://xml-member.example.com" + } + } + }, + "traits": { + "smithy.api#xmlNamespace": { + "uri": "https://xml-list.example.com" + } + } + }, + "aws.protocoltests.query#ListWithNamespace": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#xmlNamespace": { + "uri": "https://xml-list.example.com" + } + } + }, + "aws.protocoltests.query#ListWithXmlName": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, + "aws.protocoltests.query#MapOfLists": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#StringList" + } + }, + "aws.protocoltests.query#MapWithXmlName": { + "type": "map", + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "K" + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "V" + } + } + }, + "aws.protocoltests.query#NestedStructWithList": { + "type": "structure", + "members": { + "ListArg": { + "target": "aws.protocoltests.shared#StringList" + } + } + }, + "aws.protocoltests.query#NestedStructWithMap": { + "type": "structure", + "members": { + "MapArg": { + "target": "aws.protocoltests.shared#StringMap" + } + } + }, + "aws.protocoltests.query#NestedStructures": { + "type": "operation", + "input": { + "target": "aws.protocoltests.query#NestedStructuresInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This test serializes nested and recursive structure members." + } + }, + "aws.protocoltests.query#NestedStructuresInput": { + "type": "structure", + "members": { + "Nested": { + "target": "aws.protocoltests.query#StructArg" + } + } + }, + "aws.protocoltests.query#NoInputAndNoOutput": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request or response payload because the operation has no input or output.\n\nWhile this should be rare, code generators must support this." + } + }, + "aws.protocoltests.query#NoInputAndOutput": { + "type": "operation", + "input": { + "target": "aws.protocoltests.query#NoInputAndOutputInput" + }, + "output": { + "target": "aws.protocoltests.query#NoInputAndOutputOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request payload or response members.\n\nWhile this should be rare, code generators must support this." + } + }, + "aws.protocoltests.query#NoInputAndOutputInput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.query#NoInputAndOutputOutput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.query#PutWithContentEncoding": { + "type": "operation", + "input": { + "target": "aws.protocoltests.query#PutWithContentEncodingInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#requestCompression": { + "encodings": [ + "gzip" + ] + } + } + }, + "aws.protocoltests.query#PutWithContentEncodingInput": { + "type": "structure", + "members": { + "encoding": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "data": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.query#QueryIdempotencyTokenAutoFill": { + "type": "operation", + "input": { + "target": "aws.protocoltests.query#QueryIdempotencyTokenAutoFillInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "Automatically adds idempotency tokens.", + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.query#QueryIdempotencyTokenAutoFillInput": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#idempotencyToken": {} + } + } + } + }, + "aws.protocoltests.query#QueryLists": { + "type": "operation", + "input": { + "target": "aws.protocoltests.query#QueryListsInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This test serializes simple and complex lists." + } + }, + "aws.protocoltests.query#QueryListsInput": { + "type": "structure", + "members": { + "ListArg": { + "target": "aws.protocoltests.shared#StringList" + }, + "ComplexListArg": { + "target": "aws.protocoltests.shared#GreetingList" + }, + "FlattenedListArg": { + "target": "aws.protocoltests.shared#StringList", + "traits": { + "smithy.api#xmlFlattened": {} + } + }, + "ListArgWithXmlNameMember": { + "target": "aws.protocoltests.query#ListWithXmlName" + }, + "FlattenedListArgWithXmlName": { + "target": "aws.protocoltests.query#ListWithXmlName", + "traits": { + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Hi" + } + }, + "NestedWithList": { + "target": "aws.protocoltests.query#NestedStructWithList" + } + } + }, + "aws.protocoltests.query#QueryMaps": { + "type": "operation", + "input": { + "target": "aws.protocoltests.query#QueryMapsInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This test serializes simple and complex maps." + } + }, + "aws.protocoltests.query#QueryMapsInput": { + "type": "structure", + "members": { + "MapArg": { + "target": "aws.protocoltests.shared#StringMap" + }, + "RenamedMapArg": { + "target": "aws.protocoltests.shared#StringMap", + "traits": { + "smithy.api#xmlName": "Foo" + } + }, + "ComplexMapArg": { + "target": "aws.protocoltests.query#ComplexMap" + }, + "MapWithXmlMemberName": { + "target": "aws.protocoltests.query#MapWithXmlName" + }, + "FlattenedMap": { + "target": "aws.protocoltests.shared#StringMap", + "traits": { + "smithy.api#xmlFlattened": {} + } + }, + "FlattenedMapWithXmlName": { + "target": "aws.protocoltests.query#MapWithXmlName", + "traits": { + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Hi" + } + }, + "MapOfLists": { + "target": "aws.protocoltests.query#MapOfLists" + }, + "NestedStructWithMap": { + "target": "aws.protocoltests.query#NestedStructWithMap" + } + } + }, + "aws.protocoltests.query#QueryTimestamps": { + "type": "operation", + "input": { + "target": "aws.protocoltests.query#QueryTimestampsInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This test serializes timestamps.\n\n1. Timestamps are serialized as RFC 3339 date-time values by default.\n2. A timestampFormat trait on a member changes the format.\n3. A timestampFormat trait on the shape targeted by the member changes the format." + } + }, + "aws.protocoltests.query#QueryTimestampsInput": { + "type": "structure", + "members": { + "normalFormat": { + "target": "smithy.api#Timestamp" + }, + "epochMember": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "epochTarget": { + "target": "aws.protocoltests.shared#EpochSeconds" + } + } + }, + "aws.protocoltests.query#RecursiveXmlShapes": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#RecursiveXmlShapesOutput" + }, + "traits": { + "smithy.api#documentation": "Recursive shapes" + } + }, + "aws.protocoltests.query#RecursiveXmlShapesOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.query#RecursiveXmlShapesOutputNested1" + } + } + }, + "aws.protocoltests.query#RecursiveXmlShapesOutputNested1": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String" + }, + "nested": { + "target": "aws.protocoltests.query#RecursiveXmlShapesOutputNested2" + } + } + }, + "aws.protocoltests.query#RecursiveXmlShapesOutputNested2": { + "type": "structure", + "members": { + "bar": { + "target": "smithy.api#String" + }, + "recursiveMember": { + "target": "aws.protocoltests.query#RecursiveXmlShapesOutputNested1" + } + } + }, + "aws.protocoltests.query#RenamedListMembers": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, + "aws.protocoltests.query#SimpleInputParams": { + "type": "operation", + "input": { + "target": "aws.protocoltests.query#SimpleInputParamsInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This test serializes strings, numbers, and boolean values." + } + }, + "aws.protocoltests.query#SimpleInputParamsInput": { + "type": "structure", + "members": { + "Foo": { + "target": "smithy.api#String" + }, + "Bar": { + "target": "smithy.api#String" + }, + "Baz": { + "target": "smithy.api#Boolean" + }, + "Bam": { + "target": "smithy.api#Integer" + }, + "FloatValue": { + "target": "smithy.api#Float" + }, + "Boo": { + "target": "smithy.api#Double" + }, + "Qux": { + "target": "smithy.api#Blob" + }, + "FooEnum": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "IntegerEnum": { + "target": "aws.protocoltests.shared#IntegerEnum" + } + } + }, + "aws.protocoltests.query#SimpleScalarXmlProperties": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#SimpleScalarXmlPropertiesOutput" + }, + "traits": {} + }, + "aws.protocoltests.query#SimpleScalarXmlPropertiesOutput": { + "type": "structure", + "members": { + "stringValue": { + "target": "smithy.api#String" + }, + "emptyStringValue": { + "target": "smithy.api#String" + }, + "trueBooleanValue": { + "target": "smithy.api#Boolean" + }, + "falseBooleanValue": { + "target": "smithy.api#Boolean" + }, + "byteValue": { + "target": "smithy.api#Byte" + }, + "shortValue": { + "target": "smithy.api#Short" + }, + "integerValue": { + "target": "smithy.api#Integer" + }, + "longValue": { + "target": "smithy.api#Long" + }, + "floatValue": { + "target": "smithy.api#Float" + }, + "doubleValue": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#xmlName": "DoubleDribble" + } + } + } + }, + "aws.protocoltests.query#StructArg": { + "type": "structure", + "members": { + "StringArg": { + "target": "smithy.api#String" + }, + "OtherArg": { + "target": "smithy.api#Boolean" + }, + "RecursiveArg": { + "target": "aws.protocoltests.query#StructArg" + } + } + }, + "aws.protocoltests.query#StructureList": { + "type": "list", + "member": { + "target": "aws.protocoltests.query#StructureListMember", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, + "aws.protocoltests.query#StructureListMember": { + "type": "structure", + "members": { + "a": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "value" + } + }, + "b": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "other" + } + } + } + }, + "aws.protocoltests.query#XmlBlobs": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#XmlBlobsOutput" + }, + "traits": { + "smithy.api#documentation": "Blobs are base64 encoded" + } + }, + "aws.protocoltests.query#XmlBlobsOutput": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Blob" + } + } + }, + "aws.protocoltests.query#XmlEmptyBlobs": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#XmlBlobsOutput" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.query#XmlEmptyLists": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#XmlListsOutput" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.query#XmlEmptyMaps": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#XmlMapsOutput" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.query#XmlEnums": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#XmlEnumsOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes enums as top level properties, in lists, sets, and maps." + } + }, + "aws.protocoltests.query#XmlEnumsOutput": { + "type": "structure", + "members": { + "fooEnum1": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnum2": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnum3": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnumList": { + "target": "aws.protocoltests.shared#FooEnumList" + }, + "fooEnumSet": { + "target": "aws.protocoltests.shared#FooEnumSet" + }, + "fooEnumMap": { + "target": "aws.protocoltests.shared#FooEnumMap" + } + } + }, + "aws.protocoltests.query#XmlIntEnums": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#XmlIntEnumsOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes enums as top level properties, in lists, sets, and maps." + } + }, + "aws.protocoltests.query#XmlIntEnumsOutput": { + "type": "structure", + "members": { + "intEnum1": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "intEnum2": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "intEnum3": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "intEnumList": { + "target": "aws.protocoltests.shared#IntegerEnumList" + }, + "intEnumSet": { + "target": "aws.protocoltests.shared#IntegerEnumSet" + }, + "intEnumMap": { + "target": "aws.protocoltests.shared#IntegerEnumMap" + } + } + }, + "aws.protocoltests.query#XmlLists": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#XmlListsOutput" + }, + "traits": { + "smithy.api#documentation": "This test case serializes XML lists for the following cases for both\ninput and output:\n\n1. Normal XML lists.\n2. Normal XML sets.\n3. XML lists of lists.\n4. XML lists with @xmlName on its members\n5. Flattened XML lists.\n6. Flattened XML lists with @xmlName.\n7. Lists of structures." + } + }, + "aws.protocoltests.query#XmlListsOutput": { + "type": "structure", + "members": { + "stringList": { + "target": "aws.protocoltests.shared#StringList" + }, + "stringSet": { + "target": "aws.protocoltests.shared#StringSet" + }, + "integerList": { + "target": "aws.protocoltests.shared#IntegerList" + }, + "booleanList": { + "target": "aws.protocoltests.shared#BooleanList" + }, + "timestampList": { + "target": "aws.protocoltests.shared#TimestampList" + }, + "enumList": { + "target": "aws.protocoltests.shared#FooEnumList" + }, + "intEnumList": { + "target": "aws.protocoltests.shared#IntegerEnumList" + }, + "nestedStringList": { + "target": "aws.protocoltests.shared#NestedStringList" + }, + "renamedListMembers": { + "target": "aws.protocoltests.query#RenamedListMembers", + "traits": { + "smithy.api#xmlName": "renamed" + } + }, + "flattenedList": { + "target": "aws.protocoltests.query#RenamedListMembers", + "traits": { + "smithy.api#suppress": [ + "XmlFlattenedTrait" + ], + "smithy.api#xmlFlattened": {} + } + }, + "flattenedList2": { + "target": "aws.protocoltests.query#RenamedListMembers", + "traits": { + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "customName" + } + }, + "flattenedListWithMemberNamespace": { + "target": "aws.protocoltests.query#ListWithMemberNamespace", + "traits": { + "smithy.api#xmlFlattened": {} + } + }, + "flattenedListWithNamespace": { + "target": "aws.protocoltests.query#ListWithNamespace", + "traits": { + "smithy.api#xmlFlattened": {} + } + }, + "structureList": { + "target": "aws.protocoltests.query#StructureList", + "traits": { + "smithy.api#xmlName": "myStructureList" + } + } + } + }, + "aws.protocoltests.query#XmlMaps": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#XmlMapsOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests basic map serialization." + } + }, + "aws.protocoltests.query#XmlMapsOutput": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.query#XmlMapsOutputMap" + } + } + }, + "aws.protocoltests.query#XmlMapsOutputMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#GreetingStruct" + } + }, + "aws.protocoltests.query#XmlMapsXmlName": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#XmlMapsXmlNameOutput" + }, + "traits": {} + }, + "aws.protocoltests.query#XmlMapsXmlNameOutput": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.query#XmlMapsXmlNameOutputMap" + } + } + }, + "aws.protocoltests.query#XmlMapsXmlNameOutputMap": { + "type": "map", + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "Attribute" + } + }, + "value": { + "target": "aws.protocoltests.shared#GreetingStruct", + "traits": { + "smithy.api#xmlName": "Setting" + } + } + }, + "aws.protocoltests.query#XmlNamespaceNested": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://baz.com", + "prefix": "baz" + } + } + }, + "values": { + "target": "aws.protocoltests.query#XmlNamespacedList", + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://qux.com" + } + } + } + }, + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://boo.com" + } + } + }, + "aws.protocoltests.query#XmlNamespacedList": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://bux.com" + } + } + } + }, + "aws.protocoltests.query#XmlNamespaces": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#XmlNamespacesOutput" + }, + "traits": {} + }, + "aws.protocoltests.query#XmlNamespacesOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.query#XmlNamespaceNested" + } + }, + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://foo.com" + } + } + }, + "aws.protocoltests.query#XmlTimestamps": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.query#XmlTimestampsOutput" + }, + "traits": { + "smithy.api#documentation": "This tests how timestamps are serialized, including using the\ndefault format of date-time and various @timestampFormat trait\nvalues." + } + }, + "aws.protocoltests.query#XmlTimestampsOutput": { + "type": "structure", + "members": { + "normal": { + "target": "smithy.api#Timestamp" + }, + "dateTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "dateTimeOnTarget": { + "target": "aws.protocoltests.shared#DateTime" + }, + "epochSeconds": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "epochSecondsOnTarget": { + "target": "aws.protocoltests.shared#EpochSeconds" + }, + "httpDate": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "httpDateOnTarget": { + "target": "aws.protocoltests.shared#HttpDate" + } + } + }, + "aws.protocoltests.shared#BooleanList": { + "type": "list", + "member": { + "target": "smithy.api#Boolean" + } + }, + "aws.protocoltests.shared#DateTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "aws.protocoltests.shared#EpochSeconds": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "aws.protocoltests.shared#FooEnum": { + "type": "enum", + "members": { + "FOO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Foo" + } + }, + "BAZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Baz" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Bar" + } + }, + "ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "1" + } + }, + "ZERO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "0" + } + } + } + }, + "aws.protocoltests.shared#FooEnumList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#FooEnum" + } + }, + "aws.protocoltests.shared#FooEnumMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#FooEnum" + } + }, + "aws.protocoltests.shared#FooEnumSet": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#GreetingList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#GreetingStruct" + } + }, + "aws.protocoltests.shared#GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.shared#HttpDate": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "aws.protocoltests.shared#IntegerEnum": { + "type": "intEnum", + "members": { + "A": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 1 + } + }, + "B": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 2 + } + }, + "C": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 3 + } + } + } + }, + "aws.protocoltests.shared#IntegerEnumList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#IntegerEnum" + } + }, + "aws.protocoltests.shared#IntegerEnumMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#IntegerEnum" + } + }, + "aws.protocoltests.shared#IntegerEnumSet": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#IntegerList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + } + }, + "aws.protocoltests.shared#NestedStringList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#StringList" + }, + "traits": { + "smithy.api#documentation": "A list of lists of strings." + } + }, + "aws.protocoltests.shared#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.shared#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.shared#StringSet": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#TimestampList": { + "type": "list", + "member": { + "target": "smithy.api#Timestamp" + } + }, + "smithy.test#AppliesTo": { + "type": "enum", + "members": { + "CLIENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to client implementations.", + "smithy.api#enumValue": "client" + } + }, + "SERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to server implementations.", + "smithy.api#enumValue": "server" + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMessageMixin": { + "type": "structure", + "members": { + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of expected HTTP headers.\n\nHeaders that are not listed in this map are ignored unless they are\nexplicitly forbidden through `forbidHeaders`." + } + }, + "forbidHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must not appear in the serialized\nHTTP request." + } + }, + "requireHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must appear in the serialized\nHTTP message, but no assertion is made on the value.\n\nHeaders listed in `headers` do not need to appear in this list." + } + }, + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected HTTP message body.\n\nIf no request body is defined, then no assertions are made about\nthe body of the message." + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP message members and supporting protocol test members,\nsuitable for both requests and responses.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "method": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected serialized HTTP request method.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request-target of the HTTP request, not including\nthe query string (for example, \"/foo/bar\").", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint provided to the client, not including the path\nor scheme (for example, \"example.com\")." + } + }, + "resolvedHost": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint that the client should send to, not including\nthe path or scheme (for example, \"prefix.example.com\").\n\nThis can differ from the host provided to the client if the `hostPrefix`\nmember of the `endpoint` trait is set, for instance." + } + }, + "queryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of the expected serialized query string parameters.\n\nEach element in the list is a query string key value pair\nthat starts with the query string parameter name optionally\nfollowed by \"=\", optionally followed by the query string\nparameter value. For example, \"foo=bar\", \"foo=\", and \"foo\"\nare all valid values. The query string parameter name and\nthe value MUST appear in the format in which it is expected\nto be sent over the wire; if a key or value needs to be\npercent-encoded, then it MUST appear percent-encoded in this list.\n\nA serialized HTTP request is not in compliance with the protocol\nif any query string parameter defined in `queryParams` is not\ndefined in the request or if the value of a query string parameter\nin the request differs from the expected value.\n\n`queryParams` applies no constraints on additional query parameters." + } + }, + "forbidQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that must not appear in the\nserialized HTTP request.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + }, + "requireQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that MUST appear in the\nserialized request URI, but no assertion is made on the value.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP request members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpRequestMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpRequestTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's\npossible that specific authentication schemes might influence\nthe serialization logic of an HTTP request.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the input parameters used to generated the HTTP request.\n\nThese parameters MUST be compatible with the input of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "code": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Defines the HTTP response code.", + "smithy.api#range": { + "min": 100, + "max": 599 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP response members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpResponseMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpResponseTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The shape ID of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's possible\nthat specific authentication schemes might influence the serialization\nlogic of an HTTP response.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the output parameters deserialized from the HTTP response.\n\nThese parameters MUST be compatible with the output of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nresponse. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + }, + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyStringList": { + "type": "list", + "member": { + "target": "smithy.test#NonEmptyString" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + } + } +} diff --git a/scripts/codegen-output-py/models/ec2-query.json b/scripts/codegen-output-py/models/ec2-query.json new file mode 100644 index 000000000..05148cbbe --- /dev/null +++ b/scripts/codegen-output-py/models/ec2-query.json @@ -0,0 +1,1808 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "aws.api#ArnNamespace": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a service's ARN namespace.", + "smithy.api#pattern": "^[a-z0-9.\\-]{1,63}$", + "smithy.api#private": {} + } + }, + "aws.api#CloudFormationName": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a CloudFormation service name.", + "smithy.api#pattern": "^[A-Z][A-Za-z0-9]+$", + "smithy.api#private": {} + } + }, + "aws.api#CloudWatchMetricNamespace": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[^:].*$", + "smithy.api#private": {} + } + }, + "aws.api#service": { + "type": "structure", + "members": { + "sdkId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `sdkId` property is a required string value that specifies the AWS\nSDK service ID (e.g., \"API Gateway\"). This value is used for generating\nclient names in SDKs and for linking between services.", + "smithy.api#required": {} + } + }, + "arnNamespace": { + "target": "aws.api#ArnNamespace", + "traits": { + "smithy.api#documentation": "The `arnNamespace` property is a string value that defines the ARN service\nnamespace of the service (e.g., \"apigateway\"). This value is used in\nARNs assigned to resources in the service. If not set, this value\ndefaults to the lowercase name of the service shape." + } + }, + "cloudFormationName": { + "target": "aws.api#CloudFormationName", + "traits": { + "smithy.api#documentation": "The `cloudFormationName` property is a string value that specifies the\nAWS CloudFormation service name (e.g., `ApiGateway`). When not set,\nthis value defaults to the name of the service shape. This value is\npart of the CloudFormation resource type name that is automatically\nassigned to resources in the service (e.g., `AWS::::resourceName`)." + } + }, + "cloudTrailEventSource": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `cloudTrailEventSource` property is a string value that defines the\nAWS customer-facing eventSource property contained in CloudTrail event\nrecords emitted by the service. If not specified, this value defaults\nto the `arnNamespace` plus `.amazonaws.com`." + } + }, + "docId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `docId` property is a string value that defines the identifier\nused to implement linking between service and SDK documentation for\nAWS services. If not specified, this value defaults to the `sdkId` in\nlower case plus the service `version` property, separated by dashes." + } + }, + "endpointPrefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `endpointPrefix` property is a string value that identifies which\nendpoint in a given region should be used to connect to the service.\nFor example, most services in the AWS standard partition have endpoints\nwhich follow the format: `{endpointPrefix}.{region}.amazonaws.com`. A\nservice with the endpoint prefix example in the region us-west-2 might\nhave the endpoint example.us-west-2.amazonaws.com.\n\nThis value is not unique across services and is subject to change.\nTherefore, it MUST NOT be used for client naming or for any other\npurpose that requires a static, unique identifier. sdkId should be used\nfor those purposes. Additionally, this value can be used to attempt to\nresolve endpoints." + } + }, + "cloudWatchNamespace": { + "target": "aws.api#CloudWatchMetricNamespace", + "traits": { + "smithy.api#documentation": "The `cloudWatchNamespace` property is a string value that defines the\nAWS customer-facing namespace of most metrics emitted by the service." + } + } + }, + "traits": { + "smithy.api#documentation": "An AWS service is defined using the `aws.api#service` trait. This trait\nprovides information about the service like the name used to generate AWS\nSDK client classes and the namespace used in ARNs.", + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.auth#sigv4": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The signature version 4 service signing name to use in the credential\nscope when signing requests. This value SHOULD match the `arnNamespace`\nproperty of the `aws.api#service` trait if present and the `name`\nproperty of the `aws.api#sigv4a` trait if present.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html" + }, + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#authDefinition": {}, + "smithy.api#documentation": "[Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)\nis the process to add authentication information to AWS requests sent by HTTP. For\nsecurity, most requests to AWS must be signed with an access key, which consists\nof an access key ID and secret access key. These two keys are commonly referred to\nas your security credentials.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html" + }, + "smithy.api#trait": { + "selector": "service", + "breakingChanges": [ + { + "change": "remove", + "message": "Removing the existing authentication scheme is not backward compatible and can break existing clients' authentication." + } + ] + } + } + }, + "aws.protocols#ec2Query": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#deprecated": {}, + "smithy.api#documentation": "An RPC-based protocol that sends 'POST' requests in the body as Amazon EC2\nformatted `x-www-form-urlencoded` strings and responses in XML documents.\nThis protocol does not use HTTP binding traits.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#timestampFormat", + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel", + "aws.protocols#ec2QueryName", + "smithy.api#xmlAttribute", + "smithy.api#xmlFlattened", + "smithy.api#xmlName", + "smithy.api#xmlNamespace" + ] + }, + "smithy.api#trait": { + "selector": "service [trait|xmlNamespace]" + }, + "smithy.api#traitValidators": { + "UnsupportedProtocolDocument": { + "selector": "~> member :test(> document)", + "message": "Document types are not supported with ec2Query" + } + } + } + }, + "aws.protocols#ec2QueryName": { + "type": "string", + "traits": { + "smithy.api#documentation": "Indicates the serialized name of a structure member when that structure is\nserialized for the input of an EC2 operation.", + "smithy.api#pattern": "^[a-zA-Z_][a-zA-Z_0-9-]*$", + "smithy.api#trait": { + "selector": "structure > member" + } + } + }, + "aws.protocoltests.config#ErrorCodeParams": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The error code exposed to the customer.\n\nIf the SDK exposes the error code to customers, this value MUST be\nasserted to match the exposed error code.\n\nThis is modifiable by the awsQueryError trait. For services with\nawsQueryCompatible, it will be exposed in the `x-amzn-query-error`\nheader which takes the form `Code;Fault`. This value represents\nthe `Code` portion.", + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The query error type exposed to the customer.\n\nIf the SDK exposes the query error type to customers, this value MUST be\nasserted to match the exposed query error type.\n\nThis is modifiable by the awsQueryError trait. For services with\nawsQueryCompatible, it will be exposed in the `x-amzn-query-error`\nheader which takes the form `Code;Fault`. This value represents\nthe `Fault` portion." + } + } + }, + "traits": { + "smithy.api#documentation": "Vendor params to use when making assertions about error code or query\nerror type." + } + }, + "aws.protocoltests.ec2#AwsEc2": { + "type": "service", + "version": "2020-01-08", + "operations": [ + { + "target": "aws.protocoltests.ec2#DatetimeOffsets" + }, + { + "target": "aws.protocoltests.ec2#EmptyInputAndEmptyOutput" + }, + { + "target": "aws.protocoltests.ec2#EndpointOperation" + }, + { + "target": "aws.protocoltests.ec2#EndpointWithHostLabelOperation" + }, + { + "target": "aws.protocoltests.ec2#FractionalSeconds" + }, + { + "target": "aws.protocoltests.ec2#GreetingWithErrors" + }, + { + "target": "aws.protocoltests.ec2#HostWithPathOperation" + }, + { + "target": "aws.protocoltests.ec2#IgnoresWrappingXmlName" + }, + { + "target": "aws.protocoltests.ec2#NestedStructures" + }, + { + "target": "aws.protocoltests.ec2#NoInputAndOutput" + }, + { + "target": "aws.protocoltests.ec2#PutWithContentEncoding" + }, + { + "target": "aws.protocoltests.ec2#QueryIdempotencyTokenAutoFill" + }, + { + "target": "aws.protocoltests.ec2#QueryLists" + }, + { + "target": "aws.protocoltests.ec2#QueryTimestamps" + }, + { + "target": "aws.protocoltests.ec2#RecursiveXmlShapes" + }, + { + "target": "aws.protocoltests.ec2#SimpleInputParams" + }, + { + "target": "aws.protocoltests.ec2#SimpleScalarXmlProperties" + }, + { + "target": "aws.protocoltests.ec2#XmlBlobs" + }, + { + "target": "aws.protocoltests.ec2#XmlEmptyBlobs" + }, + { + "target": "aws.protocoltests.ec2#XmlEmptyLists" + }, + { + "target": "aws.protocoltests.ec2#XmlEnums" + }, + { + "target": "aws.protocoltests.ec2#XmlIntEnums" + }, + { + "target": "aws.protocoltests.ec2#XmlLists" + }, + { + "target": "aws.protocoltests.ec2#XmlNamespaces" + }, + { + "target": "aws.protocoltests.ec2#XmlTimestamps" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "EC2 Protocol" + }, + "aws.auth#sigv4": { + "name": "ec2query" + }, + "aws.protocols#ec2Query": {}, + "smithy.api#documentation": "An EC2 query service that sends query requests and XML responses.", + "smithy.api#suppress": [ + "SigV4Traits" + ], + "smithy.api#title": "Sample Ec2 Protocol Service", + "smithy.api#xmlNamespace": { + "uri": "https://example.com/" + } + } + }, + "aws.protocoltests.ec2#ComplexError": { + "type": "structure", + "members": { + "TopLevel": { + "target": "smithy.api#String" + }, + "Nested": { + "target": "aws.protocoltests.ec2#ComplexNestedErrorData" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when a request is invalid.", + "smithy.api#error": "client" + } + }, + "aws.protocoltests.ec2#ComplexNestedErrorData": { + "type": "structure", + "members": { + "Foo": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.ec2#DatetimeOffsets": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#DatetimeOffsetsOutput" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.ec2#DatetimeOffsetsOutput": { + "type": "structure", + "members": { + "datetime": { + "target": "aws.protocoltests.shared#DateTime" + } + } + }, + "aws.protocoltests.ec2#EmptyInputAndEmptyOutput": { + "type": "operation", + "input": { + "target": "aws.protocoltests.ec2#EmptyInputAndEmptyOutputInput" + }, + "output": { + "target": "aws.protocoltests.ec2#EmptyInputAndEmptyOutputOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request or response members.\n\nWhile this should be rare, code generators must support this." + } + }, + "aws.protocoltests.ec2#EmptyInputAndEmptyOutputInput": { + "type": "structure", + "members": {} + }, + "aws.protocoltests.ec2#EmptyInputAndEmptyOutputOutput": { + "type": "structure", + "members": {} + }, + "aws.protocoltests.ec2#EndpointOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#endpoint": { + "hostPrefix": "foo." + } + } + }, + "aws.protocoltests.ec2#EndpointWithHostLabelOperation": { + "type": "operation", + "input": { + "target": "aws.protocoltests.ec2#HostLabelInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#endpoint": { + "hostPrefix": "foo.{label}." + } + } + }, + "aws.protocoltests.ec2#FractionalSeconds": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#FractionalSecondsOutput" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.ec2#FractionalSecondsOutput": { + "type": "structure", + "members": { + "datetime": { + "target": "aws.protocoltests.shared#DateTime" + } + } + }, + "aws.protocoltests.ec2#GreetingWithErrors": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#GreetingWithErrorsOutput" + }, + "errors": [ + { + "target": "aws.protocoltests.ec2#ComplexError" + }, + { + "target": "aws.protocoltests.ec2#InvalidGreeting" + } + ], + "traits": { + "smithy.api#documentation": "This operation has three possible return values:\n\n1. A successful response in the form of GreetingWithErrorsOutput\n2. An InvalidGreeting error.\n3. A BadRequest error." + } + }, + "aws.protocoltests.ec2#GreetingWithErrorsOutput": { + "type": "structure", + "members": { + "greeting": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.ec2#HostLabelInput": { + "type": "structure", + "members": { + "label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#hostLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.ec2#HostWithPathOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": {} + }, + "aws.protocoltests.ec2#IgnoresWrappingXmlName": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#IgnoresWrappingXmlNameOutput" + }, + "traits": { + "smithy.api#documentation": "The xmlName trait on the output structure is ignored in AWS Query.\n\nThe wrapping element is always operation name + \"Response\"." + } + }, + "aws.protocoltests.ec2#IgnoresWrappingXmlNameOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#xmlName": "IgnoreMe" + } + }, + "aws.protocoltests.ec2#InvalidGreeting": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when an invalid greeting value is provided.", + "smithy.api#error": "client" + } + }, + "aws.protocoltests.ec2#ListWithMemberNamespace": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlNamespace": { + "uri": "https://xml-member.example.com" + } + } + }, + "traits": { + "smithy.api#xmlNamespace": { + "uri": "https://xml-list.example.com" + } + } + }, + "aws.protocoltests.ec2#ListWithNamespace": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#xmlNamespace": { + "uri": "https://xml-list.example.com" + } + } + }, + "aws.protocoltests.ec2#ListWithXmlName": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, + "aws.protocoltests.ec2#NestedStructWithList": { + "type": "structure", + "members": { + "ListArg": { + "target": "aws.protocoltests.shared#StringList" + } + } + }, + "aws.protocoltests.ec2#NestedStructures": { + "type": "operation", + "input": { + "target": "aws.protocoltests.ec2#NestedStructuresInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This test serializes nested and recursive structure members." + } + }, + "aws.protocoltests.ec2#NestedStructuresInput": { + "type": "structure", + "members": { + "Nested": { + "target": "aws.protocoltests.ec2#StructArg" + } + } + }, + "aws.protocoltests.ec2#NoInputAndOutput": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#NoInputAndOutputOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request payload or response members.\n\nWhile this should be rare, code generators must support this." + } + }, + "aws.protocoltests.ec2#NoInputAndOutputOutput": { + "type": "structure", + "members": {} + }, + "aws.protocoltests.ec2#PutWithContentEncoding": { + "type": "operation", + "input": { + "target": "aws.protocoltests.ec2#PutWithContentEncodingInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#requestCompression": { + "encodings": [ + "gzip" + ] + } + } + }, + "aws.protocoltests.ec2#PutWithContentEncodingInput": { + "type": "structure", + "members": { + "encoding": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "data": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.ec2#QueryIdempotencyTokenAutoFill": { + "type": "operation", + "input": { + "target": "aws.protocoltests.ec2#QueryIdempotencyTokenAutoFillInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "Automatically adds idempotency tokens.", + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.ec2#QueryIdempotencyTokenAutoFillInput": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#idempotencyToken": {} + } + } + } + }, + "aws.protocoltests.ec2#QueryLists": { + "type": "operation", + "input": { + "target": "aws.protocoltests.ec2#QueryListsInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This test serializes simple and complex lists." + } + }, + "aws.protocoltests.ec2#QueryListsInput": { + "type": "structure", + "members": { + "ListArg": { + "target": "aws.protocoltests.shared#StringList" + }, + "ComplexListArg": { + "target": "aws.protocoltests.shared#GreetingList" + }, + "ListArgWithXmlNameMember": { + "target": "aws.protocoltests.ec2#ListWithXmlName" + }, + "ListArgWithXmlName": { + "target": "aws.protocoltests.ec2#ListWithXmlName", + "traits": { + "smithy.api#xmlName": "Hi" + } + }, + "NestedWithList": { + "target": "aws.protocoltests.ec2#NestedStructWithList" + } + } + }, + "aws.protocoltests.ec2#QueryTimestamps": { + "type": "operation", + "input": { + "target": "aws.protocoltests.ec2#QueryTimestampsInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This test serializes timestamps.\n\n1. Timestamps are serialized as RFC 3339 date-time values by default.\n2. A timestampFormat trait on a member changes the format.\n3. A timestampFormat trait on the shape targeted by the member changes the format." + } + }, + "aws.protocoltests.ec2#QueryTimestampsInput": { + "type": "structure", + "members": { + "normalFormat": { + "target": "smithy.api#Timestamp" + }, + "epochMember": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "epochTarget": { + "target": "aws.protocoltests.shared#EpochSeconds" + } + } + }, + "aws.protocoltests.ec2#RecursiveXmlShapes": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#RecursiveXmlShapesOutput" + }, + "traits": { + "smithy.api#documentation": "Recursive shapes" + } + }, + "aws.protocoltests.ec2#RecursiveXmlShapesOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.ec2#RecursiveXmlShapesOutputNested1" + } + } + }, + "aws.protocoltests.ec2#RecursiveXmlShapesOutputNested1": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String" + }, + "nested": { + "target": "aws.protocoltests.ec2#RecursiveXmlShapesOutputNested2" + } + } + }, + "aws.protocoltests.ec2#RecursiveXmlShapesOutputNested2": { + "type": "structure", + "members": { + "bar": { + "target": "smithy.api#String" + }, + "recursiveMember": { + "target": "aws.protocoltests.ec2#RecursiveXmlShapesOutputNested1" + } + } + }, + "aws.protocoltests.ec2#RenamedListMembers": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, + "aws.protocoltests.ec2#SimpleInputParams": { + "type": "operation", + "input": { + "target": "aws.protocoltests.ec2#SimpleInputParamsInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This test serializes strings, numbers, and boolean values." + } + }, + "aws.protocoltests.ec2#SimpleInputParamsInput": { + "type": "structure", + "members": { + "Foo": { + "target": "smithy.api#String" + }, + "Bar": { + "target": "smithy.api#String" + }, + "Baz": { + "target": "smithy.api#Boolean" + }, + "Bam": { + "target": "smithy.api#Integer" + }, + "FloatValue": { + "target": "smithy.api#Float" + }, + "Boo": { + "target": "smithy.api#Double" + }, + "Qux": { + "target": "smithy.api#Blob" + }, + "FooEnum": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "HasQueryName": { + "target": "smithy.api#String", + "traits": { + "aws.protocols#ec2QueryName": "HasQueryName" + } + }, + "HasQueryAndXmlName": { + "target": "smithy.api#String", + "traits": { + "aws.protocols#ec2QueryName": "HasQueryAndXmlName", + "smithy.api#xmlName": "hasQueryAndXmlName" + } + }, + "UsesXmlName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "usesXmlName" + } + }, + "DistinctQueryName": { + "target": "smithy.api#String", + "traits": { + "aws.protocols#ec2QueryName": "QueryName" + } + }, + "DistinctQueryAndXmlName": { + "target": "smithy.api#String", + "traits": { + "aws.protocols#ec2QueryName": "queryAndXmlName", + "smithy.api#xmlName": "xmlAndQueryName" + } + }, + "DistinctXmlName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "xmlNameOnly" + } + } + } + }, + "aws.protocoltests.ec2#SimpleScalarXmlProperties": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#SimpleScalarXmlPropertiesOutput" + }, + "traits": {} + }, + "aws.protocoltests.ec2#SimpleScalarXmlPropertiesOutput": { + "type": "structure", + "members": { + "stringValue": { + "target": "smithy.api#String", + "traits": { + "aws.protocols#ec2QueryName": "IgnoreMe" + } + }, + "emptyStringValue": { + "target": "smithy.api#String" + }, + "trueBooleanValue": { + "target": "smithy.api#Boolean" + }, + "falseBooleanValue": { + "target": "smithy.api#Boolean" + }, + "byteValue": { + "target": "smithy.api#Byte" + }, + "shortValue": { + "target": "smithy.api#Short" + }, + "integerValue": { + "target": "smithy.api#Integer" + }, + "longValue": { + "target": "smithy.api#Long" + }, + "floatValue": { + "target": "smithy.api#Float" + }, + "doubleValue": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#xmlName": "DoubleDribble" + } + } + } + }, + "aws.protocoltests.ec2#StructArg": { + "type": "structure", + "members": { + "StringArg": { + "target": "smithy.api#String" + }, + "OtherArg": { + "target": "smithy.api#Boolean" + }, + "RecursiveArg": { + "target": "aws.protocoltests.ec2#StructArg" + } + } + }, + "aws.protocoltests.ec2#StructureList": { + "type": "list", + "member": { + "target": "aws.protocoltests.ec2#StructureListMember", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, + "aws.protocoltests.ec2#StructureListMember": { + "type": "structure", + "members": { + "a": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "value" + } + }, + "b": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "other" + } + } + } + }, + "aws.protocoltests.ec2#XmlBlobs": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#XmlBlobsOutput" + }, + "traits": { + "smithy.api#documentation": "Blobs are base64 encoded" + } + }, + "aws.protocoltests.ec2#XmlBlobsOutput": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Blob" + } + } + }, + "aws.protocoltests.ec2#XmlEmptyBlobs": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#XmlBlobsOutput" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.ec2#XmlEmptyLists": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#XmlListsOutput" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.ec2#XmlEnums": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#XmlEnumsOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes enums as top level properties, in lists, sets, and maps." + } + }, + "aws.protocoltests.ec2#XmlEnumsOutput": { + "type": "structure", + "members": { + "fooEnum1": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnum2": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnum3": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnumList": { + "target": "aws.protocoltests.shared#FooEnumList" + }, + "fooEnumSet": { + "target": "aws.protocoltests.shared#FooEnumSet" + }, + "fooEnumMap": { + "target": "aws.protocoltests.shared#FooEnumMap" + } + } + }, + "aws.protocoltests.ec2#XmlIntEnums": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#XmlIntEnumsOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes intEnums as top level properties, in lists, sets, and maps." + } + }, + "aws.protocoltests.ec2#XmlIntEnumsOutput": { + "type": "structure", + "members": { + "intEnum1": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "intEnum2": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "intEnum3": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "intEnumList": { + "target": "aws.protocoltests.shared#IntegerEnumList" + }, + "intEnumSet": { + "target": "aws.protocoltests.shared#IntegerEnumSet" + }, + "intEnumMap": { + "target": "aws.protocoltests.shared#IntegerEnumMap" + } + } + }, + "aws.protocoltests.ec2#XmlLists": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#XmlListsOutput" + }, + "traits": { + "smithy.api#documentation": "This test case serializes XML lists for the following cases for both\ninput and output:\n\n1. Normal XML lists.\n2. Normal XML sets.\n3. XML lists of lists.\n4. XML lists with @xmlName on its members\n5. Flattened XML lists.\n6. Flattened XML lists with @xmlName.\n7. Flattened XML lists with @xmlNamespace.\n8. Lists of structures." + } + }, + "aws.protocoltests.ec2#XmlListsOutput": { + "type": "structure", + "members": { + "stringList": { + "target": "aws.protocoltests.shared#StringList" + }, + "stringSet": { + "target": "aws.protocoltests.shared#StringSet" + }, + "integerList": { + "target": "aws.protocoltests.shared#IntegerList" + }, + "booleanList": { + "target": "aws.protocoltests.shared#BooleanList" + }, + "timestampList": { + "target": "aws.protocoltests.shared#TimestampList" + }, + "enumList": { + "target": "aws.protocoltests.shared#FooEnumList" + }, + "intEnumList": { + "target": "aws.protocoltests.shared#IntegerEnumList" + }, + "nestedStringList": { + "target": "aws.protocoltests.shared#NestedStringList" + }, + "renamedListMembers": { + "target": "aws.protocoltests.ec2#RenamedListMembers", + "traits": { + "smithy.api#xmlName": "renamed" + } + }, + "flattenedList": { + "target": "aws.protocoltests.ec2#RenamedListMembers", + "traits": { + "smithy.api#suppress": [ + "XmlFlattenedTrait" + ], + "smithy.api#xmlFlattened": {} + } + }, + "flattenedList2": { + "target": "aws.protocoltests.ec2#RenamedListMembers", + "traits": { + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "customName" + } + }, + "flattenedListWithMemberNamespace": { + "target": "aws.protocoltests.ec2#ListWithMemberNamespace", + "traits": { + "smithy.api#xmlFlattened": {} + } + }, + "flattenedListWithNamespace": { + "target": "aws.protocoltests.ec2#ListWithNamespace", + "traits": { + "smithy.api#xmlFlattened": {} + } + }, + "structureList": { + "target": "aws.protocoltests.ec2#StructureList", + "traits": { + "smithy.api#xmlName": "myStructureList" + } + } + } + }, + "aws.protocoltests.ec2#XmlNamespaceNested": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://baz.com", + "prefix": "baz" + } + } + }, + "values": { + "target": "aws.protocoltests.ec2#XmlNamespacedList", + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://qux.com" + } + } + } + }, + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://foo.com" + } + } + }, + "aws.protocoltests.ec2#XmlNamespacedList": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://bux.com" + } + } + } + }, + "aws.protocoltests.ec2#XmlNamespaces": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#XmlNamespacesOutput" + }, + "traits": {} + }, + "aws.protocoltests.ec2#XmlNamespacesOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.ec2#XmlNamespaceNested" + } + }, + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://foo.com" + } + } + }, + "aws.protocoltests.ec2#XmlTimestamps": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.ec2#XmlTimestampsOutput" + }, + "traits": { + "smithy.api#documentation": "This tests how timestamps are serialized, including using the\ndefault format of date-time and various @timestampFormat trait\nvalues." + } + }, + "aws.protocoltests.ec2#XmlTimestampsOutput": { + "type": "structure", + "members": { + "normal": { + "target": "smithy.api#Timestamp" + }, + "dateTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "dateTimeOnTarget": { + "target": "aws.protocoltests.shared#DateTime" + }, + "epochSeconds": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "epochSecondsOnTarget": { + "target": "aws.protocoltests.shared#EpochSeconds" + }, + "httpDate": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "httpDateOnTarget": { + "target": "aws.protocoltests.shared#HttpDate" + } + } + }, + "aws.protocoltests.shared#BooleanList": { + "type": "list", + "member": { + "target": "smithy.api#Boolean" + } + }, + "aws.protocoltests.shared#DateTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "aws.protocoltests.shared#EpochSeconds": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "aws.protocoltests.shared#FooEnum": { + "type": "enum", + "members": { + "FOO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Foo" + } + }, + "BAZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Baz" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Bar" + } + }, + "ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "1" + } + }, + "ZERO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "0" + } + } + } + }, + "aws.protocoltests.shared#FooEnumList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#FooEnum" + } + }, + "aws.protocoltests.shared#FooEnumMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#FooEnum" + } + }, + "aws.protocoltests.shared#FooEnumSet": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#GreetingList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#GreetingStruct" + } + }, + "aws.protocoltests.shared#GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.shared#HttpDate": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "aws.protocoltests.shared#IntegerEnum": { + "type": "intEnum", + "members": { + "A": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 1 + } + }, + "B": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 2 + } + }, + "C": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 3 + } + } + } + }, + "aws.protocoltests.shared#IntegerEnumList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#IntegerEnum" + } + }, + "aws.protocoltests.shared#IntegerEnumMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#IntegerEnum" + } + }, + "aws.protocoltests.shared#IntegerEnumSet": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#IntegerList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + } + }, + "aws.protocoltests.shared#NestedStringList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#StringList" + }, + "traits": { + "smithy.api#documentation": "A list of lists of strings." + } + }, + "aws.protocoltests.shared#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.shared#StringSet": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#TimestampList": { + "type": "list", + "member": { + "target": "smithy.api#Timestamp" + } + }, + "smithy.test#AppliesTo": { + "type": "enum", + "members": { + "CLIENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to client implementations.", + "smithy.api#enumValue": "client" + } + }, + "SERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to server implementations.", + "smithy.api#enumValue": "server" + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMessageMixin": { + "type": "structure", + "members": { + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of expected HTTP headers.\n\nHeaders that are not listed in this map are ignored unless they are\nexplicitly forbidden through `forbidHeaders`." + } + }, + "forbidHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must not appear in the serialized\nHTTP request." + } + }, + "requireHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must appear in the serialized\nHTTP message, but no assertion is made on the value.\n\nHeaders listed in `headers` do not need to appear in this list." + } + }, + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected HTTP message body.\n\nIf no request body is defined, then no assertions are made about\nthe body of the message." + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP message members and supporting protocol test members,\nsuitable for both requests and responses.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "method": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected serialized HTTP request method.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request-target of the HTTP request, not including\nthe query string (for example, \"/foo/bar\").", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint provided to the client, not including the path\nor scheme (for example, \"example.com\")." + } + }, + "resolvedHost": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint that the client should send to, not including\nthe path or scheme (for example, \"prefix.example.com\").\n\nThis can differ from the host provided to the client if the `hostPrefix`\nmember of the `endpoint` trait is set, for instance." + } + }, + "queryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of the expected serialized query string parameters.\n\nEach element in the list is a query string key value pair\nthat starts with the query string parameter name optionally\nfollowed by \"=\", optionally followed by the query string\nparameter value. For example, \"foo=bar\", \"foo=\", and \"foo\"\nare all valid values. The query string parameter name and\nthe value MUST appear in the format in which it is expected\nto be sent over the wire; if a key or value needs to be\npercent-encoded, then it MUST appear percent-encoded in this list.\n\nA serialized HTTP request is not in compliance with the protocol\nif any query string parameter defined in `queryParams` is not\ndefined in the request or if the value of a query string parameter\nin the request differs from the expected value.\n\n`queryParams` applies no constraints on additional query parameters." + } + }, + "forbidQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that must not appear in the\nserialized HTTP request.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + }, + "requireQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that MUST appear in the\nserialized request URI, but no assertion is made on the value.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP request members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpRequestMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpRequestTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's\npossible that specific authentication schemes might influence\nthe serialization logic of an HTTP request.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the input parameters used to generated the HTTP request.\n\nThese parameters MUST be compatible with the input of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "code": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Defines the HTTP response code.", + "smithy.api#range": { + "min": 100, + "max": 599 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP response members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpResponseMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpResponseTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The shape ID of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's possible\nthat specific authentication schemes might influence the serialization\nlogic of an HTTP response.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the output parameters deserialized from the HTTP response.\n\nThese parameters MUST be compatible with the output of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nresponse. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + }, + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyStringList": { + "type": "list", + "member": { + "target": "smithy.test#NonEmptyString" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + } + } +} diff --git a/scripts/codegen-output-py/models/my-handwritten-json-model.json b/scripts/codegen-output-py/models/my-handwritten-json-model.json new file mode 100644 index 000000000..78dbe3c5b --- /dev/null +++ b/scripts/codegen-output-py/models/my-handwritten-json-model.json @@ -0,0 +1,282 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "smithy.protocols#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "A list of String shapes.", + "smithy.api#private": {} + } + }, + "smithy.protocols#rpcv2Json": { + "type": "structure", + "members": { + "http": { + "target": "smithy.protocols#StringList", + "traits": { + "smithy.api#documentation": "Priority ordered list of supported HTTP protocol versions." + } + }, + "eventStreamHttp": { + "target": "smithy.protocols#StringList", + "traits": { + "smithy.api#documentation": "Priority ordered list of supported HTTP protocol versions\nthat are required when using event streams." + } + } + }, + "traits": { + "smithy.api#documentation": "An RPC-based protocol that serializes JSON payloads.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel", + "smithy.api#httpError", + "smithy.api#requestCompression" + ] + }, + "smithy.api#trait": { + "selector": "service" + } + } + }, + "smithy.python.tests.handwritten.json#Alpha": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String" + }, + "timestamp": { + "target": "smithy.api#Timestamp" + } + } + }, + "smithy.python.tests.handwritten.json#DifferentShapeName": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + }, + "number": { + "target": "smithy.api#Integer" + } + } + }, + "smithy.python.tests.handwritten.json#Gamma": { + "type": "structure", + "members": { + "sequenceNumber": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#eventHeader": {} + } + }, + "payload": { + "target": "smithy.python.tests.handwritten.json#GammaPayload", + "traits": { + "smithy.api#eventPayload": {} + } + } + } + }, + "smithy.python.tests.handwritten.json#GammaPayload": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + }, + "values": { + "target": "smithy.python.tests.handwritten.json#IntegerList" + } + } + }, + "smithy.python.tests.handwritten.json#IntegerList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + } + }, + "smithy.python.tests.handwritten.json#MyHandwrittenJsonModel": { + "type": "service", + "version": "2020-07-14", + "operations": [ + { + "target": "smithy.python.tests.handwritten.json#TradeEventStream" + } + ], + "traits": { + "smithy.api#documentation": "The rpcv2Json counterpart of smithy.python.tests.handwritten#MyHandwrittenModel,\nused to drive the duplex event-stream integration test over rpcv2Json. Shapes\nare local copies (not shared with the CBOR service) so each service's shape\nclosure, default namespace, and generated client stay independent.", + "smithy.api#title": "My Handwritten JSON Model", + "smithy.protocols#rpcv2Json": { + "http": [ + "h2", + "http/1.1" + ], + "eventStreamHttp": [ + "h2" + ] + } + } + }, + "smithy.python.tests.handwritten.json#StreamServiceError": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#error": "server" + } + }, + "smithy.python.tests.handwritten.json#ThrottlingEvent": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#error": "client", + "smithy.api#retryable": { + "throttling": true + } + } + }, + "smithy.python.tests.handwritten.json#TradeEventStream": { + "type": "operation", + "input": { + "target": "smithy.python.tests.handwritten.json#TradeEventStreamInput" + }, + "output": { + "target": "smithy.python.tests.handwritten.json#TradeEventStreamOutput" + }, + "errors": [ + { + "target": "smithy.python.tests.handwritten.json#StreamServiceError" + } + ], + "traits": { + "smithy.api#documentation": "Bidirectional (duplex) stream. The non-stream members (sessionId, greeting) are\ncarried as the initial-request and initial-response messages." + } + }, + "smithy.python.tests.handwritten.json#TradeEventStreamInput": { + "type": "structure", + "members": { + "sessionId": { + "target": "smithy.api#String" + }, + "events": { + "target": "smithy.python.tests.handwritten.json#TradeEvents" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "smithy.python.tests.handwritten.json#TradeEventStreamOutput": { + "type": "structure", + "members": { + "greeting": { + "target": "smithy.api#String" + }, + "events": { + "target": "smithy.python.tests.handwritten.json#TradeEvents" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "smithy.python.tests.handwritten.json#TradeEvents": { + "type": "union", + "members": { + "alpha": { + "target": "smithy.python.tests.handwritten.json#Alpha" + }, + "beta": { + "target": "smithy.api#Unit" + }, + "gamma": { + "target": "smithy.python.tests.handwritten.json#Gamma" + }, + "delta": { + "target": "smithy.python.tests.handwritten.json#DifferentShapeName" + }, + "throttle": { + "target": "smithy.python.tests.handwritten.json#ThrottlingEvent" + } + }, + "traits": { + "smithy.api#streaming": {} + } + } + } +} diff --git a/scripts/codegen-output-py/models/my-handwritten-model.json b/scripts/codegen-output-py/models/my-handwritten-model.json new file mode 100644 index 000000000..6f25d9d03 --- /dev/null +++ b/scripts/codegen-output-py/models/my-handwritten-model.json @@ -0,0 +1,443 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "smithy.protocols#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "A list of String shapes.", + "smithy.api#private": {} + } + }, + "smithy.protocols#rpcv2Cbor": { + "type": "structure", + "members": { + "http": { + "target": "smithy.protocols#StringList", + "traits": { + "smithy.api#documentation": "Priority ordered list of supported HTTP protocol versions." + } + }, + "eventStreamHttp": { + "target": "smithy.protocols#StringList", + "traits": { + "smithy.api#documentation": "Priority ordered list of supported HTTP protocol versions\nthat are required when using event streams." + } + } + }, + "traits": { + "smithy.api#documentation": "An RPC-based protocol that serializes CBOR payloads.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel", + "smithy.api#httpError", + "smithy.api#requestCompression" + ] + }, + "smithy.api#trait": { + "selector": "service" + }, + "smithy.api#traitValidators": { + "rpcv2Cbor.NoDocuments": { + "selector": "service ~> member :test(> document)", + "message": "This protocol does not support document types in most possible scenarios.", + "severity": "DANGER" + } + } + } + }, + "smithy.python.tests.handwritten#Alpha": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String" + }, + "timestamp": { + "target": "smithy.api#Timestamp" + } + } + }, + "smithy.python.tests.handwritten#DifferentShapeName": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + }, + "number": { + "target": "smithy.api#Integer" + } + } + }, + "smithy.python.tests.handwritten#Gamma": { + "type": "structure", + "members": { + "sequenceNumber": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#eventHeader": {} + } + }, + "payload": { + "target": "smithy.python.tests.handwritten#GammaPayload", + "traits": { + "smithy.api#eventPayload": {} + } + } + } + }, + "smithy.python.tests.handwritten#GammaPayload": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + }, + "values": { + "target": "smithy.python.tests.handwritten#IntegerList" + } + } + }, + "smithy.python.tests.handwritten#HeartbeatEvent": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp" + } + } + }, + "smithy.python.tests.handwritten#IntegerList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + } + }, + "smithy.python.tests.handwritten#LogEvent": { + "type": "structure", + "members": { + "level": { + "target": "smithy.api#String" + }, + "message": { + "target": "smithy.api#String" + } + } + }, + "smithy.python.tests.handwritten#MetricEvent": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Double" + } + } + }, + "smithy.python.tests.handwritten#MyHandwrittenModel": { + "type": "service", + "version": "2020-07-14", + "operations": [ + { + "target": "smithy.python.tests.handwritten#PublishEvents" + }, + { + "target": "smithy.python.tests.handwritten#SubscribeToEvents" + }, + { + "target": "smithy.python.tests.handwritten#TradeEventStream" + } + ], + "traits": { + "smithy.api#title": "My Handwritten Model", + "smithy.protocols#rpcv2Cbor": { + "http": [ + "h2", + "http/1.1" + ], + "eventStreamHttp": [ + "h2" + ] + } + } + }, + "smithy.python.tests.handwritten#NotificationEvent": { + "type": "structure", + "members": { + "topic": { + "target": "smithy.api#String" + }, + "payload": { + "target": "smithy.api#String" + } + } + }, + "smithy.python.tests.handwritten#PublishEventStream": { + "type": "union", + "members": { + "log": { + "target": "smithy.python.tests.handwritten#LogEvent" + }, + "metric": { + "target": "smithy.python.tests.handwritten#MetricEvent" + } + }, + "traits": { + "smithy.api#streaming": {} + } + }, + "smithy.python.tests.handwritten#PublishEvents": { + "type": "operation", + "input": { + "target": "smithy.python.tests.handwritten#PublishEventsInput" + }, + "output": { + "target": "smithy.python.tests.handwritten#PublishEventsOutput" + }, + "traits": { + "smithy.api#documentation": "Input-only stream: the client sends events, the server returns a summary." + } + }, + "smithy.python.tests.handwritten#PublishEventsInput": { + "type": "structure", + "members": { + "channel": { + "target": "smithy.api#String" + }, + "events": { + "target": "smithy.python.tests.handwritten#PublishEventStream" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "smithy.python.tests.handwritten#PublishEventsOutput": { + "type": "structure", + "members": { + "eventCount": { + "target": "smithy.api#Integer" + }, + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "smithy.python.tests.handwritten#StreamServiceError": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#error": "server" + } + }, + "smithy.python.tests.handwritten#SubscribeEventStream": { + "type": "union", + "members": { + "notification": { + "target": "smithy.python.tests.handwritten#NotificationEvent" + }, + "heartbeat": { + "target": "smithy.python.tests.handwritten#HeartbeatEvent" + } + }, + "traits": { + "smithy.api#streaming": {} + } + }, + "smithy.python.tests.handwritten#SubscribeToEvents": { + "type": "operation", + "input": { + "target": "smithy.python.tests.handwritten#SubscribeToEventsInput" + }, + "output": { + "target": "smithy.python.tests.handwritten#SubscribeToEventsOutput" + }, + "traits": { + "smithy.api#documentation": "Output-only stream: the client subscribes, the server streams events." + } + }, + "smithy.python.tests.handwritten#SubscribeToEventsInput": { + "type": "structure", + "members": { + "channel": { + "target": "smithy.api#String" + }, + "maxEvents": { + "target": "smithy.api#Integer" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "smithy.python.tests.handwritten#SubscribeToEventsOutput": { + "type": "structure", + "members": { + "subscriptionId": { + "target": "smithy.api#String" + }, + "events": { + "target": "smithy.python.tests.handwritten#SubscribeEventStream" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "smithy.python.tests.handwritten#ThrottlingEvent": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#error": "client", + "smithy.api#retryable": { + "throttling": true + } + } + }, + "smithy.python.tests.handwritten#TradeEventStream": { + "type": "operation", + "input": { + "target": "smithy.python.tests.handwritten#TradeEventStreamInput" + }, + "output": { + "target": "smithy.python.tests.handwritten#TradeEventStreamOutput" + }, + "errors": [ + { + "target": "smithy.python.tests.handwritten#StreamServiceError" + } + ], + "traits": { + "smithy.api#documentation": "Bidirectional (duplex) stream. The non-stream members (sessionId, greeting) are\ncarried as the initial-request and initial-response messages." + } + }, + "smithy.python.tests.handwritten#TradeEventStreamInput": { + "type": "structure", + "members": { + "sessionId": { + "target": "smithy.api#String" + }, + "events": { + "target": "smithy.python.tests.handwritten#TradeEvents" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "smithy.python.tests.handwritten#TradeEventStreamOutput": { + "type": "structure", + "members": { + "greeting": { + "target": "smithy.api#String" + }, + "events": { + "target": "smithy.python.tests.handwritten#TradeEvents" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "smithy.python.tests.handwritten#TradeEvents": { + "type": "union", + "members": { + "alpha": { + "target": "smithy.python.tests.handwritten#Alpha" + }, + "beta": { + "target": "smithy.api#Unit" + }, + "gamma": { + "target": "smithy.python.tests.handwritten#Gamma" + }, + "delta": { + "target": "smithy.python.tests.handwritten#DifferentShapeName" + }, + "throttle": { + "target": "smithy.python.tests.handwritten#ThrottlingEvent" + } + }, + "traits": { + "smithy.api#streaming": {} + } + } + } +} diff --git a/scripts/codegen-output-py/models/non-query-compatible-rpcv2-cbor.json b/scripts/codegen-output-py/models/non-query-compatible-rpcv2-cbor.json new file mode 100644 index 000000000..9d1f6daa7 --- /dev/null +++ b/scripts/codegen-output-py/models/non-query-compatible-rpcv2-cbor.json @@ -0,0 +1,511 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "aws.api#ArnNamespace": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a service's ARN namespace.", + "smithy.api#pattern": "^[a-z0-9.\\-]{1,63}$", + "smithy.api#private": {} + } + }, + "aws.api#CloudFormationName": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a CloudFormation service name.", + "smithy.api#pattern": "^[A-Z][A-Za-z0-9]+$", + "smithy.api#private": {} + } + }, + "aws.api#CloudWatchMetricNamespace": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[^:].*$", + "smithy.api#private": {} + } + }, + "aws.api#service": { + "type": "structure", + "members": { + "sdkId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `sdkId` property is a required string value that specifies the AWS\nSDK service ID (e.g., \"API Gateway\"). This value is used for generating\nclient names in SDKs and for linking between services.", + "smithy.api#required": {} + } + }, + "arnNamespace": { + "target": "aws.api#ArnNamespace", + "traits": { + "smithy.api#documentation": "The `arnNamespace` property is a string value that defines the ARN service\nnamespace of the service (e.g., \"apigateway\"). This value is used in\nARNs assigned to resources in the service. If not set, this value\ndefaults to the lowercase name of the service shape." + } + }, + "cloudFormationName": { + "target": "aws.api#CloudFormationName", + "traits": { + "smithy.api#documentation": "The `cloudFormationName` property is a string value that specifies the\nAWS CloudFormation service name (e.g., `ApiGateway`). When not set,\nthis value defaults to the name of the service shape. This value is\npart of the CloudFormation resource type name that is automatically\nassigned to resources in the service (e.g., `AWS::::resourceName`)." + } + }, + "cloudTrailEventSource": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `cloudTrailEventSource` property is a string value that defines the\nAWS customer-facing eventSource property contained in CloudTrail event\nrecords emitted by the service. If not specified, this value defaults\nto the `arnNamespace` plus `.amazonaws.com`." + } + }, + "docId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `docId` property is a string value that defines the identifier\nused to implement linking between service and SDK documentation for\nAWS services. If not specified, this value defaults to the `sdkId` in\nlower case plus the service `version` property, separated by dashes." + } + }, + "endpointPrefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `endpointPrefix` property is a string value that identifies which\nendpoint in a given region should be used to connect to the service.\nFor example, most services in the AWS standard partition have endpoints\nwhich follow the format: `{endpointPrefix}.{region}.amazonaws.com`. A\nservice with the endpoint prefix example in the region us-west-2 might\nhave the endpoint example.us-west-2.amazonaws.com.\n\nThis value is not unique across services and is subject to change.\nTherefore, it MUST NOT be used for client naming or for any other\npurpose that requires a static, unique identifier. sdkId should be used\nfor those purposes. Additionally, this value can be used to attempt to\nresolve endpoints." + } + }, + "cloudWatchNamespace": { + "target": "aws.api#CloudWatchMetricNamespace", + "traits": { + "smithy.api#documentation": "The `cloudWatchNamespace` property is a string value that defines the\nAWS customer-facing namespace of most metrics emitted by the service." + } + } + }, + "traits": { + "smithy.api#documentation": "An AWS service is defined using the `aws.api#service` trait. This trait\nprovides information about the service like the name used to generate AWS\nSDK client classes and the namespace used in ARNs.", + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.auth#sigv4": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The signature version 4 service signing name to use in the credential\nscope when signing requests. This value SHOULD match the `arnNamespace`\nproperty of the `aws.api#service` trait if present and the `name`\nproperty of the `aws.api#sigv4a` trait if present.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html" + }, + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#authDefinition": {}, + "smithy.api#documentation": "[Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)\nis the process to add authentication information to AWS requests sent by HTTP. For\nsecurity, most requests to AWS must be signed with an access key, which consists\nof an access key ID and secret access key. These two keys are commonly referred to\nas your security credentials.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html" + }, + "smithy.api#trait": { + "selector": "service", + "breakingChanges": [ + { + "change": "remove", + "message": "Removing the existing authentication scheme is not backward compatible and can break existing clients' authentication." + } + ] + } + } + }, + "aws.protocoltests.rpcv2cbor#NonQueryCompatibleOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.rpcv2cbor#NonQueryCompatibleRpcV2Protocol": { + "type": "service", + "version": "2025-06-20", + "operations": [ + { + "target": "aws.protocoltests.rpcv2cbor#NonQueryCompatibleOperation" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Non Query Compatible RpcV2 Protocol" + }, + "aws.auth#sigv4": { + "name": "nonquerycompatiblerpcv2protocol" + }, + "smithy.api#title": "Non Query Compatible RpcV2 Protocol Service", + "smithy.protocols#rpcv2Cbor": {} + } + }, + "smithy.protocols#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "A list of String shapes.", + "smithy.api#private": {} + } + }, + "smithy.protocols#rpcv2Cbor": { + "type": "structure", + "members": { + "http": { + "target": "smithy.protocols#StringList", + "traits": { + "smithy.api#documentation": "Priority ordered list of supported HTTP protocol versions." + } + }, + "eventStreamHttp": { + "target": "smithy.protocols#StringList", + "traits": { + "smithy.api#documentation": "Priority ordered list of supported HTTP protocol versions\nthat are required when using event streams." + } + } + }, + "traits": { + "smithy.api#documentation": "An RPC-based protocol that serializes CBOR payloads.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel", + "smithy.api#httpError", + "smithy.api#requestCompression" + ] + }, + "smithy.api#trait": { + "selector": "service" + }, + "smithy.api#traitValidators": { + "rpcv2Cbor.NoDocuments": { + "selector": "service ~> member :test(> document)", + "message": "This protocol does not support document types in most possible scenarios.", + "severity": "DANGER" + } + } + } + }, + "smithy.test#AppliesTo": { + "type": "enum", + "members": { + "CLIENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to client implementations.", + "smithy.api#enumValue": "client" + } + }, + "SERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to server implementations.", + "smithy.api#enumValue": "server" + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMessageMixin": { + "type": "structure", + "members": { + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of expected HTTP headers.\n\nHeaders that are not listed in this map are ignored unless they are\nexplicitly forbidden through `forbidHeaders`." + } + }, + "forbidHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must not appear in the serialized\nHTTP request." + } + }, + "requireHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must appear in the serialized\nHTTP message, but no assertion is made on the value.\n\nHeaders listed in `headers` do not need to appear in this list." + } + }, + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected HTTP message body.\n\nIf no request body is defined, then no assertions are made about\nthe body of the message." + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP message members and supporting protocol test members,\nsuitable for both requests and responses.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "method": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected serialized HTTP request method.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request-target of the HTTP request, not including\nthe query string (for example, \"/foo/bar\").", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint provided to the client, not including the path\nor scheme (for example, \"example.com\")." + } + }, + "resolvedHost": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint that the client should send to, not including\nthe path or scheme (for example, \"prefix.example.com\").\n\nThis can differ from the host provided to the client if the `hostPrefix`\nmember of the `endpoint` trait is set, for instance." + } + }, + "queryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of the expected serialized query string parameters.\n\nEach element in the list is a query string key value pair\nthat starts with the query string parameter name optionally\nfollowed by \"=\", optionally followed by the query string\nparameter value. For example, \"foo=bar\", \"foo=\", and \"foo\"\nare all valid values. The query string parameter name and\nthe value MUST appear in the format in which it is expected\nto be sent over the wire; if a key or value needs to be\npercent-encoded, then it MUST appear percent-encoded in this list.\n\nA serialized HTTP request is not in compliance with the protocol\nif any query string parameter defined in `queryParams` is not\ndefined in the request or if the value of a query string parameter\nin the request differs from the expected value.\n\n`queryParams` applies no constraints on additional query parameters." + } + }, + "forbidQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that must not appear in the\nserialized HTTP request.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + }, + "requireQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that MUST appear in the\nserialized request URI, but no assertion is made on the value.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP request members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpRequestMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpRequestTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's\npossible that specific authentication schemes might influence\nthe serialization logic of an HTTP request.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the input parameters used to generated the HTTP request.\n\nThese parameters MUST be compatible with the input of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + }, + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyStringList": { + "type": "list", + "member": { + "target": "smithy.test#NonEmptyString" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + } + } +} diff --git a/scripts/codegen-output-py/models/partitioned-types.json b/scripts/codegen-output-py/models/partitioned-types.json new file mode 100644 index 000000000..201eefcc0 --- /dev/null +++ b/scripts/codegen-output-py/models/partitioned-types.json @@ -0,0 +1,3048 @@ +{ + "smithy": "2.0", + "shapes": { + "example#ExampleService": { + "type": "service", + "version": "2026-10-23", + "operations": [ + { + "target": "example#GetExample" + } + ], + "rename": { + "example#Example": "RenamedExample", + "example#Value": "ExampleValue" + } + }, + "example#GetExample": { + "type": "operation", + "input": { + "target": "example#GetExampleInput" + }, + "output": { + "target": "example#GetExampleOutput" + }, + "errors": [ + { + "target": "example#ExampleError" + } + ] + }, + "example#GetExampleInput": { + "type": "structure", + "traits": { + "smithy.api#documentation": "Input for retrieving an example." + }, + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "partitioned": { + "target": "example#PartitionItem000" + } + } + }, + "example#GetExampleOutput": { + "type": "structure", + "members": { + "example": { + "target": "example#Example" + }, + "value": { + "target": "example#Value" + }, + "events": { + "target": "example#EventStream" + } + } + }, + "example#ExampleError": { + "type": "structure", + "traits": { + "smithy.api#documentation": "An example modeled error.", + "smithy.api#error": "client" + }, + "members": { + "message": { + "target": "smithy.api#String" + }, + "retryAfterSeconds": { + "target": "smithy.api#Integer" + } + } + }, + "example#Example": { + "type": "structure", + "traits": { + "smithy.api#documentation": "A representative generated structure." + }, + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The example name.", + "smithy.api#required": {} + } + }, + "count": { + "target": "smithy.api#PrimitiveInteger" + }, + "tags": { + "target": "example#TagList" + }, + "attributes": { + "target": "example#Attributes" + }, + "choice": { + "target": "example#Value" + }, + "status": { + "target": "example#Status" + }, + "code": { + "target": "example#Code" + } + } + }, + "example#TagList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "example#Attributes": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + } + }, + "example#Value": { + "type": "union", + "traits": { + "smithy.api#documentation": "A representative generated union." + }, + "members": { + "text": { + "target": "smithy.api#String" + }, + "number": { + "target": "smithy.api#Integer" + }, + "empty": { + "target": "smithy.api#Unit" + } + } + }, + "example#EventStream": { + "type": "union", + "traits": { + "smithy.api#streaming": {} + }, + "members": { + "example": { + "target": "example#Example" + } + } + }, + "example#Status": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + }, + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inactive" + } + } + } + }, + "example#Code": { + "type": "intEnum", + "members": { + "OK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 200 + } + }, + "NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 404 + } + } + } + }, + "example#PartitionItem000": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem001" + } + } + }, + "example#PartitionItem001": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem002" + } + } + }, + "example#PartitionItem002": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem003" + } + } + }, + "example#PartitionItem003": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem004" + } + } + }, + "example#PartitionItem004": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem005" + } + } + }, + "example#PartitionItem005": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem006" + } + } + }, + "example#PartitionItem006": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem007" + } + } + }, + "example#PartitionItem007": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem008" + } + } + }, + "example#PartitionItem008": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem009" + } + } + }, + "example#PartitionItem009": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem010" + } + } + }, + "example#PartitionItem010": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem011" + } + } + }, + "example#PartitionItem011": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem012" + } + } + }, + "example#PartitionItem012": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem013" + } + } + }, + "example#PartitionItem013": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem014" + } + } + }, + "example#PartitionItem014": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem015" + } + } + }, + "example#PartitionItem015": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem016" + } + } + }, + "example#PartitionItem016": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem017" + } + } + }, + "example#PartitionItem017": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem018" + } + } + }, + "example#PartitionItem018": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem019" + } + } + }, + "example#PartitionItem019": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem020" + } + } + }, + "example#PartitionItem020": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem021" + } + } + }, + "example#PartitionItem021": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem022" + } + } + }, + "example#PartitionItem022": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem023" + } + } + }, + "example#PartitionItem023": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem024" + } + } + }, + "example#PartitionItem024": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem025" + } + } + }, + "example#PartitionItem025": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem026" + } + } + }, + "example#PartitionItem026": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem027" + } + } + }, + "example#PartitionItem027": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem028" + } + } + }, + "example#PartitionItem028": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem029" + } + } + }, + "example#PartitionItem029": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem030" + } + } + }, + "example#PartitionItem030": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem031" + } + } + }, + "example#PartitionItem031": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem032" + } + } + }, + "example#PartitionItem032": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem033" + } + } + }, + "example#PartitionItem033": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem034" + } + } + }, + "example#PartitionItem034": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem035" + } + } + }, + "example#PartitionItem035": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem036" + } + } + }, + "example#PartitionItem036": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem037" + } + } + }, + "example#PartitionItem037": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem038" + } + } + }, + "example#PartitionItem038": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem039" + } + } + }, + "example#PartitionItem039": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem040" + } + } + }, + "example#PartitionItem040": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem041" + } + } + }, + "example#PartitionItem041": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem042" + } + } + }, + "example#PartitionItem042": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem043" + } + } + }, + "example#PartitionItem043": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem044" + } + } + }, + "example#PartitionItem044": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem045" + } + } + }, + "example#PartitionItem045": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem046" + } + } + }, + "example#PartitionItem046": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem047" + } + } + }, + "example#PartitionItem047": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem048" + } + } + }, + "example#PartitionItem048": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem049" + } + } + }, + "example#PartitionItem049": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem050" + } + } + }, + "example#PartitionItem050": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem051" + } + } + }, + "example#PartitionItem051": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem052" + } + } + }, + "example#PartitionItem052": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem053" + } + } + }, + "example#PartitionItem053": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem054" + } + } + }, + "example#PartitionItem054": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem055" + } + } + }, + "example#PartitionItem055": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem056" + } + } + }, + "example#PartitionItem056": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem057" + } + } + }, + "example#PartitionItem057": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem058" + } + } + }, + "example#PartitionItem058": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem059" + } + } + }, + "example#PartitionItem059": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem060" + } + } + }, + "example#PartitionItem060": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem061" + } + } + }, + "example#PartitionItem061": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem062" + } + } + }, + "example#PartitionItem062": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem063" + } + } + }, + "example#PartitionItem063": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem064" + } + } + }, + "example#PartitionItem064": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem065" + } + } + }, + "example#PartitionItem065": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem066" + } + } + }, + "example#PartitionItem066": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem067" + } + } + }, + "example#PartitionItem067": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem068" + } + } + }, + "example#PartitionItem068": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem069" + } + } + }, + "example#PartitionItem069": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem070" + } + } + }, + "example#PartitionItem070": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem071" + } + } + }, + "example#PartitionItem071": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem072" + } + } + }, + "example#PartitionItem072": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem073" + } + } + }, + "example#PartitionItem073": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem074" + } + } + }, + "example#PartitionItem074": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem075" + } + } + }, + "example#PartitionItem075": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem076" + } + } + }, + "example#PartitionItem076": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem077" + } + } + }, + "example#PartitionItem077": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem078" + } + } + }, + "example#PartitionItem078": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem079" + } + } + }, + "example#PartitionItem079": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem080" + } + } + }, + "example#PartitionItem080": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem081" + } + } + }, + "example#PartitionItem081": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem082" + } + } + }, + "example#PartitionItem082": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem083" + } + } + }, + "example#PartitionItem083": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem084" + } + } + }, + "example#PartitionItem084": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem085" + } + } + }, + "example#PartitionItem085": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem086" + } + } + }, + "example#PartitionItem086": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem087" + } + } + }, + "example#PartitionItem087": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem088" + } + } + }, + "example#PartitionItem088": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem089" + } + } + }, + "example#PartitionItem089": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem090" + } + } + }, + "example#PartitionItem090": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem091" + } + } + }, + "example#PartitionItem091": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem092" + } + } + }, + "example#PartitionItem092": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem093" + } + } + }, + "example#PartitionItem093": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem094" + } + } + }, + "example#PartitionItem094": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem095" + } + } + }, + "example#PartitionItem095": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem096" + } + } + }, + "example#PartitionItem096": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem097" + } + } + }, + "example#PartitionItem097": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem098" + } + } + }, + "example#PartitionItem098": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem099" + } + } + }, + "example#PartitionItem099": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem100" + } + } + }, + "example#PartitionItem100": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem101" + } + } + }, + "example#PartitionItem101": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem102" + } + } + }, + "example#PartitionItem102": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem103" + } + } + }, + "example#PartitionItem103": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem104" + } + } + }, + "example#PartitionItem104": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem105" + } + } + }, + "example#PartitionItem105": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem106" + } + } + }, + "example#PartitionItem106": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem107" + } + } + }, + "example#PartitionItem107": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem108" + } + } + }, + "example#PartitionItem108": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem109" + } + } + }, + "example#PartitionItem109": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem110" + } + } + }, + "example#PartitionItem110": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem111" + } + } + }, + "example#PartitionItem111": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem112" + } + } + }, + "example#PartitionItem112": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem113" + } + } + }, + "example#PartitionItem113": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem114" + } + } + }, + "example#PartitionItem114": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem115" + } + } + }, + "example#PartitionItem115": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem116" + } + } + }, + "example#PartitionItem116": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem117" + } + } + }, + "example#PartitionItem117": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem118" + } + } + }, + "example#PartitionItem118": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem119" + } + } + }, + "example#PartitionItem119": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem120" + } + } + }, + "example#PartitionItem120": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem121" + } + } + }, + "example#PartitionItem121": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem122" + } + } + }, + "example#PartitionItem122": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem123" + } + } + }, + "example#PartitionItem123": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem124" + } + } + }, + "example#PartitionItem124": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem125" + } + } + }, + "example#PartitionItem125": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem126" + } + } + }, + "example#PartitionItem126": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem127" + } + } + }, + "example#PartitionItem127": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem128" + } + } + }, + "example#PartitionItem128": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem129" + } + } + }, + "example#PartitionItem129": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem130" + } + } + }, + "example#PartitionItem130": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem131" + } + } + }, + "example#PartitionItem131": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem132" + } + } + }, + "example#PartitionItem132": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem133" + } + } + }, + "example#PartitionItem133": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem134" + } + } + }, + "example#PartitionItem134": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem135" + } + } + }, + "example#PartitionItem135": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem136" + } + } + }, + "example#PartitionItem136": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem137" + } + } + }, + "example#PartitionItem137": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem138" + } + } + }, + "example#PartitionItem138": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem139" + } + } + }, + "example#PartitionItem139": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem140" + } + } + }, + "example#PartitionItem140": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem141" + } + } + }, + "example#PartitionItem141": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem142" + } + } + }, + "example#PartitionItem142": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem143" + } + } + }, + "example#PartitionItem143": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem144" + } + } + }, + "example#PartitionItem144": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem145" + } + } + }, + "example#PartitionItem145": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem146" + } + } + }, + "example#PartitionItem146": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem147" + } + } + }, + "example#PartitionItem147": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem148" + } + } + }, + "example#PartitionItem148": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem149" + } + } + }, + "example#PartitionItem149": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem150" + } + } + }, + "example#PartitionItem150": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem151" + } + } + }, + "example#PartitionItem151": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem152" + } + } + }, + "example#PartitionItem152": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem153" + } + } + }, + "example#PartitionItem153": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem154" + } + } + }, + "example#PartitionItem154": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem155" + } + } + }, + "example#PartitionItem155": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem156" + } + } + }, + "example#PartitionItem156": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem157" + } + } + }, + "example#PartitionItem157": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem158" + } + } + }, + "example#PartitionItem158": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem159" + } + } + }, + "example#PartitionItem159": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem160" + } + } + }, + "example#PartitionItem160": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem161" + } + } + }, + "example#PartitionItem161": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem162" + } + } + }, + "example#PartitionItem162": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem163" + } + } + }, + "example#PartitionItem163": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem164" + } + } + }, + "example#PartitionItem164": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem165" + } + } + }, + "example#PartitionItem165": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem166" + } + } + }, + "example#PartitionItem166": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem167" + } + } + }, + "example#PartitionItem167": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem168" + } + } + }, + "example#PartitionItem168": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem169" + } + } + }, + "example#PartitionItem169": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem170" + } + } + }, + "example#PartitionItem170": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem171" + } + } + }, + "example#PartitionItem171": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem172" + } + } + }, + "example#PartitionItem172": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem173" + } + } + }, + "example#PartitionItem173": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem174" + } + } + }, + "example#PartitionItem174": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem175" + } + } + }, + "example#PartitionItem175": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem176" + } + } + }, + "example#PartitionItem176": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem177" + } + } + }, + "example#PartitionItem177": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem178" + } + } + }, + "example#PartitionItem178": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem179" + } + } + }, + "example#PartitionItem179": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem180" + } + } + }, + "example#PartitionItem180": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem181" + } + } + }, + "example#PartitionItem181": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem182" + } + } + }, + "example#PartitionItem182": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem183" + } + } + }, + "example#PartitionItem183": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem184" + } + } + }, + "example#PartitionItem184": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem185" + } + } + }, + "example#PartitionItem185": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem186" + } + } + }, + "example#PartitionItem186": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem187" + } + } + }, + "example#PartitionItem187": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem188" + } + } + }, + "example#PartitionItem188": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem189" + } + } + }, + "example#PartitionItem189": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem190" + } + } + }, + "example#PartitionItem190": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem191" + } + } + }, + "example#PartitionItem191": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem192" + } + } + }, + "example#PartitionItem192": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem193" + } + } + }, + "example#PartitionItem193": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem194" + } + } + }, + "example#PartitionItem194": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem195" + } + } + }, + "example#PartitionItem195": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem196" + } + } + }, + "example#PartitionItem196": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem197" + } + } + }, + "example#PartitionItem197": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem198" + } + } + }, + "example#PartitionItem198": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem199" + } + } + }, + "example#PartitionItem199": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem200" + } + } + }, + "example#PartitionItem200": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem201" + } + } + }, + "example#PartitionItem201": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem202" + } + } + }, + "example#PartitionItem202": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem203" + } + } + }, + "example#PartitionItem203": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem204" + } + } + }, + "example#PartitionItem204": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem205" + } + } + }, + "example#PartitionItem205": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem206" + } + } + }, + "example#PartitionItem206": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem207" + } + } + }, + "example#PartitionItem207": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem208" + } + } + }, + "example#PartitionItem208": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem209" + } + } + }, + "example#PartitionItem209": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem210" + } + } + }, + "example#PartitionItem210": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem211" + } + } + }, + "example#PartitionItem211": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem212" + } + } + }, + "example#PartitionItem212": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem213" + } + } + }, + "example#PartitionItem213": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem214" + } + } + }, + "example#PartitionItem214": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem215" + } + } + }, + "example#PartitionItem215": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem216" + } + } + }, + "example#PartitionItem216": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem217" + } + } + }, + "example#PartitionItem217": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem218" + } + } + }, + "example#PartitionItem218": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem219" + } + } + }, + "example#PartitionItem219": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem220" + } + } + }, + "example#PartitionItem220": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem221" + } + } + }, + "example#PartitionItem221": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem222" + } + } + }, + "example#PartitionItem222": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem223" + } + } + }, + "example#PartitionItem223": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem224" + } + } + }, + "example#PartitionItem224": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem225" + } + } + }, + "example#PartitionItem225": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem226" + } + } + }, + "example#PartitionItem226": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem227" + } + } + }, + "example#PartitionItem227": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem228" + } + } + }, + "example#PartitionItem228": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem229" + } + } + }, + "example#PartitionItem229": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem230" + } + } + }, + "example#PartitionItem230": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem231" + } + } + }, + "example#PartitionItem231": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem232" + } + } + }, + "example#PartitionItem232": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem233" + } + } + }, + "example#PartitionItem233": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem234" + } + } + }, + "example#PartitionItem234": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem235" + } + } + }, + "example#PartitionItem235": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem236" + } + } + }, + "example#PartitionItem236": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem237" + } + } + }, + "example#PartitionItem237": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem238" + } + } + }, + "example#PartitionItem238": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem239" + } + } + }, + "example#PartitionItem239": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem240" + } + } + }, + "example#PartitionItem240": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem241" + } + } + }, + "example#PartitionItem241": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem242" + } + } + }, + "example#PartitionItem242": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem243" + } + } + }, + "example#PartitionItem243": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem244" + } + } + }, + "example#PartitionItem244": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem245" + } + } + }, + "example#PartitionItem245": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem246" + } + } + }, + "example#PartitionItem246": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem247" + } + } + }, + "example#PartitionItem247": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem248" + } + } + }, + "example#PartitionItem248": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem249" + } + } + }, + "example#PartitionItem249": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem250" + } + } + }, + "example#PartitionItem250": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem251" + } + } + }, + "example#PartitionItem251": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem252" + } + } + }, + "example#PartitionItem252": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem253" + } + } + }, + "example#PartitionItem253": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem254" + } + } + }, + "example#PartitionItem254": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem255" + } + } + }, + "example#PartitionItem255": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem256" + } + } + }, + "example#PartitionItem256": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem257" + } + } + }, + "example#PartitionItem257": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem258" + } + } + }, + "example#PartitionItem258": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem259" + } + } + }, + "example#PartitionItem259": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + }, + "next": { + "target": "example#PartitionItem258" + } + } + } + } +} diff --git a/scripts/codegen-output-py/models/provenance.json b/scripts/codegen-output-py/models/provenance.json new file mode 100644 index 000000000..640f16663 --- /dev/null +++ b/scripts/codegen-output-py/models/provenance.json @@ -0,0 +1,58 @@ +{ + "aws-json-1-0": { + "assembled_sha256": "0e6eeb8c431cbf5c988d3daba1983bdc8f9c074657bc9a66915218047bf901f7", + "fixture_sha256": "ebfcbdfd4aedefd26bd01e3df4dd0ecca8a7b1e3e768ac7c6a27e9f125250b23" + }, + "aws-json-1-1": { + "assembled_sha256": "a783216226370423619536be3211571a74f24a6d4f15107d364a728ee7fec192", + "fixture_sha256": "580fc43337bf9cc6c68452d63454906590588e3de438cb5ad1f3690b147dc5d3" + }, + "aws-query": { + "assembled_sha256": "62332fc9f42c8d044f0dd59376ed922236b8ac19a6ac1b5c8d08a3856208a726", + "fixture_sha256": "9d436d4769afe29f40faac4846682cf6127daafe5648819f37e6d1265112ad77" + }, + "ec2-query": { + "assembled_sha256": "d9e345e3801c0ddcde7d24d8e8348bf10251fbb67b85b7908046a1e26abe1d46", + "fixture_sha256": "7761c1333e4113092f7e92f98a08a384d596df6c23040261e55b76e5fabb36fe" + }, + "my-handwritten-json-model": { + "assembled_sha256": "fa5bb874b59e09d79b06797012b70f7f0763dd2d93551e8f3f9611508d53d560", + "fixture_sha256": "f0bc79bc2916afface193a50b5f61f6083ab204c62f02b90e0161681e711a7c5" + }, + "my-handwritten-model": { + "assembled_sha256": "2e002a44db22b32f75d9a827999f1f70fe243032797979f71206fd50a3c85826", + "fixture_sha256": "57312c170a701d6f8720282ddaba33e2e569eb6fcdf7b4ce7667803b5b62d4c4" + }, + "non-query-compatible-rpcv2-cbor": { + "assembled_sha256": "e1b1ad2207f4fb8349d5396a0b99b96df828bd836b864d238a23ba4f0113ace8", + "fixture_sha256": "956700484d5692be20f15c9c46a32d5fd2ffcf4fb570e9856ab2bff0e2684584" + }, + "query-compatible-aws-json-1-0": { + "assembled_sha256": "c7039ea5f648534741a3cbf4bc5b8bb0f2fac94d7c2ef3b287ad449ca11946e8", + "fixture_sha256": "924cb826da264978f570c819d5d2a0fd2571f974241cdb8f7ddb4efe289083cf" + }, + "query-compatible-rpcv2-cbor": { + "assembled_sha256": "ff18f8a7075b4421c44503ad912d4817022cbc1b0be31f3c6abab86d534fd4fd", + "fixture_sha256": "96a9ff39eed239813bc952773deaf0199bbe6ae3528cf508780b138eba4c1be9" + }, + "rest-json-1": { + "assembled_sha256": "e9bd8f77892be7064088fd1fcd8f3add141d1ea5c60ff7740a8910c0159874b5", + "fixture_sha256": "86695cc8ccebcb8579cee0a52e9fe891bf7745576496e23c6e6a3f328b4c2231" + }, + "rest-xml": { + "assembled_sha256": "9baf7dd1c331a2c3c4a72b7ab38288a714511b4926ee8a03c8aa4256538b3588", + "fixture_sha256": "46f8b05fc58d4d976c64ba1ca52d1ead1b9398b428a2fe2b19892d216062d427" + }, + "rest-xml-with-namespace": { + "assembled_sha256": "3357e842c2542236cdc08a08742b634005ab6cb2233c6b1b1f31d2d79bcc7f5a", + "fixture_sha256": "f248a93bcbccbb1ab86614a8faac028a6b2ecde1a0811b2c52e9f21d0113200e" + }, + "rpcv2-cbor": { + "assembled_sha256": "68d4c622bfa0ac01065fb563cbfa6c232668ac8ba09bbbb7dae71c1c4475d529", + "fixture_sha256": "04f97ce5fbed181e811a5210ae18005b5d9e3175bedf7ef53f03356dcbe47a38" + }, + "rpcv2-json": { + "assembled_sha256": "39446e1f8b195e069632f5e95f6d4b44605f0e99a9df5a2d30b9f94321d3cb1c", + "fixture_sha256": "698c563eece76205e384984e4ea4a4cbe0ce0415d7663b2dbb2e20f6892e09e5" + } +} diff --git a/scripts/codegen-output-py/models/query-compatible-aws-json-1-0.json b/scripts/codegen-output-py/models/query-compatible-aws-json-1-0.json new file mode 100644 index 000000000..286e63cca --- /dev/null +++ b/scripts/codegen-output-py/models/query-compatible-aws-json-1-0.json @@ -0,0 +1,723 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "aws.api#ArnNamespace": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a service's ARN namespace.", + "smithy.api#pattern": "^[a-z0-9.\\-]{1,63}$", + "smithy.api#private": {} + } + }, + "aws.api#CloudFormationName": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a CloudFormation service name.", + "smithy.api#pattern": "^[A-Z][A-Za-z0-9]+$", + "smithy.api#private": {} + } + }, + "aws.api#CloudWatchMetricNamespace": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[^:].*$", + "smithy.api#private": {} + } + }, + "aws.api#service": { + "type": "structure", + "members": { + "sdkId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `sdkId` property is a required string value that specifies the AWS\nSDK service ID (e.g., \"API Gateway\"). This value is used for generating\nclient names in SDKs and for linking between services.", + "smithy.api#required": {} + } + }, + "arnNamespace": { + "target": "aws.api#ArnNamespace", + "traits": { + "smithy.api#documentation": "The `arnNamespace` property is a string value that defines the ARN service\nnamespace of the service (e.g., \"apigateway\"). This value is used in\nARNs assigned to resources in the service. If not set, this value\ndefaults to the lowercase name of the service shape." + } + }, + "cloudFormationName": { + "target": "aws.api#CloudFormationName", + "traits": { + "smithy.api#documentation": "The `cloudFormationName` property is a string value that specifies the\nAWS CloudFormation service name (e.g., `ApiGateway`). When not set,\nthis value defaults to the name of the service shape. This value is\npart of the CloudFormation resource type name that is automatically\nassigned to resources in the service (e.g., `AWS::::resourceName`)." + } + }, + "cloudTrailEventSource": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `cloudTrailEventSource` property is a string value that defines the\nAWS customer-facing eventSource property contained in CloudTrail event\nrecords emitted by the service. If not specified, this value defaults\nto the `arnNamespace` plus `.amazonaws.com`." + } + }, + "docId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `docId` property is a string value that defines the identifier\nused to implement linking between service and SDK documentation for\nAWS services. If not specified, this value defaults to the `sdkId` in\nlower case plus the service `version` property, separated by dashes." + } + }, + "endpointPrefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `endpointPrefix` property is a string value that identifies which\nendpoint in a given region should be used to connect to the service.\nFor example, most services in the AWS standard partition have endpoints\nwhich follow the format: `{endpointPrefix}.{region}.amazonaws.com`. A\nservice with the endpoint prefix example in the region us-west-2 might\nhave the endpoint example.us-west-2.amazonaws.com.\n\nThis value is not unique across services and is subject to change.\nTherefore, it MUST NOT be used for client naming or for any other\npurpose that requires a static, unique identifier. sdkId should be used\nfor those purposes. Additionally, this value can be used to attempt to\nresolve endpoints." + } + }, + "cloudWatchNamespace": { + "target": "aws.api#CloudWatchMetricNamespace", + "traits": { + "smithy.api#documentation": "The `cloudWatchNamespace` property is a string value that defines the\nAWS customer-facing namespace of most metrics emitted by the service." + } + } + }, + "traits": { + "smithy.api#documentation": "An AWS service is defined using the `aws.api#service` trait. This trait\nprovides information about the service like the name used to generate AWS\nSDK client classes and the namespace used in ARNs.", + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.auth#sigv4": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The signature version 4 service signing name to use in the credential\nscope when signing requests. This value SHOULD match the `arnNamespace`\nproperty of the `aws.api#service` trait if present and the `name`\nproperty of the `aws.api#sigv4a` trait if present.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html" + }, + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#authDefinition": {}, + "smithy.api#documentation": "[Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)\nis the process to add authentication information to AWS requests sent by HTTP. For\nsecurity, most requests to AWS must be signed with an access key, which consists\nof an access key ID and secret access key. These two keys are commonly referred to\nas your security credentials.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html" + }, + "smithy.api#trait": { + "selector": "service", + "breakingChanges": [ + { + "change": "remove", + "message": "Removing the existing authentication scheme is not backward compatible and can break existing clients' authentication." + } + ] + } + } + }, + "aws.protocols#HttpConfiguration": { + "type": "structure", + "members": { + "http": { + "target": "aws.protocols#StringList", + "traits": { + "smithy.api#documentation": "The priority ordered list of supported HTTP protocol versions." + } + }, + "eventStreamHttp": { + "target": "aws.protocols#StringList", + "traits": { + "smithy.api#documentation": "The priority ordered list of supported HTTP protocol versions that\nare required when using event streams with the service. If not set,\nthis value defaults to the value of the `http` member. Any entry in\n`eventStreamHttp` MUST also appear in `http`." + } + } + }, + "traits": { + "smithy.api#documentation": "Contains HTTP protocol configuration for HTTP-based protocols.", + "smithy.api#mixin": { + "localTraits": [ + "smithy.api#private" + ] + }, + "smithy.api#private": {} + } + }, + "aws.protocols#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "aws.protocols#awsJson1_0": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocols#HttpConfiguration" + } + ], + "members": {}, + "traits": { + "smithy.api#documentation": "An RPC-based protocol that sends JSON payloads. This protocol does not use\nHTTP binding traits.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#timestampFormat", + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel" + ] + }, + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.protocols#awsQueryCompatible": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "Enable backward compatibility when migrating from awsQuery to the awsJson\nprotocol or Smithy RPC v2 CBOR.", + "smithy.api#trait": { + "selector": "service :test([trait|aws.protocols#awsJson1_0],\n [trait|smithy.protocols#rpcv2Cbor],\n [trait|smithy.protocols#rpcv2Json])" + } + } + }, + "aws.protocols#awsQueryError": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The value used to distinguish this error shape during serialization.", + "smithy.api#required": {} + } + }, + "httpResponseCode": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The HTTP response code used on a response containing this error shape.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Provides the value in the 'Code' distinguishing field and HTTP response\ncode for an operation error.", + "smithy.api#trait": { + "selector": "structure [trait|error]", + "breakingChanges": [ + { + "change": "any" + } + ] + } + } + }, + "aws.protocoltests.config#ErrorCodeParams": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The error code exposed to the customer.\n\nIf the SDK exposes the error code to customers, this value MUST be\nasserted to match the exposed error code.\n\nThis is modifiable by the awsQueryError trait. For services with\nawsQueryCompatible, it will be exposed in the `x-amzn-query-error`\nheader which takes the form `Code;Fault`. This value represents\nthe `Code` portion.", + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The query error type exposed to the customer.\n\nIf the SDK exposes the query error type to customers, this value MUST be\nasserted to match the exposed query error type.\n\nThis is modifiable by the awsQueryError trait. For services with\nawsQueryCompatible, it will be exposed in the `x-amzn-query-error`\nheader which takes the form `Code;Fault`. This value represents\nthe `Fault` portion." + } + } + }, + "traits": { + "smithy.api#documentation": "Vendor params to use when making assertions about error code or query\nerror type." + } + }, + "aws.protocoltests.json10#CustomCodeError": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "Customized", + "httpResponseCode": 402 + }, + "smithy.api#error": "client" + } + }, + "aws.protocoltests.json10#NoCustomCodeError": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#error": "client" + } + }, + "aws.protocoltests.json10#QueryCompatibleJsonRpc10": { + "type": "service", + "version": "2020-07-14", + "operations": [ + { + "target": "aws.protocoltests.json10#QueryCompatibleOperation" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Query Compatible JSON RPC 10" + }, + "aws.auth#sigv4": { + "name": "querycompatiblejsonrpc10" + }, + "aws.protocols#awsJson1_0": {}, + "aws.protocols#awsQueryCompatible": {}, + "smithy.api#title": "Query Compatible Json 1.0 Protocol Service" + } + }, + "aws.protocoltests.json10#QueryCompatibleOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "aws.protocoltests.json10#CustomCodeError" + }, + { + "target": "aws.protocoltests.json10#NoCustomCodeError" + } + ], + "traits": { + "smithy.api#idempotent": {} + } + }, + "smithy.test#AppliesTo": { + "type": "enum", + "members": { + "CLIENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to client implementations.", + "smithy.api#enumValue": "client" + } + }, + "SERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to server implementations.", + "smithy.api#enumValue": "server" + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMessageMixin": { + "type": "structure", + "members": { + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of expected HTTP headers.\n\nHeaders that are not listed in this map are ignored unless they are\nexplicitly forbidden through `forbidHeaders`." + } + }, + "forbidHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must not appear in the serialized\nHTTP request." + } + }, + "requireHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must appear in the serialized\nHTTP message, but no assertion is made on the value.\n\nHeaders listed in `headers` do not need to appear in this list." + } + }, + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected HTTP message body.\n\nIf no request body is defined, then no assertions are made about\nthe body of the message." + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP message members and supporting protocol test members,\nsuitable for both requests and responses.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "method": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected serialized HTTP request method.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request-target of the HTTP request, not including\nthe query string (for example, \"/foo/bar\").", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint provided to the client, not including the path\nor scheme (for example, \"example.com\")." + } + }, + "resolvedHost": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint that the client should send to, not including\nthe path or scheme (for example, \"prefix.example.com\").\n\nThis can differ from the host provided to the client if the `hostPrefix`\nmember of the `endpoint` trait is set, for instance." + } + }, + "queryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of the expected serialized query string parameters.\n\nEach element in the list is a query string key value pair\nthat starts with the query string parameter name optionally\nfollowed by \"=\", optionally followed by the query string\nparameter value. For example, \"foo=bar\", \"foo=\", and \"foo\"\nare all valid values. The query string parameter name and\nthe value MUST appear in the format in which it is expected\nto be sent over the wire; if a key or value needs to be\npercent-encoded, then it MUST appear percent-encoded in this list.\n\nA serialized HTTP request is not in compliance with the protocol\nif any query string parameter defined in `queryParams` is not\ndefined in the request or if the value of a query string parameter\nin the request differs from the expected value.\n\n`queryParams` applies no constraints on additional query parameters." + } + }, + "forbidQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that must not appear in the\nserialized HTTP request.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + }, + "requireQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that MUST appear in the\nserialized request URI, but no assertion is made on the value.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP request members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpRequestMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpRequestTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's\npossible that specific authentication schemes might influence\nthe serialization logic of an HTTP request.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the input parameters used to generated the HTTP request.\n\nThese parameters MUST be compatible with the input of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "code": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Defines the HTTP response code.", + "smithy.api#range": { + "min": 100, + "max": 599 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP response members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpResponseMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpResponseTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The shape ID of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's possible\nthat specific authentication schemes might influence the serialization\nlogic of an HTTP response.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the output parameters deserialized from the HTTP response.\n\nThese parameters MUST be compatible with the output of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nresponse. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + }, + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyStringList": { + "type": "list", + "member": { + "target": "smithy.test#NonEmptyString" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + } + } +} diff --git a/scripts/codegen-output-py/models/query-compatible-rpcv2-cbor.json b/scripts/codegen-output-py/models/query-compatible-rpcv2-cbor.json new file mode 100644 index 000000000..62aff10cc --- /dev/null +++ b/scripts/codegen-output-py/models/query-compatible-rpcv2-cbor.json @@ -0,0 +1,714 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "aws.api#ArnNamespace": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a service's ARN namespace.", + "smithy.api#pattern": "^[a-z0-9.\\-]{1,63}$", + "smithy.api#private": {} + } + }, + "aws.api#CloudFormationName": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a CloudFormation service name.", + "smithy.api#pattern": "^[A-Z][A-Za-z0-9]+$", + "smithy.api#private": {} + } + }, + "aws.api#CloudWatchMetricNamespace": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[^:].*$", + "smithy.api#private": {} + } + }, + "aws.api#service": { + "type": "structure", + "members": { + "sdkId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `sdkId` property is a required string value that specifies the AWS\nSDK service ID (e.g., \"API Gateway\"). This value is used for generating\nclient names in SDKs and for linking between services.", + "smithy.api#required": {} + } + }, + "arnNamespace": { + "target": "aws.api#ArnNamespace", + "traits": { + "smithy.api#documentation": "The `arnNamespace` property is a string value that defines the ARN service\nnamespace of the service (e.g., \"apigateway\"). This value is used in\nARNs assigned to resources in the service. If not set, this value\ndefaults to the lowercase name of the service shape." + } + }, + "cloudFormationName": { + "target": "aws.api#CloudFormationName", + "traits": { + "smithy.api#documentation": "The `cloudFormationName` property is a string value that specifies the\nAWS CloudFormation service name (e.g., `ApiGateway`). When not set,\nthis value defaults to the name of the service shape. This value is\npart of the CloudFormation resource type name that is automatically\nassigned to resources in the service (e.g., `AWS::::resourceName`)." + } + }, + "cloudTrailEventSource": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `cloudTrailEventSource` property is a string value that defines the\nAWS customer-facing eventSource property contained in CloudTrail event\nrecords emitted by the service. If not specified, this value defaults\nto the `arnNamespace` plus `.amazonaws.com`." + } + }, + "docId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `docId` property is a string value that defines the identifier\nused to implement linking between service and SDK documentation for\nAWS services. If not specified, this value defaults to the `sdkId` in\nlower case plus the service `version` property, separated by dashes." + } + }, + "endpointPrefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `endpointPrefix` property is a string value that identifies which\nendpoint in a given region should be used to connect to the service.\nFor example, most services in the AWS standard partition have endpoints\nwhich follow the format: `{endpointPrefix}.{region}.amazonaws.com`. A\nservice with the endpoint prefix example in the region us-west-2 might\nhave the endpoint example.us-west-2.amazonaws.com.\n\nThis value is not unique across services and is subject to change.\nTherefore, it MUST NOT be used for client naming or for any other\npurpose that requires a static, unique identifier. sdkId should be used\nfor those purposes. Additionally, this value can be used to attempt to\nresolve endpoints." + } + }, + "cloudWatchNamespace": { + "target": "aws.api#CloudWatchMetricNamespace", + "traits": { + "smithy.api#documentation": "The `cloudWatchNamespace` property is a string value that defines the\nAWS customer-facing namespace of most metrics emitted by the service." + } + } + }, + "traits": { + "smithy.api#documentation": "An AWS service is defined using the `aws.api#service` trait. This trait\nprovides information about the service like the name used to generate AWS\nSDK client classes and the namespace used in ARNs.", + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.auth#sigv4": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The signature version 4 service signing name to use in the credential\nscope when signing requests. This value SHOULD match the `arnNamespace`\nproperty of the `aws.api#service` trait if present and the `name`\nproperty of the `aws.api#sigv4a` trait if present.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html" + }, + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#authDefinition": {}, + "smithy.api#documentation": "[Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)\nis the process to add authentication information to AWS requests sent by HTTP. For\nsecurity, most requests to AWS must be signed with an access key, which consists\nof an access key ID and secret access key. These two keys are commonly referred to\nas your security credentials.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html" + }, + "smithy.api#trait": { + "selector": "service", + "breakingChanges": [ + { + "change": "remove", + "message": "Removing the existing authentication scheme is not backward compatible and can break existing clients' authentication." + } + ] + } + } + }, + "aws.protocols#awsQueryCompatible": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "Enable backward compatibility when migrating from awsQuery to the awsJson\nprotocol or Smithy RPC v2 CBOR.", + "smithy.api#trait": { + "selector": "service :test([trait|aws.protocols#awsJson1_0],\n [trait|smithy.protocols#rpcv2Cbor],\n [trait|smithy.protocols#rpcv2Json])" + } + } + }, + "aws.protocols#awsQueryError": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The value used to distinguish this error shape during serialization.", + "smithy.api#required": {} + } + }, + "httpResponseCode": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The HTTP response code used on a response containing this error shape.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Provides the value in the 'Code' distinguishing field and HTTP response\ncode for an operation error.", + "smithy.api#trait": { + "selector": "structure [trait|error]", + "breakingChanges": [ + { + "change": "any" + } + ] + } + } + }, + "aws.protocoltests.config#ErrorCodeParams": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The error code exposed to the customer.\n\nIf the SDK exposes the error code to customers, this value MUST be\nasserted to match the exposed error code.\n\nThis is modifiable by the awsQueryError trait. For services with\nawsQueryCompatible, it will be exposed in the `x-amzn-query-error`\nheader which takes the form `Code;Fault`. This value represents\nthe `Code` portion.", + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The query error type exposed to the customer.\n\nIf the SDK exposes the query error type to customers, this value MUST be\nasserted to match the exposed query error type.\n\nThis is modifiable by the awsQueryError trait. For services with\nawsQueryCompatible, it will be exposed in the `x-amzn-query-error`\nheader which takes the form `Code;Fault`. This value represents\nthe `Fault` portion." + } + } + }, + "traits": { + "smithy.api#documentation": "Vendor params to use when making assertions about error code or query\nerror type." + } + }, + "aws.protocoltests.rpcv2cbor#CustomCodeError": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "Customized", + "httpResponseCode": 402 + }, + "smithy.api#error": "client" + } + }, + "aws.protocoltests.rpcv2cbor#NoCustomCodeError": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#error": "client" + } + }, + "aws.protocoltests.rpcv2cbor#QueryCompatibleOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "aws.protocoltests.rpcv2cbor#CustomCodeError" + }, + { + "target": "aws.protocoltests.rpcv2cbor#NoCustomCodeError" + } + ], + "traits": { + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.rpcv2cbor#QueryCompatibleRpcV2Protocol": { + "type": "service", + "version": "2025-06-20", + "operations": [ + { + "target": "aws.protocoltests.rpcv2cbor#QueryCompatibleOperation" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Query Compatible RpcV2 Protocol" + }, + "aws.auth#sigv4": { + "name": "querycompatiblerpcv2protocol" + }, + "aws.protocols#awsQueryCompatible": {}, + "smithy.api#title": "Query Compatible RpcV2 Protocol Service", + "smithy.protocols#rpcv2Cbor": {} + } + }, + "smithy.protocols#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "A list of String shapes.", + "smithy.api#private": {} + } + }, + "smithy.protocols#rpcv2Cbor": { + "type": "structure", + "members": { + "http": { + "target": "smithy.protocols#StringList", + "traits": { + "smithy.api#documentation": "Priority ordered list of supported HTTP protocol versions." + } + }, + "eventStreamHttp": { + "target": "smithy.protocols#StringList", + "traits": { + "smithy.api#documentation": "Priority ordered list of supported HTTP protocol versions\nthat are required when using event streams." + } + } + }, + "traits": { + "smithy.api#documentation": "An RPC-based protocol that serializes CBOR payloads.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel", + "smithy.api#httpError", + "smithy.api#requestCompression" + ] + }, + "smithy.api#trait": { + "selector": "service" + }, + "smithy.api#traitValidators": { + "rpcv2Cbor.NoDocuments": { + "selector": "service ~> member :test(> document)", + "message": "This protocol does not support document types in most possible scenarios.", + "severity": "DANGER" + } + } + } + }, + "smithy.test#AppliesTo": { + "type": "enum", + "members": { + "CLIENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to client implementations.", + "smithy.api#enumValue": "client" + } + }, + "SERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to server implementations.", + "smithy.api#enumValue": "server" + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMessageMixin": { + "type": "structure", + "members": { + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of expected HTTP headers.\n\nHeaders that are not listed in this map are ignored unless they are\nexplicitly forbidden through `forbidHeaders`." + } + }, + "forbidHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must not appear in the serialized\nHTTP request." + } + }, + "requireHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must appear in the serialized\nHTTP message, but no assertion is made on the value.\n\nHeaders listed in `headers` do not need to appear in this list." + } + }, + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected HTTP message body.\n\nIf no request body is defined, then no assertions are made about\nthe body of the message." + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP message members and supporting protocol test members,\nsuitable for both requests and responses.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "method": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected serialized HTTP request method.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request-target of the HTTP request, not including\nthe query string (for example, \"/foo/bar\").", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint provided to the client, not including the path\nor scheme (for example, \"example.com\")." + } + }, + "resolvedHost": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint that the client should send to, not including\nthe path or scheme (for example, \"prefix.example.com\").\n\nThis can differ from the host provided to the client if the `hostPrefix`\nmember of the `endpoint` trait is set, for instance." + } + }, + "queryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of the expected serialized query string parameters.\n\nEach element in the list is a query string key value pair\nthat starts with the query string parameter name optionally\nfollowed by \"=\", optionally followed by the query string\nparameter value. For example, \"foo=bar\", \"foo=\", and \"foo\"\nare all valid values. The query string parameter name and\nthe value MUST appear in the format in which it is expected\nto be sent over the wire; if a key or value needs to be\npercent-encoded, then it MUST appear percent-encoded in this list.\n\nA serialized HTTP request is not in compliance with the protocol\nif any query string parameter defined in `queryParams` is not\ndefined in the request or if the value of a query string parameter\nin the request differs from the expected value.\n\n`queryParams` applies no constraints on additional query parameters." + } + }, + "forbidQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that must not appear in the\nserialized HTTP request.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + }, + "requireQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that MUST appear in the\nserialized request URI, but no assertion is made on the value.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP request members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpRequestMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpRequestTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's\npossible that specific authentication schemes might influence\nthe serialization logic of an HTTP request.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the input parameters used to generated the HTTP request.\n\nThese parameters MUST be compatible with the input of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "code": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Defines the HTTP response code.", + "smithy.api#range": { + "min": 100, + "max": 599 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP response members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpResponseMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpResponseTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The shape ID of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's possible\nthat specific authentication schemes might influence the serialization\nlogic of an HTTP response.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the output parameters deserialized from the HTTP response.\n\nThese parameters MUST be compatible with the output of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nresponse. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + }, + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyStringList": { + "type": "list", + "member": { + "target": "smithy.test#NonEmptyString" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + } + } +} diff --git a/scripts/codegen-output-py/models/rest-json-1.json b/scripts/codegen-output-py/models/rest-json-1.json new file mode 100644 index 000000000..338430a74 --- /dev/null +++ b/scripts/codegen-output-py/models/rest-json-1.json @@ -0,0 +1,13002 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "aws.api#ArnNamespace": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a service's ARN namespace.", + "smithy.api#pattern": "^[a-z0-9.\\-]{1,63}$", + "smithy.api#private": {} + } + }, + "aws.api#CloudFormationName": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a CloudFormation service name.", + "smithy.api#pattern": "^[A-Z][A-Za-z0-9]+$", + "smithy.api#private": {} + } + }, + "aws.api#CloudWatchMetricNamespace": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[^:].*$", + "smithy.api#private": {} + } + }, + "aws.api#service": { + "type": "structure", + "members": { + "sdkId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `sdkId` property is a required string value that specifies the AWS\nSDK service ID (e.g., \"API Gateway\"). This value is used for generating\nclient names in SDKs and for linking between services.", + "smithy.api#required": {} + } + }, + "arnNamespace": { + "target": "aws.api#ArnNamespace", + "traits": { + "smithy.api#documentation": "The `arnNamespace` property is a string value that defines the ARN service\nnamespace of the service (e.g., \"apigateway\"). This value is used in\nARNs assigned to resources in the service. If not set, this value\ndefaults to the lowercase name of the service shape." + } + }, + "cloudFormationName": { + "target": "aws.api#CloudFormationName", + "traits": { + "smithy.api#documentation": "The `cloudFormationName` property is a string value that specifies the\nAWS CloudFormation service name (e.g., `ApiGateway`). When not set,\nthis value defaults to the name of the service shape. This value is\npart of the CloudFormation resource type name that is automatically\nassigned to resources in the service (e.g., `AWS::::resourceName`)." + } + }, + "cloudTrailEventSource": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `cloudTrailEventSource` property is a string value that defines the\nAWS customer-facing eventSource property contained in CloudTrail event\nrecords emitted by the service. If not specified, this value defaults\nto the `arnNamespace` plus `.amazonaws.com`." + } + }, + "docId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `docId` property is a string value that defines the identifier\nused to implement linking between service and SDK documentation for\nAWS services. If not specified, this value defaults to the `sdkId` in\nlower case plus the service `version` property, separated by dashes." + } + }, + "endpointPrefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `endpointPrefix` property is a string value that identifies which\nendpoint in a given region should be used to connect to the service.\nFor example, most services in the AWS standard partition have endpoints\nwhich follow the format: `{endpointPrefix}.{region}.amazonaws.com`. A\nservice with the endpoint prefix example in the region us-west-2 might\nhave the endpoint example.us-west-2.amazonaws.com.\n\nThis value is not unique across services and is subject to change.\nTherefore, it MUST NOT be used for client naming or for any other\npurpose that requires a static, unique identifier. sdkId should be used\nfor those purposes. Additionally, this value can be used to attempt to\nresolve endpoints." + } + }, + "cloudWatchNamespace": { + "target": "aws.api#CloudWatchMetricNamespace", + "traits": { + "smithy.api#documentation": "The `cloudWatchNamespace` property is a string value that defines the\nAWS customer-facing namespace of most metrics emitted by the service." + } + } + }, + "traits": { + "smithy.api#documentation": "An AWS service is defined using the `aws.api#service` trait. This trait\nprovides information about the service like the name used to generate AWS\nSDK client classes and the namespace used in ARNs.", + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.auth#sigv4": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The signature version 4 service signing name to use in the credential\nscope when signing requests. This value SHOULD match the `arnNamespace`\nproperty of the `aws.api#service` trait if present and the `name`\nproperty of the `aws.api#sigv4a` trait if present.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html" + }, + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#authDefinition": {}, + "smithy.api#documentation": "[Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)\nis the process to add authentication information to AWS requests sent by HTTP. For\nsecurity, most requests to AWS must be signed with an access key, which consists\nof an access key ID and secret access key. These two keys are commonly referred to\nas your security credentials.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html" + }, + "smithy.api#trait": { + "selector": "service", + "breakingChanges": [ + { + "change": "remove", + "message": "Removing the existing authentication scheme is not backward compatible and can break existing clients' authentication." + } + ] + } + } + }, + "aws.protocols#HttpConfiguration": { + "type": "structure", + "members": { + "http": { + "target": "aws.protocols#StringList", + "traits": { + "smithy.api#documentation": "The priority ordered list of supported HTTP protocol versions." + } + }, + "eventStreamHttp": { + "target": "aws.protocols#StringList", + "traits": { + "smithy.api#documentation": "The priority ordered list of supported HTTP protocol versions that\nare required when using event streams with the service. If not set,\nthis value defaults to the value of the `http` member. Any entry in\n`eventStreamHttp` MUST also appear in `http`." + } + } + }, + "traits": { + "smithy.api#documentation": "Contains HTTP protocol configuration for HTTP-based protocols.", + "smithy.api#mixin": { + "localTraits": [ + "smithy.api#private" + ] + }, + "smithy.api#private": {} + } + }, + "aws.protocols#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "aws.protocols#restJson1": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocols#HttpConfiguration" + } + ], + "members": {}, + "traits": { + "smithy.api#documentation": "A RESTful protocol that sends JSON in structured payloads.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#timestampFormat", + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel", + "smithy.api#http", + "smithy.api#httpError", + "smithy.api#httpHeader", + "smithy.api#httpLabel", + "smithy.api#httpPayload", + "smithy.api#httpPrefixHeaders", + "smithy.api#httpQuery", + "smithy.api#httpQueryParams", + "smithy.api#httpResponseCode", + "smithy.api#httpChecksumRequired", + "smithy.api#jsonName" + ] + }, + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.protocoltests.restjson#AllQueryStringTypes": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#AllQueryStringTypesInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This example uses all query string types.", + "smithy.api#http": { + "uri": "/AllQueryStringTypesInput", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#AllQueryStringTypesInput": { + "type": "structure", + "members": { + "queryString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "String" + } + }, + "queryStringList": { + "target": "aws.protocoltests.shared#StringList", + "traits": { + "smithy.api#httpQuery": "StringList" + } + }, + "queryStringSet": { + "target": "aws.protocoltests.shared#StringSet", + "traits": { + "smithy.api#httpQuery": "StringSet" + } + }, + "queryByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#httpQuery": "Byte" + } + }, + "queryShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#httpQuery": "Short" + } + }, + "queryInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "Integer" + } + }, + "queryIntegerList": { + "target": "aws.protocoltests.shared#IntegerList", + "traits": { + "smithy.api#httpQuery": "IntegerList" + } + }, + "queryIntegerSet": { + "target": "aws.protocoltests.shared#IntegerSet", + "traits": { + "smithy.api#httpQuery": "IntegerSet" + } + }, + "queryLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#httpQuery": "Long" + } + }, + "queryFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#httpQuery": "Float" + } + }, + "queryDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpQuery": "Double" + } + }, + "queryDoubleList": { + "target": "aws.protocoltests.shared#DoubleList", + "traits": { + "smithy.api#httpQuery": "DoubleList" + } + }, + "queryBoolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "Boolean" + } + }, + "queryBooleanList": { + "target": "aws.protocoltests.shared#BooleanList", + "traits": { + "smithy.api#httpQuery": "BooleanList" + } + }, + "queryTimestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpQuery": "Timestamp" + } + }, + "queryTimestampList": { + "target": "aws.protocoltests.shared#TimestampList", + "traits": { + "smithy.api#httpQuery": "TimestampList" + } + }, + "queryEnum": { + "target": "aws.protocoltests.shared#FooEnum", + "traits": { + "smithy.api#httpQuery": "Enum" + } + }, + "queryEnumList": { + "target": "aws.protocoltests.shared#FooEnumList", + "traits": { + "smithy.api#httpQuery": "EnumList" + } + }, + "queryIntegerEnum": { + "target": "aws.protocoltests.shared#IntegerEnum", + "traits": { + "smithy.api#httpQuery": "IntegerEnum" + } + }, + "queryIntegerEnumList": { + "target": "aws.protocoltests.shared#IntegerEnumList", + "traits": { + "smithy.api#httpQuery": "IntegerEnumList" + } + }, + "queryParamsMapOfStringList": { + "target": "aws.protocoltests.shared#StringListMap", + "traits": { + "smithy.api#httpQueryParams": {} + } + } + }, + "traits": { + "smithy.api#suppress": [ + "HttpQueryParamsTrait" + ] + } + }, + "aws.protocoltests.restjson#BlobPayloadEvent": { + "type": "structure", + "members": { + "payload": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#eventPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#ClientOptionalDefaults": { + "type": "structure", + "members": { + "member": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#default": 0 + } + } + } + }, + "aws.protocoltests.restjson#ComplexError": { + "type": "structure", + "members": { + "Header": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Header" + } + }, + "TopLevel": { + "target": "smithy.api#String" + }, + "Nested": { + "target": "aws.protocoltests.restjson#ComplexNestedErrorData" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when a request is invalid.", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "aws.protocoltests.restjson#ComplexNestedErrorData": { + "type": "structure", + "members": { + "Foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "Fooooo" + } + } + } + }, + "aws.protocoltests.restjson#ConstantAndVariableQueryString": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#ConstantAndVariableQueryStringInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This example uses fixed query string params and variable query string params.\nThe fixed query string parameters and variable parameters must both be\nserialized (implementations may need to merge them together).", + "smithy.api#http": { + "uri": "/ConstantAndVariableQueryString?foo=bar", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#ConstantAndVariableQueryStringInput": { + "type": "structure", + "members": { + "baz": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "baz" + } + }, + "maybeSet": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "maybeSet" + } + } + } + }, + "aws.protocoltests.restjson#ConstantQueryString": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#ConstantQueryStringInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This example uses a constant query string parameters and a label.\nThis simply tests that labels and query string parameters are\ncompatible. The fixed query string parameter named \"hello\" should\nin no way conflict with the label, `{hello}`.", + "smithy.api#http": { + "uri": "/ConstantQueryString/{hello}?foo=bar&hello", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#ConstantQueryStringInput": { + "type": "structure", + "members": { + "hello": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restjson#ContentTypeParameters": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#ContentTypeParametersInput" + }, + "output": { + "target": "aws.protocoltests.restjson#ContentTypeParametersOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how servers must support requests\ncontaining a `Content-Type` header with parameters.", + "smithy.api#http": { + "uri": "/ContentTypeParameters", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#ContentTypeParametersInput": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#Integer" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#ContentTypeParametersOutput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#DatetimeOffsets": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restjson#DatetimeOffsetsOutput" + }, + "traits": { + "smithy.api#http": { + "uri": "/DatetimeOffsets", + "method": "POST" + }, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restjson#DatetimeOffsetsOutput": { + "type": "structure", + "members": { + "datetime": { + "target": "aws.protocoltests.shared#DateTime" + } + } + }, + "aws.protocoltests.restjson#Defaults": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restjson#DefaultsMixin" + } + ], + "members": {} + }, + "aws.protocoltests.restjson#DefaultsMixin": { + "type": "structure", + "members": { + "defaultString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "hi" + } + }, + "defaultBoolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#default": true + } + }, + "defaultList": { + "target": "aws.protocoltests.restjson#TestStringList", + "traits": { + "smithy.api#default": [] + } + }, + "defaultDocumentMap": { + "target": "aws.protocoltests.restjson#Document", + "traits": { + "smithy.api#default": {} + } + }, + "defaultDocumentString": { + "target": "aws.protocoltests.restjson#Document", + "traits": { + "smithy.api#default": "hi" + } + }, + "defaultDocumentBoolean": { + "target": "aws.protocoltests.restjson#Document", + "traits": { + "smithy.api#default": true + } + }, + "defaultDocumentList": { + "target": "aws.protocoltests.restjson#Document", + "traits": { + "smithy.api#default": [] + } + }, + "defaultNullDocument": { + "target": "aws.protocoltests.restjson#Document", + "traits": { + "smithy.api#default": null + } + }, + "defaultTimestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#default": 0 + } + }, + "defaultBlob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#default": "YWJj" + } + }, + "defaultByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#default": 1 + } + }, + "defaultShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#default": 1 + } + }, + "defaultInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 10 + } + }, + "defaultLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#default": 100 + } + }, + "defaultFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#default": 1.0 + } + }, + "defaultDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#default": 1.0 + } + }, + "defaultMap": { + "target": "aws.protocoltests.restjson#TestStringMap", + "traits": { + "smithy.api#default": {} + } + }, + "defaultEnum": { + "target": "aws.protocoltests.restjson#TestEnum", + "traits": { + "smithy.api#default": "FOO" + } + }, + "defaultIntEnum": { + "target": "aws.protocoltests.restjson#TestIntEnum", + "traits": { + "smithy.api#default": 1 + } + }, + "emptyString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "" + } + }, + "falseBoolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#default": false + } + }, + "emptyBlob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#default": "" + } + }, + "zeroByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#default": 0.0 + } + }, + "zeroDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#default": 0.0 + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.restjson#DenseBooleanMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Boolean" + } + }, + "aws.protocoltests.restjson#DenseNumberMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Integer" + } + }, + "aws.protocoltests.restjson#DenseSetMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#StringSet" + } + }, + "aws.protocoltests.restjson#DenseStringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.restjson#DenseStructMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#GreetingStruct" + } + }, + "aws.protocoltests.restjson#Dialog": { + "type": "structure", + "members": { + "language": { + "target": "smithy.api#String" + }, + "greeting": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "hi" + } + }, + "farewell": { + "target": "aws.protocoltests.restjson#Farewell" + } + } + }, + "aws.protocoltests.restjson#DialogList": { + "type": "list", + "member": { + "target": "aws.protocoltests.restjson#Dialog" + } + }, + "aws.protocoltests.restjson#DialogMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.restjson#Dialog" + } + }, + "aws.protocoltests.restjson#Document": { + "type": "document" + }, + "aws.protocoltests.restjson#DocumentType": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#DocumentTypeInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#DocumentTypeInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes a document as part of the payload.", + "smithy.api#http": { + "uri": "/DocumentType", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#DocumentTypeAsMapValue": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#DocumentTypeAsMapValueInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#DocumentTypeAsMapValueInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes documents as the value of maps.", + "smithy.api#http": { + "uri": "/DocumentTypeAsMapValue", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#DocumentTypeAsMapValueInputOutput": { + "type": "structure", + "members": { + "docValuedMap": { + "target": "aws.protocoltests.restjson#DocumentValuedMap" + } + } + }, + "aws.protocoltests.restjson#DocumentTypeAsPayload": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#DocumentTypeAsPayloadInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#DocumentTypeAsPayloadInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes a document as the entire HTTP payload.", + "smithy.api#http": { + "uri": "/DocumentTypeAsPayload", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#DocumentTypeAsPayloadInputOutput": { + "type": "structure", + "members": { + "documentValue": { + "target": "aws.protocoltests.restjson#Document", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#DocumentTypeInputOutput": { + "type": "structure", + "members": { + "stringValue": { + "target": "smithy.api#String" + }, + "documentValue": { + "target": "aws.protocoltests.restjson#Document" + } + } + }, + "aws.protocoltests.restjson#DocumentValuedMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.restjson#Document" + } + }, + "aws.protocoltests.restjson#DuplexStream": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#DuplexStreamInput" + }, + "output": { + "target": "aws.protocoltests.restjson#DuplexStreamOutput" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/DuplexStream" + }, + "smithy.test#eventStreamTests": [ + { + "id": "DuplexBooleanHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "booleanHeader": true + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "booleanHeader": { + "boolean": true + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMNYm9vbGVhbkhlYWRlcgC4J9Ws" + } + ] + }, + { + "id": "DuplexByteHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "byteHeader": 1 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "byteHeader": { + "byte": 1 + } + }, + "bytes": "AAAASQAAADlvxG1ZDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMKYnl0ZUhlYWRlcgIBKFTmjg==" + } + ] + }, + { + "id": "DuplexShortHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "shortHeader": 2 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "shortHeader": { + "short": 2 + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMLc2hvcnRIZWFkZXIDAAL1ETsK" + } + ] + }, + { + "id": "DuplexIntegerHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "intHeader": 3 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "intHeader": { + "integer": 3 + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMJaW50SGVhZGVyBAAAAAPlyUrb" + } + ] + }, + { + "id": "DuplexLongHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "longHeader": 4294967294 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "longHeader": { + "long": 4294967294 + } + }, + "bytes": "AAAAUAAAAEAr7VEyDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMKbG9uZ0hlYWRlcgUAAAAA/////udnd/I=" + } + ] + }, + { + "id": "DuplexBlobHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "blobHeader": "foo" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "blobHeader": { + "blob": "Zm9v" + } + }, + "bytes": "AAAATQAAAD2dKQ+ADTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMKYmxvYkhlYWRlcgYAA2Zvb5sbbGM=" + } + ] + }, + { + "id": "DuplexStringHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "stringHeader": "foo" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "stringHeader": { + "string": "foo" + } + }, + "bytes": "AAAATwAAAD8J5z3MDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMMc3RyaW5nSGVhZGVyBwADZm9vxT+2MA==" + } + ] + }, + { + "id": "DuplexTimestampHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "timestampHeader": "2024-10-31T14:15:14Z" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "timestampHeader": { + "timestamp": "2024-10-31T14:15:14Z" + } + }, + "bytes": "AAAAVQAAAEWTZyrNDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMPdGltZXN0YW1wSGVhZGVyCAAAAZLi7jFQ6uV3Eg==" + } + ] + }, + { + "id": "DuplexMultipleHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "booleanHeader": true, + "stringHeader": "foo", + "blobHeader": "bar" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "booleanHeader": { + "boolean": true + }, + "stringHeader": { + "string": "foo" + }, + "blobHeader": { + "blob": "YmFy" + } + }, + "bytes": "AAAAbwAAAF+FlHOQDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMNYm9vbGVhbkhlYWRlcgAMc3RyaW5nSGVhZGVyBwADZm9vCmJsb2JIZWFkZXIGAANiYXIDXbo7" + } + ] + }, + { + "id": "DuplexStringPayloadInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "stringPayload": { + "payload": "foo" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "stringPayload" + }, + ":content-type": { + "string": "text/plain" + } + }, + "body": "foo", + "bodyMediaType": "text/plain", + "bytes": "AAAAYAAAAE30fZUJDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcADXN0cmluZ1BheWxvYWQNOmNvbnRlbnQtdHlwZQcACnRleHQvcGxhaW5mb29G1ELr" + } + ] + }, + { + "id": "DuplexBlobPayloadInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "blobPayload": { + "payload": "bar" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "blobPayload" + }, + ":content-type": { + "string": "application/octet-stream" + } + }, + "body": "bar", + "bodyMediaType": "application/octet-stream", + "bytes": "AAAAbAAAAFkrV6x1DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAC2Jsb2JQYXlsb2FkDTpjb250ZW50LXR5cGUHABhhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW1iYXJv5nGJ" + } + ] + }, + { + "id": "DuplexStructurePayloadInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "structurePayload": { + "payload": { + "structureMember": "foo" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "structurePayload" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"structureMember\":\"foo\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAfwAAAFacqFy2DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAEHN0cnVjdHVyZVBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb257InN0cnVjdHVyZU1lbWJlciI6ImZvbyJ9rcIRVA==" + } + ] + }, + { + "id": "DuplexUnionPayloadInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "unionPayload": { + "payload": { + "unionMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "unionPayload" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"unionMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAdwAAAFKrtdNuDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcADHVuaW9uUGF5bG9hZA06Y29udGVudC10eXBlBwAQYXBwbGljYXRpb24vanNvbnsidW5pb25NZW1iZXIiOiJiYXIifcZDMD4=" + } + ] + }, + { + "id": "DuplexHeadersAndExplicitPayloadInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headersAndExplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAlQAAAGw4wFp6DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAGWhlYWRlcnNBbmRFeHBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJzdHJ1Y3R1cmVNZW1iZXIiOiJiYXIifTafKXs=" + } + ] + }, + { + "id": "DuplexHeadersAndImplicitPayloadInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headersAndImplicitPayload": { + "header": "foo", + "payload": "bar" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headersAndImplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"payload\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAjQAAAGxoUIY5DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAGWhlYWRlcnNBbmRJbXBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJwYXlsb2FkIjoiYmFyIn15lZtT" + } + ] + }, + { + "id": "DuplexServerErrorInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "error": { + "message": "foo" + } + }, + "headers": { + ":message-type": { + "string": "exception" + }, + ":exception-type": { + "string": "error" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"message\":\"foo\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAdAAAAFObEpkoDTptZXNzYWdlLXR5cGUHAAlleGNlcHRpb24POmV4Y2VwdGlvbi10eXBlBwAFZXJyb3INOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb257Im1lc3NhZ2UiOiJmb28ifTua1S8=" + } + ], + "expectation": { + "failure": { + "errorId": "aws.protocoltests.restjson#ErrorEvent" + } + }, + "appliesTo": "server" + }, + { + "id": "DuplexClientErrorInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "error": { + "message": "foo" + } + }, + "headers": { + ":message-type": { + "string": "exception" + }, + ":exception-type": { + "string": "error" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"message\":\"foo\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAdAAAAFObEpkoDTptZXNzYWdlLXR5cGUHAAlleGNlcHRpb24POmV4Y2VwdGlvbi10eXBlBwAFZXJyb3INOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb257Im1lc3NhZ2UiOiJmb28ifTua1S8=" + } + ], + "appliesTo": "client" + }, + { + "id": "DuplexServerUnexpectedErrorInput", + "documentation": "Servers must be able to handle structured, but unmodeled errors.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "headers": { + ":message-type": { + "string": "error" + }, + ":error-code": { + "string": "internal-error" + }, + ":error-message": { + "string": "An unknown error occurred." + } + }, + "bytes": "AAAAbwAAAF+FlHOQDTptZXNzYWdlLXR5cGUHAAVlcnJvcgs6ZXJyb3ItY29kZQcADmludGVybmFsLWVycm9yDjplcnJvci1tZXNzYWdlBwAaQW4gdW5rbm93biBlcnJvciBvY2N1cnJlZC4kun0t" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "server" + }, + { + "id": "DuplexMissingMessageTypeInput", + "documentation": "Servers must reject events that don't contain a :message-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":event-type": { + "string": "headersAndExplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAfwAAAFacqFy2CzpldmVudC10eXBlBwAZaGVhZGVyc0FuZEV4cGxpY2l0UGF5bG9hZA06Y29udGVudC10eXBlBwAQYXBwbGljYXRpb24vanNvbgZoZWFkZXIHAANmb297InN0cnVjdHVyZU1lbWJlciI6ImJhciJ98LexJg==" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "server" + }, + { + "id": "DuplexMalformedMessageTypeInput", + "documentation": "Servers must reject events that contain a malformed :message-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "blob": "ZXZlbnQ=" + }, + ":event-type": { + "string": "headersAndExplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAlQAAAGw4wFp6DTptZXNzYWdlLXR5cGUGAAVldmVudAs6ZXZlbnQtdHlwZQcAGWhlYWRlcnNBbmRFeHBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJzdHJ1Y3R1cmVNZW1iZXIiOiJiYXIifVwdfzU=" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "server" + }, + { + "id": "DuplexMissingEventTypeInput", + "documentation": "Servers must reject message events that don't contain an :event-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAbQAAAER1MekcDTptZXNzYWdlLXR5cGUHAAVldmVudA06Y29udGVudC10eXBlBwAQYXBwbGljYXRpb24vanNvbgZoZWFkZXIHAANmb297InN0cnVjdHVyZU1lbWJlciI6ImJhciJ9riy0Gg==" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "server" + }, + { + "id": "DuplexMalformedEventTypeInput", + "documentation": "Servers must reject message events that contain a malformed :event-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "blob": "aGVhZGVyc0FuZEV4cGxpY2l0UGF5bG9hZA==" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAlQAAAGw4wFp6DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQYAGWhlYWRlcnNBbmRFeHBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJzdHJ1Y3R1cmVNZW1iZXIiOiJiYXIifcP6KLk=" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "server" + }, + { + "id": "DuplexBooleanHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "booleanHeader": true + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "booleanHeader": { + "boolean": true + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMNYm9vbGVhbkhlYWRlcgC4J9Ws" + } + ] + }, + { + "id": "DuplexByteHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "byteHeader": 1 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "byteHeader": { + "byte": 1 + } + }, + "bytes": "AAAASQAAADlvxG1ZDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMKYnl0ZUhlYWRlcgIBKFTmjg==" + } + ] + }, + { + "id": "DuplexShortHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "shortHeader": 2 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "shortHeader": { + "short": 2 + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMLc2hvcnRIZWFkZXIDAAL1ETsK" + } + ] + }, + { + "id": "DuplexIntegerHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "intHeader": 3 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "intHeader": { + "integer": 3 + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMJaW50SGVhZGVyBAAAAAPlyUrb" + } + ] + }, + { + "id": "DuplexLongHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "longHeader": 4294967294 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "longHeader": { + "long": 4294967294 + } + }, + "bytes": "AAAAUAAAAEAr7VEyDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMKbG9uZ0hlYWRlcgUAAAAA/////udnd/I=" + } + ] + }, + { + "id": "DuplexBlobHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "blobHeader": "foo" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "blobHeader": { + "blob": "Zm9v" + } + }, + "bytes": "AAAATQAAAD2dKQ+ADTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMKYmxvYkhlYWRlcgYAA2Zvb5sbbGM=" + } + ] + }, + { + "id": "DuplexStringHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "stringHeader": "foo" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "stringHeader": { + "string": "foo" + } + }, + "bytes": "AAAATwAAAD8J5z3MDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMMc3RyaW5nSGVhZGVyBwADZm9vxT+2MA==" + } + ] + }, + { + "id": "DuplexTimestampHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "timestampHeader": "2024-10-31T14:15:14Z" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "timestampHeader": { + "timestamp": "2024-10-31T14:15:14Z" + } + }, + "bytes": "AAAAVQAAAEWTZyrNDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMPdGltZXN0YW1wSGVhZGVyCAAAAZLi7jFQ6uV3Eg==" + } + ] + }, + { + "id": "DuplexMultipleHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "booleanHeader": true, + "stringHeader": "foo", + "blobHeader": "bar" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "booleanHeader": { + "boolean": true + }, + "stringHeader": { + "string": "foo" + }, + "blobHeader": { + "blob": "YmFy" + } + }, + "bytes": "AAAAbwAAAF+FlHOQDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMNYm9vbGVhbkhlYWRlcgAMc3RyaW5nSGVhZGVyBwADZm9vCmJsb2JIZWFkZXIGAANiYXIDXbo7" + } + ] + }, + { + "id": "DuplexStringPayloadOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "stringPayload": { + "payload": "foo" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "stringPayload" + }, + ":content-type": { + "string": "text/plain" + } + }, + "body": "foo", + "bodyMediaType": "text/plain", + "bytes": "AAAAYAAAAE30fZUJDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcADXN0cmluZ1BheWxvYWQNOmNvbnRlbnQtdHlwZQcACnRleHQvcGxhaW5mb29G1ELr" + } + ] + }, + { + "id": "DuplexBlobPayloadOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "blobPayload": { + "payload": "bar" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "blobPayload" + }, + ":content-type": { + "string": "application/octet-stream" + } + }, + "body": "bar", + "bodyMediaType": "application/octet-stream", + "bytes": "AAAAbAAAAFkrV6x1DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAC2Jsb2JQYXlsb2FkDTpjb250ZW50LXR5cGUHABhhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW1iYXJv5nGJ" + } + ] + }, + { + "id": "DuplexStructurePayloadOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "structurePayload": { + "payload": { + "structureMember": "foo" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "structurePayload" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"structureMember\":\"foo\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAfwAAAFacqFy2DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAEHN0cnVjdHVyZVBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb257InN0cnVjdHVyZU1lbWJlciI6ImZvbyJ9rcIRVA==" + } + ] + }, + { + "id": "DuplexUnionPayloadOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "unionPayload": { + "payload": { + "unionMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "unionPayload" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"unionMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAdwAAAFKrtdNuDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcADHVuaW9uUGF5bG9hZA06Y29udGVudC10eXBlBwAQYXBwbGljYXRpb24vanNvbnsidW5pb25NZW1iZXIiOiJiYXIifcZDMD4=" + } + ] + }, + { + "id": "DuplexHeadersAndExplicitPayloadOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headersAndExplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAlQAAAGw4wFp6DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAGWhlYWRlcnNBbmRFeHBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJzdHJ1Y3R1cmVNZW1iZXIiOiJiYXIifTafKXs=" + } + ] + }, + { + "id": "DuplexHeadersAndImplicitPayloadOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headersAndImplicitPayload": { + "header": "foo", + "payload": "bar" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headersAndImplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"payload\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAjQAAAGxoUIY5DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAGWhlYWRlcnNBbmRJbXBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJwYXlsb2FkIjoiYmFyIn15lZtT" + } + ] + }, + { + "id": "DuplexServerErrorOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "error": { + "message": "foo" + } + }, + "headers": { + ":message-type": { + "string": "exception" + }, + ":exception-type": { + "string": "error" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"message\":\"foo\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAdAAAAFObEpkoDTptZXNzYWdlLXR5cGUHAAlleGNlcHRpb24POmV4Y2VwdGlvbi10eXBlBwAFZXJyb3INOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb257Im1lc3NhZ2UiOiJmb28ifTua1S8=" + } + ], + "appliesTo": "server" + }, + { + "id": "DuplexClientErrorOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "error": { + "message": "foo" + } + }, + "headers": { + ":message-type": { + "string": "exception" + }, + ":exception-type": { + "string": "error" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"message\":\"foo\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAdAAAAFObEpkoDTptZXNzYWdlLXR5cGUHAAlleGNlcHRpb24POmV4Y2VwdGlvbi10eXBlBwAFZXJyb3INOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb257Im1lc3NhZ2UiOiJmb28ifTua1S8=" + } + ], + "expectation": { + "failure": { + "errorId": "aws.protocoltests.restjson#ErrorEvent" + } + }, + "appliesTo": "client" + }, + { + "id": "DuplexClientUnexpectedErrorOutput", + "documentation": "Clients must be able to handle structured, but unmodeled errors.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "headers": { + ":message-type": { + "string": "error" + }, + ":error-code": { + "string": "internal-error" + }, + ":error-message": { + "string": "An unknown error occurred." + } + }, + "bytes": "AAAAbwAAAF+FlHOQDTptZXNzYWdlLXR5cGUHAAVlcnJvcgs6ZXJyb3ItY29kZQcADmludGVybmFsLWVycm9yDjplcnJvci1tZXNzYWdlBwAaQW4gdW5rbm93biBlcnJvciBvY2N1cnJlZC4kun0t" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "client" + }, + { + "id": "DuplexMissingMessageTypeOutput", + "documentation": "Clients must reject events that don't contain a :message-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":event-type": { + "string": "headersAndExplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAfwAAAFacqFy2CzpldmVudC10eXBlBwAZaGVhZGVyc0FuZEV4cGxpY2l0UGF5bG9hZA06Y29udGVudC10eXBlBwAQYXBwbGljYXRpb24vanNvbgZoZWFkZXIHAANmb297InN0cnVjdHVyZU1lbWJlciI6ImJhciJ98LexJg==" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "client" + }, + { + "id": "DuplexMalformedMessageTypeOutput", + "documentation": "Client must reject events that contain a malformed :message-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "blob": "ZXZlbnQ=" + }, + ":event-type": { + "string": "headersAndExplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAlQAAAGw4wFp6DTptZXNzYWdlLXR5cGUGAAVldmVudAs6ZXZlbnQtdHlwZQcAGWhlYWRlcnNBbmRFeHBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJzdHJ1Y3R1cmVNZW1iZXIiOiJiYXIifVwdfzU=" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "client" + }, + { + "id": "DuplexMissingEventTypeOutput", + "documentation": "Clients must reject message events that don't contain an :event-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAbQAAAER1MekcDTptZXNzYWdlLXR5cGUHAAVldmVudA06Y29udGVudC10eXBlBwAQYXBwbGljYXRpb24vanNvbgZoZWFkZXIHAANmb297InN0cnVjdHVyZU1lbWJlciI6ImJhciJ9riy0Gg==" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "client" + }, + { + "id": "DuplexMalformedEventTypeOutput", + "documentation": "Clients must reject message events that contain a malformed :event-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "blob": "aGVhZGVyc0FuZEV4cGxpY2l0UGF5bG9hZA==" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAlQAAAGw4wFp6DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQYAGWhlYWRlcnNBbmRFeHBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJzdHJ1Y3R1cmVNZW1iZXIiOiJiYXIifcP6KLk=" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "client" + } + ] + } + }, + "aws.protocoltests.restjson#DuplexStreamInput": { + "type": "structure", + "members": { + "stream": { + "target": "aws.protocoltests.restjson#EventStream", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#DuplexStreamOutput": { + "type": "structure", + "members": { + "stream": { + "target": "aws.protocoltests.restjson#EventStream", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#DuplexStreamWithDistinctStreams": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#DuplexStreamWithDistinctStreamsInput" + }, + "output": { + "target": "aws.protocoltests.restjson#DuplexStreamWithDistinctStreamsOutput" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/DuplexStreamWithDistinctStreams" + } + } + }, + "aws.protocoltests.restjson#DuplexStreamWithDistinctStreamsInput": { + "type": "structure", + "members": { + "stream": { + "target": "aws.protocoltests.restjson#EventStream", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#DuplexStreamWithDistinctStreamsOutput": { + "type": "structure", + "members": { + "stream": { + "target": "aws.protocoltests.restjson#SingletonEventStream", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#DuplexStreamWithInitialMessages": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#DuplexStreamWithInitialMessagesInput" + }, + "output": { + "target": "aws.protocoltests.restjson#DuplexStreamWithInitialMessagesOutput" + }, + "errors": [ + { + "target": "aws.protocoltests.restjson#ServiceUnavailableError" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/DuplexStreamWithInitialMessages" + }, + "smithy.test#eventStreamTests": [ + { + "id": "DuplexInitialRequestInput", + "protocol": "aws.protocols#restJson1", + "initialRequestParams": { + "initialRequestMember": "foo" + }, + "initialRequest": { + "method": "POST", + "uri": "/DuplexStreamWithInitialMessages", + "headers": { + "initial-request-member": "foo" + } + }, + "initialRequestShape": "smithy.test#InitialHttpRequest" + }, + { + "id": "DuplexMissingRequiredInitialRequestInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "booleanHeader": true + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "booleanHeader": { + "boolean": true + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMNYm9vbGVhbkhlYWRlcgC4J9Ws" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "server" + }, + { + "id": "DuplexInitialResponseOutput", + "protocol": "aws.protocols#restJson1", + "initialResponseParams": { + "initialResponseMember": "foo" + }, + "initialResponse": { + "code": 200, + "headers": { + "initial-response-member": "foo" + } + }, + "initialResponseShape": "smithy.test#InitialHttpResponse" + }, + { + "id": "DuplexMissingRequiredInitialResponseOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "booleanHeader": true + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "booleanHeader": { + "boolean": true + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMNYm9vbGVhbkhlYWRlcgC4J9Ws" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "client" + }, + { + "id": "DuplexModeledProtocolError", + "protocol": "aws.protocols#restJson1", + "initialResponse": { + "code": 500, + "headers": { + "Content-Type": "application/json", + "X-Amzn-Errortype": "ServiceUnavailableError" + }, + "body": "{\"message\": \"foo\"}", + "bodyMediaType": "application/json" + }, + "initialResponseShape": "smithy.test#InitialHttpResponse", + "expectation": { + "failure": { + "errorId": "aws.protocoltests.restjson#ServiceUnavailableError" + } + }, + "appliesTo": "client" + }, + { + "id": "DuplexUnmodeledProtocolError", + "protocol": "aws.protocols#restJson1", + "initialResponse": { + "code": 500, + "headers": { + "Content-Type": "text/plain" + }, + "body": "service unavailable", + "bodyMediaType": "text/plain" + }, + "initialResponseShape": "smithy.test#InitialHttpResponse", + "expectation": { + "failure": {} + }, + "appliesTo": "client" + } + ] + } + }, + "aws.protocoltests.restjson#DuplexStreamWithInitialMessagesInput": { + "type": "structure", + "members": { + "initialRequestMember": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "initial-request-member", + "smithy.api#required": {} + } + }, + "stream": { + "target": "aws.protocoltests.restjson#EventStream", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#DuplexStreamWithInitialMessagesOutput": { + "type": "structure", + "members": { + "initialResponseMember": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "initial-response-member", + "smithy.api#required": {} + } + }, + "stream": { + "target": "aws.protocoltests.restjson#EventStream", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#EmptyInputAndEmptyOutput": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#EmptyInputAndEmptyOutputInput" + }, + "output": { + "target": "aws.protocoltests.restjson#EmptyInputAndEmptyOutputOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request or response payload because the operation has an empty input\nand empty output structure that reuses the same shape. While this should\nbe rare, code generators must support this.", + "smithy.api#http": { + "uri": "/EmptyInputAndEmptyOutput", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#EmptyInputAndEmptyOutputInput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#EmptyInputAndEmptyOutputOutput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#EndpointOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#endpoint": { + "hostPrefix": "foo." + }, + "smithy.api#http": { + "uri": "/EndpointOperation", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#EndpointWithHostLabelOperation": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HostLabelInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#endpoint": { + "hostPrefix": "foo.{label}." + }, + "smithy.api#http": { + "uri": "/EndpointWithHostLabelOperation", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#EnumPayloadInput": { + "type": "structure", + "members": { + "payload": { + "target": "aws.protocoltests.restjson#StringEnum", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#ErrorEvent": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#error": "client" + } + }, + "aws.protocoltests.restjson#EventStream": { + "type": "union", + "members": { + "headers": { + "target": "aws.protocoltests.restjson#HeadersEvent" + }, + "blobPayload": { + "target": "aws.protocoltests.restjson#BlobPayloadEvent" + }, + "stringPayload": { + "target": "aws.protocoltests.restjson#StringPayloadEvent" + }, + "structurePayload": { + "target": "aws.protocoltests.restjson#StructurePayloadEvent" + }, + "unionPayload": { + "target": "aws.protocoltests.restjson#UnionPayloadEvent" + }, + "headersAndExplicitPayload": { + "target": "aws.protocoltests.restjson#HeadersAndExplicitPayloadEvent" + }, + "headersAndImplicitPayload": { + "target": "aws.protocoltests.restjson#HeadersAndImplicitPayloadEvent" + }, + "error": { + "target": "aws.protocoltests.restjson#ErrorEvent" + } + }, + "traits": { + "smithy.api#streaming": {} + } + }, + "aws.protocoltests.restjson#Farewell": { + "type": "structure", + "members": { + "phrase": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "bye" + } + } + } + }, + "aws.protocoltests.restjson#FiniteStreamingBlob": { + "type": "blob", + "traits": { + "smithy.api#requiresLength": {}, + "smithy.api#streaming": {} + } + }, + "aws.protocoltests.restjson#FooError": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "This error has test cases that test some of the dark corners of Amazon service\nframework history. It should only be implemented by clients.", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restjson#FractionalSeconds": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restjson#FractionalSecondsOutput" + }, + "traits": { + "smithy.api#http": { + "uri": "/FractionalSeconds", + "method": "POST" + }, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restjson#FractionalSecondsOutput": { + "type": "structure", + "members": { + "datetime": { + "target": "aws.protocoltests.shared#DateTime" + } + } + }, + "aws.protocoltests.restjson#GreetingWithErrors": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restjson#GreetingWithErrorsOutput" + }, + "errors": [ + { + "target": "aws.protocoltests.restjson#ComplexError" + }, + { + "target": "aws.protocoltests.restjson#FooError" + }, + { + "target": "aws.protocoltests.restjson#InvalidGreeting" + } + ], + "traits": { + "smithy.api#documentation": "This operation has four possible return values:\n\n1. A successful response in the form of GreetingWithErrorsOutput\n2. An InvalidGreeting error.\n3. A BadRequest error.\n4. A FooError.\n\nImplementations must be able to successfully take a response and\nproperly (de)serialize successful and error responses based on the\nthe presence of the", + "smithy.api#http": { + "uri": "/GreetingWithErrors", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#GreetingWithErrorsOutput": { + "type": "structure", + "members": { + "greeting": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Greeting" + } + } + } + }, + "aws.protocoltests.restjson#HeadersAndExplicitPayloadEvent": { + "type": "structure", + "members": { + "header": { + "target": "smithy.api#String", + "traits": { + "smithy.api#eventHeader": {} + } + }, + "payload": { + "target": "aws.protocoltests.restjson#PayloadStructure", + "traits": { + "smithy.api#eventPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#HeadersAndImplicitPayloadEvent": { + "type": "structure", + "members": { + "header": { + "target": "smithy.api#String", + "traits": { + "smithy.api#eventHeader": {} + } + }, + "payload": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.restjson#HeadersEvent": { + "type": "structure", + "members": { + "booleanHeader": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#eventHeader": {} + } + }, + "byteHeader": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#eventHeader": {} + } + }, + "shortHeader": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#eventHeader": {} + } + }, + "intHeader": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#eventHeader": {} + } + }, + "longHeader": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#eventHeader": {} + } + }, + "blobHeader": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#eventHeader": {} + } + }, + "stringHeader": { + "target": "smithy.api#String", + "traits": { + "smithy.api#eventHeader": {} + } + }, + "timestampHeader": { + "target": "aws.protocoltests.shared#DateTime", + "traits": { + "smithy.api#eventHeader": {} + } + } + } + }, + "aws.protocoltests.restjson#HostLabelInput": { + "type": "structure", + "members": { + "label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#hostLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restjson#HostWithPathOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/HostWithPathOperation", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#HttpChecksumRequired": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpChecksumRequiredInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#HttpChecksumRequiredInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example tests httpChecksumRequired trait", + "smithy.api#http": { + "uri": "/HttpChecksumRequired", + "method": "POST" + }, + "smithy.api#httpChecksumRequired": {}, + "smithy.api#suppress": [ + "UnstableTrait" + ] + } + }, + "aws.protocoltests.restjson#HttpChecksumRequiredInputOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.restjson#HttpEmptyPrefixHeaders": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpEmptyPrefixHeadersInput" + }, + "output": { + "target": "aws.protocoltests.restjson#HttpEmptyPrefixHeadersOutput" + }, + "traits": { + "smithy.api#documentation": "Clients that perform this test extract all headers from the response.", + "smithy.api#http": { + "uri": "/HttpEmptyPrefixHeaders", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#HttpEmptyPrefixHeadersInput": { + "type": "structure", + "members": { + "prefixHeaders": { + "target": "aws.protocoltests.shared#StringMap", + "traits": { + "smithy.api#httpPrefixHeaders": "" + } + }, + "specificHeader": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "hello" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#HttpEmptyPrefixHeadersOutput": { + "type": "structure", + "members": { + "prefixHeaders": { + "target": "aws.protocoltests.shared#StringMap", + "traits": { + "smithy.api#httpPrefixHeaders": "" + } + }, + "specificHeader": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "hello" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#HttpEnumPayload": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#EnumPayloadInput" + }, + "output": { + "target": "aws.protocoltests.restjson#EnumPayloadInput" + }, + "traits": { + "smithy.api#http": { + "uri": "/EnumPayload", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#HttpPayloadTraits": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpPayloadTraitsInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#HttpPayloadTraitsInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes a blob shape in the payload.\n\nIn this example, no JSON document is synthesized because the payload is\nnot a structure or a union type.", + "smithy.api#http": { + "uri": "/HttpPayloadTraits", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#HttpPayloadTraitsInputOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Foo" + } + }, + "blob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#HttpPayloadTraitsWithMediaType": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpPayloadTraitsWithMediaTypeInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#HttpPayloadTraitsWithMediaTypeInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example uses a `@mediaType` trait on the payload to force a custom\ncontent-type to be serialized.", + "smithy.api#http": { + "uri": "/HttpPayloadTraitsWithMediaType", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#HttpPayloadTraitsWithMediaTypeInputOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Foo" + } + }, + "blob": { + "target": "aws.protocoltests.shared#TextPlainBlob", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#HttpPayloadWithStructure": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpPayloadWithStructureInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#HttpPayloadWithStructureInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes a structure in the payload.\n\nNote that serializing a structure changes the wrapper element name\nto match the targeted structure.", + "smithy.api#http": { + "uri": "/HttpPayloadWithStructure", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#HttpPayloadWithStructureInputOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.restjson#NestedPayload", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#HttpPayloadWithUnion": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpPayloadWithUnionInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#HttpPayloadWithUnionInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes a union in the payload.", + "smithy.api#http": { + "uri": "/HttpPayloadWithUnion", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#HttpPayloadWithUnionInputOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.restjson#UnionPayload", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#HttpPrefixHeaders": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpPrefixHeadersInput" + }, + "output": { + "target": "aws.protocoltests.restjson#HttpPrefixHeadersOutput" + }, + "traits": { + "smithy.api#documentation": "This examples adds headers to the input of a request and response by prefix.", + "smithy.api#externalDocumentation": { + "httpPrefixHeaders Trait": "https://smithy.io/2.0/spec/http-bindings.html#httpprefixheaders-trait" + }, + "smithy.api#http": { + "uri": "/HttpPrefixHeaders", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#HttpPrefixHeadersInResponse": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpPrefixHeadersInResponseInput" + }, + "output": { + "target": "aws.protocoltests.restjson#HttpPrefixHeadersInResponseOutput" + }, + "traits": { + "smithy.api#documentation": "Clients that perform this test extract all headers from the response.", + "smithy.api#http": { + "uri": "/HttpPrefixHeadersResponse", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#HttpPrefixHeadersInResponseInput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#HttpPrefixHeadersInResponseOutput": { + "type": "structure", + "members": { + "prefixHeaders": { + "target": "aws.protocoltests.shared#StringMap", + "traits": { + "smithy.api#httpPrefixHeaders": "" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#HttpPrefixHeadersInput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "x-foo" + } + }, + "fooMap": { + "target": "aws.protocoltests.shared#StringMap", + "traits": { + "smithy.api#httpPrefixHeaders": "x-foo-" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#HttpPrefixHeadersOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "x-foo" + } + }, + "fooMap": { + "target": "aws.protocoltests.shared#StringMap", + "traits": { + "smithy.api#httpPrefixHeaders": "x-foo-" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#HttpQueryParamsOnlyInput": { + "type": "structure", + "members": { + "queryMap": { + "target": "aws.protocoltests.restjson#QueryMap", + "traits": { + "smithy.api#httpQueryParams": {} + } + } + } + }, + "aws.protocoltests.restjson#HttpQueryParamsOnlyOperation": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpQueryParamsOnlyInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This example tests httpQueryParams when no other query parameters exist.", + "smithy.api#http": { + "uri": "/http-query-params-only", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#HttpRequestWithFloatLabels": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpRequestWithFloatLabelsInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/FloatHttpLabels/{float}/{double}" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#HttpRequestWithFloatLabelsInput": { + "type": "structure", + "members": { + "float": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "double": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restjson#HttpRequestWithGreedyLabelInPath": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpRequestWithGreedyLabelInPathInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/HttpRequestWithGreedyLabelInPath/foo/{foo}/baz/{baz+}" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#HttpRequestWithGreedyLabelInPathInput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "baz": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restjson#HttpRequestWithLabels": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpRequestWithLabelsInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests are serialized when there's no input\npayload but there are HTTP labels.", + "smithy.api#http": { + "method": "GET", + "uri": "/HttpRequestWithLabels/{string}/{short}/{integer}/{long}/{float}/{double}/{boolean}/{timestamp}" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#HttpRequestWithLabelsAndTimestampFormat": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpRequestWithLabelsAndTimestampFormatInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests serialize different timestamp formats in the\nURI path.", + "smithy.api#http": { + "method": "GET", + "uri": "/HttpRequestWithLabelsAndTimestampFormat/{memberEpochSeconds}/{memberHttpDate}/{memberDateTime}/{defaultFormat}/{targetEpochSeconds}/{targetHttpDate}/{targetDateTime}" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#HttpRequestWithLabelsAndTimestampFormatInput": { + "type": "structure", + "members": { + "memberEpochSeconds": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "memberHttpDate": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#timestampFormat": "http-date" + } + }, + "memberDateTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "defaultFormat": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "targetEpochSeconds": { + "target": "aws.protocoltests.shared#EpochSeconds", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "targetHttpDate": { + "target": "aws.protocoltests.shared#HttpDate", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "targetDateTime": { + "target": "aws.protocoltests.shared#DateTime", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restjson#HttpRequestWithLabelsInput": { + "type": "structure", + "members": { + "string": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "short": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "integer": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "long": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "float": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "double": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "boolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Serialized in the path as true or false.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "Note that this member has no format, so it's serialized as an RFC 3399 date-time.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restjson#HttpRequestWithRegexLiteral": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#HttpRequestWithRegexLiteralInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/ReDosLiteral/{str}/(a+)+" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#HttpRequestWithRegexLiteralInput": { + "type": "structure", + "members": { + "str": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restjson#HttpResponseCode": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restjson#HttpResponseCodeOutput" + }, + "traits": { + "smithy.api#http": { + "uri": "/HttpResponseCode", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#HttpResponseCodeOutput": { + "type": "structure", + "members": { + "Status": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpResponseCode": {} + } + } + } + }, + "aws.protocoltests.restjson#HttpStringPayload": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#StringPayloadInput" + }, + "output": { + "target": "aws.protocoltests.restjson#StringPayloadInput" + }, + "traits": { + "smithy.api#http": { + "uri": "/StringPayload", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonStringPayloadNoContentType", + "documentation": "Serializes a string in the HTTP payload without a content-type header", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/StringPayload", + "body": "rawstring" + }, + "response": { + "code": 415, + "headers": { + "x-amzn-errortype": "UnsupportedMediaTypeException" + } + }, + "tags": [ + "content-type" + ] + }, + { + "id": "RestJsonStringPayloadWrongContentType", + "documentation": "Serializes a string in the HTTP payload without the expected content-type header", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/StringPayload", + "body": "rawstring", + "headers": { + "Content-Type": "application/json" + } + }, + "response": { + "code": 415, + "headers": { + "x-amzn-errortype": "UnsupportedMediaTypeException" + } + }, + "tags": [ + "content-type" + ] + }, + { + "id": "RestJsonStringPayloadUnsatisfiableAccept", + "documentation": "Serializes a string in the HTTP payload with an unstatisfiable accept header", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/StringPayload", + "body": "rawstring", + "headers": { + "Content-Type": "text/plain", + "Accept": "application/json" + } + }, + "response": { + "code": 406, + "headers": { + "x-amzn-errortype": "NotAcceptableException" + } + }, + "tags": [ + "accept" + ] + } + ] + } + }, + "aws.protocoltests.restjson#IgnoreQueryParamsInResponse": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restjson#IgnoreQueryParamsInResponseOutput" + }, + "traits": { + "smithy.api#documentation": "This example ensures that query string bound request parameters are\nserialized in the body of responses if the structure is used in both\nthe request and response.", + "smithy.api#http": { + "uri": "/IgnoreQueryParamsInResponse", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#IgnoreQueryParamsInResponseOutput": { + "type": "structure", + "members": { + "baz": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "baz", + "smithy.api#suppress": [ + "HttpBindingTraitIgnored" + ] + } + } + } + }, + "aws.protocoltests.restjson#InputAndOutputWithHeaders": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#InputAndOutputWithHeadersIO" + }, + "output": { + "target": "aws.protocoltests.restjson#InputAndOutputWithHeadersIO" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there is\nno input or output payload but there are HTTP header bindings.", + "smithy.api#http": { + "uri": "/InputAndOutputWithHeaders", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#InputAndOutputWithHeadersIO": { + "type": "structure", + "members": { + "headerString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-String" + } + }, + "headerByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#httpHeader": "X-Byte" + } + }, + "headerShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#httpHeader": "X-Short" + } + }, + "headerInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpHeader": "X-Integer" + } + }, + "headerLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#httpHeader": "X-Long" + } + }, + "headerFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#httpHeader": "X-Float" + } + }, + "headerDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpHeader": "X-Double" + } + }, + "headerTrueBool": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpHeader": "X-Boolean1" + } + }, + "headerFalseBool": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpHeader": "X-Boolean2" + } + }, + "headerStringList": { + "target": "aws.protocoltests.shared#StringList", + "traits": { + "smithy.api#httpHeader": "X-StringList" + } + }, + "headerStringSet": { + "target": "aws.protocoltests.shared#StringSet", + "traits": { + "smithy.api#httpHeader": "X-StringSet" + } + }, + "headerIntegerList": { + "target": "aws.protocoltests.shared#IntegerList", + "traits": { + "smithy.api#httpHeader": "X-IntegerList" + } + }, + "headerBooleanList": { + "target": "aws.protocoltests.shared#BooleanList", + "traits": { + "smithy.api#httpHeader": "X-BooleanList" + } + }, + "headerTimestampList": { + "target": "aws.protocoltests.shared#TimestampList", + "traits": { + "smithy.api#httpHeader": "X-TimestampList" + } + }, + "headerEnum": { + "target": "aws.protocoltests.shared#FooEnum", + "traits": { + "smithy.api#httpHeader": "X-Enum" + } + }, + "headerEnumList": { + "target": "aws.protocoltests.shared#FooEnumList", + "traits": { + "smithy.api#httpHeader": "X-EnumList" + } + }, + "headerIntegerEnum": { + "target": "aws.protocoltests.shared#IntegerEnum", + "traits": { + "smithy.api#httpHeader": "X-IntegerEnum" + } + }, + "headerIntegerEnumList": { + "target": "aws.protocoltests.shared#IntegerEnumList", + "traits": { + "smithy.api#httpHeader": "X-IntegerEnumList" + } + } + } + }, + "aws.protocoltests.restjson#InputStream": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#InputStreamInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/InputStream" + }, + "smithy.test#eventStreamTests": [ + { + "id": "BooleanHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "booleanHeader": true + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "booleanHeader": { + "boolean": true + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMNYm9vbGVhbkhlYWRlcgC4J9Ws" + } + ] + }, + { + "id": "ByteHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "byteHeader": 1 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "byteHeader": { + "byte": 1 + } + }, + "bytes": "AAAASQAAADlvxG1ZDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMKYnl0ZUhlYWRlcgIBKFTmjg==" + } + ] + }, + { + "id": "ShortHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "shortHeader": 2 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "shortHeader": { + "short": 2 + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMLc2hvcnRIZWFkZXIDAAL1ETsK" + } + ] + }, + { + "id": "IntegerHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "intHeader": 3 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "intHeader": { + "integer": 3 + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMJaW50SGVhZGVyBAAAAAPlyUrb" + } + ] + }, + { + "id": "LongHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "longHeader": 4294967294 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "longHeader": { + "long": 4294967294 + } + }, + "bytes": "AAAAUAAAAEAr7VEyDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMKbG9uZ0hlYWRlcgUAAAAA/////udnd/I=" + } + ] + }, + { + "id": "BlobHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "blobHeader": "foo" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "blobHeader": { + "blob": "Zm9v" + } + }, + "bytes": "AAAATQAAAD2dKQ+ADTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMKYmxvYkhlYWRlcgYAA2Zvb5sbbGM=" + } + ] + }, + { + "id": "StringHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "stringHeader": "foo" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "stringHeader": { + "string": "foo" + } + }, + "bytes": "AAAATwAAAD8J5z3MDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMMc3RyaW5nSGVhZGVyBwADZm9vxT+2MA==" + } + ] + }, + { + "id": "TimestampHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "timestampHeader": "2024-10-31T14:15:14Z" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "timestampHeader": { + "timestamp": "2024-10-31T14:15:14Z" + } + }, + "bytes": "AAAAVQAAAEWTZyrNDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMPdGltZXN0YW1wSGVhZGVyCAAAAZLi7jFQ6uV3Eg==" + } + ] + }, + { + "id": "MultipleHeaderInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "booleanHeader": true, + "stringHeader": "foo", + "blobHeader": "bar" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "booleanHeader": { + "boolean": true + }, + "stringHeader": { + "string": "foo" + }, + "blobHeader": { + "blob": "YmFy" + } + }, + "bytes": "AAAAbwAAAF+FlHOQDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMNYm9vbGVhbkhlYWRlcgAMc3RyaW5nSGVhZGVyBwADZm9vCmJsb2JIZWFkZXIGAANiYXIDXbo7" + } + ] + }, + { + "id": "StringPayloadInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "stringPayload": { + "payload": "foo" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "stringPayload" + }, + ":content-type": { + "string": "text/plain" + } + }, + "body": "foo", + "bodyMediaType": "text/plain", + "bytes": "AAAAYAAAAE30fZUJDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcADXN0cmluZ1BheWxvYWQNOmNvbnRlbnQtdHlwZQcACnRleHQvcGxhaW5mb29G1ELr" + } + ] + }, + { + "id": "BlobPayloadInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "blobPayload": { + "payload": "bar" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "blobPayload" + }, + ":content-type": { + "string": "application/octet-stream" + } + }, + "body": "bar", + "bodyMediaType": "application/octet-stream", + "bytes": "AAAAbAAAAFkrV6x1DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAC2Jsb2JQYXlsb2FkDTpjb250ZW50LXR5cGUHABhhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW1iYXJv5nGJ" + } + ] + }, + { + "id": "StructurePayloadInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "structurePayload": { + "payload": { + "structureMember": "foo" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "structurePayload" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"structureMember\":\"foo\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAfwAAAFacqFy2DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAEHN0cnVjdHVyZVBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb257InN0cnVjdHVyZU1lbWJlciI6ImZvbyJ9rcIRVA==" + } + ] + }, + { + "id": "UnionPayloadInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "unionPayload": { + "payload": { + "unionMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "unionPayload" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"unionMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAdwAAAFKrtdNuDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcADHVuaW9uUGF5bG9hZA06Y29udGVudC10eXBlBwAQYXBwbGljYXRpb24vanNvbnsidW5pb25NZW1iZXIiOiJiYXIifcZDMD4=" + } + ] + }, + { + "id": "HeadersAndExplicitPayloadInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headersAndExplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAlQAAAGw4wFp6DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAGWhlYWRlcnNBbmRFeHBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJzdHJ1Y3R1cmVNZW1iZXIiOiJiYXIifTafKXs=" + } + ] + }, + { + "id": "HeadersAndImplicitPayloadInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headersAndImplicitPayload": { + "header": "foo", + "payload": "bar" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headersAndImplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"payload\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAjQAAAGxoUIY5DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAGWhlYWRlcnNBbmRJbXBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJwYXlsb2FkIjoiYmFyIn15lZtT" + } + ] + }, + { + "id": "ServerErrorInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "error": { + "message": "foo" + } + }, + "headers": { + ":message-type": { + "string": "exception" + }, + ":exception-type": { + "string": "error" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"message\":\"foo\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAdAAAAFObEpkoDTptZXNzYWdlLXR5cGUHAAlleGNlcHRpb24POmV4Y2VwdGlvbi10eXBlBwAFZXJyb3INOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb257Im1lc3NhZ2UiOiJmb28ifTua1S8=" + } + ], + "expectation": { + "failure": { + "errorId": "aws.protocoltests.restjson#ErrorEvent" + } + }, + "appliesTo": "server" + }, + { + "id": "ClientErrorInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "error": { + "message": "foo" + } + }, + "headers": { + ":message-type": { + "string": "exception" + }, + ":exception-type": { + "string": "error" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"message\":\"foo\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAdAAAAFObEpkoDTptZXNzYWdlLXR5cGUHAAlleGNlcHRpb24POmV4Y2VwdGlvbi10eXBlBwAFZXJyb3INOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb257Im1lc3NhZ2UiOiJmb28ifTua1S8=" + } + ], + "appliesTo": "client" + }, + { + "id": "ServerUnexpectedErrorInput", + "documentation": "Servers must be able to handle structured, but unmodeled errors.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "headers": { + ":message-type": { + "string": "error" + }, + ":error-code": { + "string": "internal-error" + }, + ":error-message": { + "string": "An unknown error occurred." + } + }, + "bytes": "AAAAbwAAAF+FlHOQDTptZXNzYWdlLXR5cGUHAAVlcnJvcgs6ZXJyb3ItY29kZQcADmludGVybmFsLWVycm9yDjplcnJvci1tZXNzYWdlBwAaQW4gdW5rbm93biBlcnJvciBvY2N1cnJlZC4kun0t" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "server" + }, + { + "id": "MissingMessageTypeInput", + "documentation": "Servers must reject events that don't contain a :message-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":event-type": { + "string": "headersAndExplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAfwAAAFacqFy2CzpldmVudC10eXBlBwAZaGVhZGVyc0FuZEV4cGxpY2l0UGF5bG9hZA06Y29udGVudC10eXBlBwAQYXBwbGljYXRpb24vanNvbgZoZWFkZXIHAANmb297InN0cnVjdHVyZU1lbWJlciI6ImJhciJ98LexJg==" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "server" + }, + { + "id": "MalformedMessageTypeInput", + "documentation": "Servers must reject events that contain a malformed :message-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "blob": "ZXZlbnQ=" + }, + ":event-type": { + "string": "headersAndExplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAlQAAAGw4wFp6DTptZXNzYWdlLXR5cGUGAAVldmVudAs6ZXZlbnQtdHlwZQcAGWhlYWRlcnNBbmRFeHBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJzdHJ1Y3R1cmVNZW1iZXIiOiJiYXIifVwdfzU=" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "server" + }, + { + "id": "MissingEventTypeInput", + "documentation": "Servers must reject message events that don't contain an :event-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAbQAAAER1MekcDTptZXNzYWdlLXR5cGUHAAVldmVudA06Y29udGVudC10eXBlBwAQYXBwbGljYXRpb24vanNvbgZoZWFkZXIHAANmb297InN0cnVjdHVyZU1lbWJlciI6ImJhciJ9riy0Gg==" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "server" + }, + { + "id": "MalformedEventTypeInput", + "documentation": "Servers must reject message events that contain a malformed :event-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "blob": "aGVhZGVyc0FuZEV4cGxpY2l0UGF5bG9hZA==" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAlQAAAGw4wFp6DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQYAGWhlYWRlcnNBbmRFeHBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJzdHJ1Y3R1cmVNZW1iZXIiOiJiYXIifcP6KLk=" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "server" + } + ] + } + }, + "aws.protocoltests.restjson#InputStreamInput": { + "type": "structure", + "members": { + "stream": { + "target": "aws.protocoltests.restjson#EventStream", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#InputStreamWithInitialRequest": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#InputStreamWithInitialRequestInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/InputStreamWithInitialRequest" + }, + "smithy.test#eventStreamTests": [ + { + "id": "InitialRequestInput", + "protocol": "aws.protocols#restJson1", + "initialRequestParams": { + "initialRequestMember": "foo" + }, + "initialRequest": { + "method": "POST", + "uri": "/InputStreamWithInitialRequest", + "headers": { + "initial-request-member": "foo" + } + }, + "initialRequestShape": "smithy.test#InitialHttpRequest" + }, + { + "id": "MissingRequiredInitialRequestInput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "request", + "params": { + "headers": { + "booleanHeader": true + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "booleanHeader": { + "boolean": true + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMNYm9vbGVhbkhlYWRlcgC4J9Ws" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "server" + } + ] + } + }, + "aws.protocoltests.restjson#InputStreamWithInitialRequestInput": { + "type": "structure", + "members": { + "initialRequestMember": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "initial-request-member", + "smithy.api#required": {} + } + }, + "stream": { + "target": "aws.protocoltests.restjson#EventStream", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#InvalidGreeting": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when an invalid greeting value is provided.", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "aws.protocoltests.restjson#JsonBlobs": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#JsonBlobsInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#JsonBlobsInputOutput" + }, + "traits": { + "smithy.api#documentation": "Blobs are base64 encoded", + "smithy.api#http": { + "uri": "/JsonBlobs", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#JsonBlobsInputOutput": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Blob" + } + } + }, + "aws.protocoltests.restjson#JsonEnums": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#JsonEnumsInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#JsonEnumsInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes enums as top level properties, in lists, sets, and maps.", + "smithy.api#http": { + "uri": "/JsonEnums", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#JsonEnumsInputOutput": { + "type": "structure", + "members": { + "fooEnum1": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnum2": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnum3": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnumList": { + "target": "aws.protocoltests.shared#FooEnumList" + }, + "fooEnumSet": { + "target": "aws.protocoltests.shared#FooEnumSet" + }, + "fooEnumMap": { + "target": "aws.protocoltests.shared#FooEnumMap" + } + } + }, + "aws.protocoltests.restjson#JsonHeaderString": { + "type": "string", + "traits": { + "smithy.api#mediaType": "application/json" + } + }, + "aws.protocoltests.restjson#JsonIntEnums": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#JsonIntEnumsInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#JsonIntEnumsInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes intEnums as top level properties, in lists, sets, and maps.", + "smithy.api#http": { + "uri": "/JsonIntEnums", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#JsonIntEnumsInputOutput": { + "type": "structure", + "members": { + "integerEnum1": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "integerEnum2": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "integerEnum3": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "integerEnumList": { + "target": "aws.protocoltests.shared#IntegerEnumList" + }, + "integerEnumSet": { + "target": "aws.protocoltests.shared#IntegerEnumSet" + }, + "integerEnumMap": { + "target": "aws.protocoltests.shared#IntegerEnumMap" + } + } + }, + "aws.protocoltests.restjson#JsonLists": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#JsonListsInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#JsonListsInputOutput" + }, + "traits": { + "smithy.api#documentation": "This test case serializes JSON lists for the following cases for both\ninput and output:\n\n1. Normal JSON lists.\n2. Normal JSON sets.\n3. JSON lists of lists.\n4. Lists of structures.", + "smithy.api#http": { + "uri": "/JsonLists", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#JsonListsInputOutput": { + "type": "structure", + "members": { + "stringList": { + "target": "aws.protocoltests.shared#StringList" + }, + "stringSet": { + "target": "aws.protocoltests.shared#StringSet" + }, + "integerList": { + "target": "aws.protocoltests.shared#IntegerList" + }, + "booleanList": { + "target": "aws.protocoltests.shared#BooleanList" + }, + "timestampList": { + "target": "aws.protocoltests.shared#TimestampList" + }, + "enumList": { + "target": "aws.protocoltests.shared#FooEnumList" + }, + "intEnumList": { + "target": "aws.protocoltests.shared#IntegerEnumList" + }, + "nestedStringList": { + "target": "aws.protocoltests.shared#NestedStringList" + }, + "structureList": { + "target": "aws.protocoltests.restjson#StructureList", + "traits": { + "smithy.api#jsonName": "myStructureList" + } + } + } + }, + "aws.protocoltests.restjson#JsonMaps": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#JsonMapsInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#JsonMapsInputOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests basic map serialization.", + "smithy.api#http": { + "uri": "/JsonMaps", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#JsonMapsInputOutput": { + "type": "structure", + "members": { + "denseStructMap": { + "target": "aws.protocoltests.restjson#DenseStructMap" + }, + "denseNumberMap": { + "target": "aws.protocoltests.restjson#DenseNumberMap" + }, + "denseBooleanMap": { + "target": "aws.protocoltests.restjson#DenseBooleanMap" + }, + "denseStringMap": { + "target": "aws.protocoltests.restjson#DenseStringMap" + }, + "denseSetMap": { + "target": "aws.protocoltests.restjson#DenseSetMap" + } + } + }, + "aws.protocoltests.restjson#JsonTimestamps": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#JsonTimestampsInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#JsonTimestampsInputOutput" + }, + "traits": { + "smithy.api#documentation": "This tests how timestamps are serialized, including using the\ndefault format of date-time and various @timestampFormat trait\nvalues.", + "smithy.api#http": { + "uri": "/JsonTimestamps", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#JsonTimestampsInputOutput": { + "type": "structure", + "members": { + "normal": { + "target": "smithy.api#Timestamp" + }, + "dateTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "dateTimeOnTarget": { + "target": "aws.protocoltests.shared#DateTime" + }, + "epochSeconds": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "epochSecondsOnTarget": { + "target": "aws.protocoltests.shared#EpochSeconds" + }, + "httpDate": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "httpDateOnTarget": { + "target": "aws.protocoltests.shared#HttpDate" + } + } + }, + "aws.protocoltests.restjson#JsonUnions": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#UnionInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#UnionInputOutput" + }, + "traits": { + "smithy.api#documentation": "This operation uses unions for inputs and outputs.", + "smithy.api#http": { + "uri": "/JsonUnions", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#JsonValue": { + "type": "string", + "traits": { + "smithy.api#mediaType": "application/json" + } + }, + "aws.protocoltests.restjson#MalformedAcceptWithBody": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.shared#GreetingStruct" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/MalformedAcceptWithBody" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonWithBodyExpectsApplicationJsonAccept", + "documentation": "When there is modeled output, the accept must be application/json", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedAcceptWithBody", + "headers": { + "accept": "application/hal+json" + } + }, + "response": { + "code": 406, + "headers": { + "x-amzn-errortype": "NotAcceptableException" + } + }, + "tags": [ + "accept" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedAcceptWithGenericString": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restjson#MalformedAcceptWithGenericStringOutput" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/MalformedAcceptWithGenericString" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonWithPayloadExpectsImpliedAccept", + "documentation": "When there is a payload without a mediaType trait, the accept must match the\nimplied content type of the shape.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedAcceptWithGenericString", + "headers": { + "accept": "application/json" + } + }, + "response": { + "code": 406, + "headers": { + "x-amzn-errortype": "NotAcceptableException" + } + }, + "tags": [ + "accept" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedAcceptWithGenericStringOutput": { + "type": "structure", + "members": { + "payload": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#MalformedAcceptWithPayload": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restjson#MalformedAcceptWithPayloadOutput" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/MalformedAcceptWithPayload" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonWithPayloadExpectsModeledAccept", + "documentation": "When there is a payload with a mediaType trait, the accept must match.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedAcceptWithPayload", + "headers": { + "accept": "application/json" + } + }, + "response": { + "code": 406, + "headers": { + "x-amzn-errortype": "NotAcceptableException" + } + }, + "tags": [ + "accept" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedAcceptWithPayloadOutput": { + "type": "structure", + "members": { + "payload": { + "target": "aws.protocoltests.shared#JpegBlob", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#MalformedBlob": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedBlobInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedBlob", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonBodyMalformedBlobInvalidBase64", + "documentation": "When a blob member is not properly base64 encoded, or not encoded at\nall, the response should be a 400 SerializationException.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedBlob", + "body": "{ \"blob\" : $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "blob", + "\"xyz\"", + "\"YmxvYg=\"", + "[98, 108, 11, 98]", + "[\"b\", \"l\",\"o\",\"b\"]", + "981081198", + "true", + "[][]", + "-_==" + ] + } + } + ] + } + }, + "aws.protocoltests.restjson#MalformedBlobInput": { + "type": "structure", + "members": { + "blob": { + "target": "smithy.api#Blob" + } + } + }, + "aws.protocoltests.restjson#MalformedBoolean": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedBooleanInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedBoolean/{booleanInPath}", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonBodyBooleanStringCoercion", + "documentation": "Attempted string coercion should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedBoolean/true", + "body": "{ \"booleanInBody\" : $value:S }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "True", + "TRUE", + "y", + "Y", + "yes", + "Yes", + "YES", + "1", + "on", + "On", + "ON", + "false", + "False", + "FALSE", + "n", + "N", + "no", + "No", + "NO", + "0", + "off", + "Off", + "OFF" + ] + } + }, + { + "id": "RestJsonBodyBooleanBadLiteral", + "documentation": "YAML-style alternate boolean literals should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedBoolean/true", + "body": "{ \"booleanInBody\" : $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "True", + "TRUE", + "y", + "Y", + "yes", + "Yes", + "YES", + "1", + "on", + "On", + "ON", + "False", + "FALSE", + "n", + "N", + "no", + "No", + "NO", + "0", + "off", + "Off", + "OFF" + ] + } + }, + { + "id": "RestJsonPathBooleanStringCoercion", + "documentation": "Attempted string coercion should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedBoolean/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "True", + "TRUE", + "y", + "Y", + "yes", + "Yes", + "YES", + "1", + "on", + "On", + "ON", + "False", + "FALSE", + "n", + "N", + "no", + "No", + "NO", + "0", + "off", + "Off", + "OFF" + ] + } + }, + { + "id": "RestJsonQueryBooleanStringCoercion", + "documentation": "Attempted string coercion should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedBoolean/true", + "queryParams": [ + "booleanInQuery=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "True", + "TRUE", + "y", + "Y", + "yes", + "Yes", + "YES", + "1", + "on", + "On", + "ON", + "False", + "FALSE", + "n", + "N", + "no", + "No", + "NO", + "0", + "off", + "Off", + "OFF" + ] + } + }, + { + "id": "RestJsonHeaderBooleanStringCoercion", + "documentation": "Attempted string coercion should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedBoolean/true", + "headers": { + "booleanInHeader": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "True", + "TRUE", + "y", + "Y", + "yes", + "Yes", + "YES", + "1", + "on", + "On", + "ON", + "False", + "FALSE", + "n", + "N", + "no", + "No", + "NO", + "0", + "off", + "Off", + "OFF" + ] + } + } + ] + } + }, + "aws.protocoltests.restjson#MalformedBooleanInput": { + "type": "structure", + "members": { + "booleanInBody": { + "target": "smithy.api#Boolean" + }, + "booleanInPath": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "booleanInQuery": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "booleanInQuery" + } + }, + "booleanInHeader": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpHeader": "booleanInHeader" + } + } + } + }, + "aws.protocoltests.restjson#MalformedByte": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedByteInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedByte/{byteInPath}", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonBodyByteUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedByte/1", + "body": "{ \"byteInBody\" : $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "256", + "-256", + "-9223372000000000000", + "9223372000000000000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonPathByteUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedByte/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "256", + "-256", + "-9223372000000000000", + "9223372000000000000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonQueryByteUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedByte/1", + "queryParams": [ + "byteInQuery=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "256", + "-256", + "-9223372000000000000", + "9223372000000000000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonHeaderByteUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedByte/1", + "headers": { + "byteInHeader": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "256", + "-256", + "-9223372000000000000", + "9223372000000000000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonBodyByteMalformedValueRejected", + "documentation": "Malformed values in the body should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedByte/1", + "body": "{ \"byteInBody\" : $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "\"123\"", + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "\"Infinity\"", + "-Infinity", + "\"-Infinity\"", + "NaN", + "\"NaN\"" + ], + "tag": [ + "string_coercion", + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "string_inf", + "negative_inf", + "string_negative_inf", + "nan", + "string_nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonPathByteMalformedValueRejected", + "documentation": "Malformed values in the path should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedByte/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonQueryByteMalformedValueRejected", + "documentation": "Malformed values in query parameters should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedByte/1", + "queryParams": [ + "byteInQuery=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonHeaderByteMalformedValueRejected", + "documentation": "Malformed values in headers should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedByte/1", + "headers": { + "byteInHeader": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedByteInput": { + "type": "structure", + "members": { + "byteInBody": { + "target": "smithy.api#Byte" + }, + "byteInPath": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "byteInQuery": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#httpQuery": "byteInQuery" + } + }, + "byteInHeader": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#httpHeader": "byteInHeader" + } + } + } + }, + "aws.protocoltests.restjson#MalformedContentTypeWithBody": { + "type": "operation", + "input": { + "target": "aws.protocoltests.shared#GreetingStruct" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/MalformedContentTypeWithBody" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonWithBodyExpectsApplicationJsonContentType", + "documentation": "When there is modeled input, the content type must be application/json", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedContentTypeWithBody", + "body": "{}", + "headers": { + "content-type": "application/hal+json" + } + }, + "response": { + "code": 415, + "headers": { + "x-amzn-errortype": "UnsupportedMediaTypeException" + } + }, + "tags": [ + "content-type" + ] + }, + { + "id": "RestJsonWithBodyExpectsApplicationJsonContentTypeNoHeaders", + "documentation": "When there is modeled input, the content type must be application/json", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedContentTypeWithBody", + "body": "{}" + }, + "response": { + "code": 415, + "headers": { + "x-amzn-errortype": "UnsupportedMediaTypeException" + } + }, + "tags": [ + "content-type" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedContentTypeWithGenericString": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedContentTypeWithGenericStringInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/MalformedContentTypeWithGenericString" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ] + } + }, + "aws.protocoltests.restjson#MalformedContentTypeWithGenericStringInput": { + "type": "structure", + "members": { + "payload": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#MalformedContentTypeWithPayload": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedContentTypeWithPayloadInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/MalformedContentTypeWithPayload" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonWithPayloadExpectsModeledContentType", + "documentation": "When there is a payload with a mediaType trait, the content type must match.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedContentTypeWithPayload", + "body": "{}", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 415, + "headers": { + "x-amzn-errortype": "UnsupportedMediaTypeException" + } + }, + "tags": [ + "content-type" + ] + }, + { + "id": "RestJsonWithPayloadExpectsImpliedContentType", + "documentation": "When there is a payload without a mediaType trait, the content type must match the\nimplied content type of the shape.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedContentTypeWithPayload", + "body": "{}", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 415, + "headers": { + "x-amzn-errortype": "UnsupportedMediaTypeException" + } + }, + "tags": [ + "content-type" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedContentTypeWithPayloadInput": { + "type": "structure", + "members": { + "payload": { + "target": "aws.protocoltests.shared#JpegBlob", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#MalformedContentTypeWithoutBody": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/MalformedContentTypeWithoutBody" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonWithoutBodyExpectsEmptyContentType", + "documentation": "When there is no modeled input, content type must not be set and the body must be empty.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedContentTypeWithoutBody", + "body": "{}", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 415, + "headers": { + "x-amzn-errortype": "UnsupportedMediaTypeException" + } + }, + "tags": [ + "content-type" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedContentTypeWithoutBodyEmptyInput": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedContentTypeWithoutBodyEmptyInputInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/MalformedContentTypeWithoutBodyEmptyInput" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonWithoutBodyEmptyInputExpectsEmptyContentType", + "documentation": "When there is no modeled body input, content type must not be set and the body must be empty.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedContentTypeWithoutBodyEmptyInput", + "body": "{}", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 415, + "headers": { + "x-amzn-errortype": "UnsupportedMediaTypeException" + } + }, + "tags": [ + "content-type" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedContentTypeWithoutBodyEmptyInputInput": { + "type": "structure", + "members": { + "header": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "header" + } + } + } + }, + "aws.protocoltests.restjson#MalformedDouble": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedDoubleInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedDouble/{doubleInPath}", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonBodyDoubleMalformedValueRejected", + "documentation": "Malformed values in the body should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedDouble/1", + "body": "{ \"doubleInBody\" : $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "\"123\"", + "true", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "string_coercion", + "boolean_coercion", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonPathDoubleMalformedValueRejected", + "documentation": "Malformed values in the path should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedDouble/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "2ABC", + "0x42" + ], + "tag": [ + "boolean_coercion", + "trailing_chars", + "hex" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonQueryDoubleMalformedValueRejected", + "documentation": "Malformed values in query parameters should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedDouble/1", + "queryParams": [ + "doubleInQuery=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "2ABC", + "0x42" + ], + "tag": [ + "boolean_coercion", + "trailing_chars", + "hex" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonHeaderDoubleMalformedValueRejected", + "documentation": "Malformed values in headers should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedDouble/1", + "headers": { + "doubleInHeader": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "2ABC", + "0x42" + ], + "tag": [ + "boolean_coercion", + "trailing_chars", + "hex" + ] + }, + "tags": [ + "$tag:L" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedDoubleInput": { + "type": "structure", + "members": { + "doubleInBody": { + "target": "smithy.api#Double" + }, + "doubleInPath": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "doubleInQuery": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpQuery": "doubleInQuery" + } + }, + "doubleInHeader": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpHeader": "doubleInHeader" + } + } + } + }, + "aws.protocoltests.restjson#MalformedFloat": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedFloatInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedFloat/{floatInPath}", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonBodyFloatMalformedValueRejected", + "documentation": "Malformed values in the body should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedFloat/1", + "body": "{ \"floatInBody\" : $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "\"123\"", + "true", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "string_coercion", + "boolean_coercion", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonPathFloatMalformedValueRejected", + "documentation": "Malformed values in the path should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedFloat/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "2ABC", + "0x42" + ], + "tag": [ + "boolean_coercion", + "trailing_chars", + "hex" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonQueryFloatMalformedValueRejected", + "documentation": "Malformed values in query parameters should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedFloat/1", + "queryParams": [ + "floatInQuery=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "2ABC", + "0x42" + ], + "tag": [ + "boolean_coercion", + "trailing_chars", + "hex" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonHeaderFloatMalformedValueRejected", + "documentation": "Malformed values in headers should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedFloat/1", + "headers": { + "floatInHeader": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "2ABC", + "0x42" + ], + "tag": [ + "boolean_coercion", + "trailing_chars", + "hex" + ] + }, + "tags": [ + "$tag:L" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedFloatInput": { + "type": "structure", + "members": { + "floatInBody": { + "target": "smithy.api#Float" + }, + "floatInPath": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "floatInQuery": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#httpQuery": "floatInQuery" + } + }, + "floatInHeader": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#httpHeader": "floatInHeader" + } + } + } + }, + "aws.protocoltests.restjson#MalformedInteger": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedIntegerInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedInteger/{integerInPath}", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonBodyIntegerUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedInteger/1", + "body": "{ \"integerInBody\" : $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "-9223372000000000000", + "9223372000000000000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonPathIntegerUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedInteger/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "-9223372000000000000", + "9223372000000000000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonQueryIntegerUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedInteger/1", + "queryParams": [ + "integerInQuery=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "-9223372000000000000", + "9223372000000000000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonHeaderIntegerUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedInteger/1", + "headers": { + "integerInHeader": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "-9223372000000000000", + "9223372000000000000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonBodyIntegerMalformedValueRejected", + "documentation": "Malformed values in the body should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedInteger/1", + "body": "{ \"integerInBody\" : $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "\"123\"", + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "\"Infinity\"", + "-Infinity", + "\"-Infinity\"", + "NaN", + "\"NaN\"" + ], + "tag": [ + "string_coercion", + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "string_inf", + "negative_inf", + "string_negative_inf", + "nan", + "string_nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonPathIntegerMalformedValueRejected", + "documentation": "Malformed values in the path should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedInteger/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonQueryIntegerMalformedValueRejected", + "documentation": "Malformed values in query parameters should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedInteger/1", + "queryParams": [ + "integerInQuery=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonHeaderIntegerMalformedValueRejected", + "documentation": "Malformed values in headers should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedInteger/1", + "headers": { + "integerInHeader": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedIntegerInput": { + "type": "structure", + "members": { + "integerInBody": { + "target": "smithy.api#Integer" + }, + "integerInPath": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "integerInQuery": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "integerInQuery" + } + }, + "integerInHeader": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpHeader": "integerInHeader" + } + } + } + }, + "aws.protocoltests.restjson#MalformedList": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedListInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedList", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonBodyMalformedListNullItem", + "documentation": "When a dense list contains null, the response should be a 400\nSerializationException.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedList", + "body": "{ \"bodyList\" : [\"a\", null, \"b\", \"c\"] }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + } + }, + { + "id": "RestJsonBodyMalformedListUnclosed", + "documentation": "When a list does not have a closing bracket, the response should be\na 400 SerializationException.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedList", + "body": "{ \"bodyList\" : [\"a\", \"b\", \"c\" }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + } + } + ] + } + }, + "aws.protocoltests.restjson#MalformedListInput": { + "type": "structure", + "members": { + "bodyList": { + "target": "aws.protocoltests.restjson#SimpleList" + } + } + }, + "aws.protocoltests.restjson#MalformedLong": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedLongInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedLong/{longInPath}", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonBodyLongUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedLong/1", + "body": "{ \"longInBody\" : $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "-184467440737095500000", + "184467440737095500000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonPathLongUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedLong/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "-184467440737095500000", + "184467440737095500000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonQueryLongUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedLong/1", + "queryParams": [ + "longInQuery=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "-184467440737095500000", + "184467440737095500000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonHeaderLongUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedLong/1", + "headers": { + "longInHeader": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "-184467440737095500000", + "184467440737095500000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonBodyLongMalformedValueRejected", + "documentation": "Malformed values in the body should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedLong/1", + "body": "{ \"longInBody\" : $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "\"123\"", + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "\"Infinity\"", + "-Infinity", + "\"-Infinity\"", + "NaN", + "\"NaN\"" + ], + "tag": [ + "string_coercion", + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "string_inf", + "negative_inf", + "string_negative_inf", + "nan", + "string_nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonPathLongMalformedValueRejected", + "documentation": "Malformed values in the path should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedLong/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonQueryLongMalformedValueRejected", + "documentation": "Malformed values in query parameters should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedLong/1", + "queryParams": [ + "longInQuery=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonHeaderLongMalformedValueRejected", + "documentation": "Malformed values in headers should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedLong/1", + "headers": { + "longInHeader": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedLongInput": { + "type": "structure", + "members": { + "longInBody": { + "target": "smithy.api#Long" + }, + "longInPath": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "longInQuery": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#httpQuery": "longInQuery" + } + }, + "longInHeader": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#httpHeader": "longInHeader" + } + } + } + }, + "aws.protocoltests.restjson#MalformedMap": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedMapInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedMap", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonBodyMalformedMapNullKey", + "documentation": "When a map contains a null key, the response should be a 400\nSerializationException.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedMap", + "body": "{ \"bodyMap\" : { null: \"abc\" } }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + } + }, + { + "id": "RestJsonBodyMalformedMapNullValue", + "documentation": "When a dense map contains a null value, the response should be a 400\nSerializationException.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedMap", + "body": "{ \"bodyMap\" : { \"abc\": null } }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + } + } + ] + } + }, + "aws.protocoltests.restjson#MalformedMapInput": { + "type": "structure", + "members": { + "bodyMap": { + "target": "aws.protocoltests.restjson#SimpleMap" + } + } + }, + "aws.protocoltests.restjson#MalformedRequestBody": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedRequestBodyInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedRequestBody", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonInvalidJsonBody", + "documentation": "When the request body is not valid JSON, the response should be a 400\nSerializationException.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedRequestBody", + "body": "$value:L", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "{[", + "{ \"int\": 10 }abc", + "abc{ \"int\": 10 }", + "{\n \"int\": 10 // the integer should be 10\n}", + "{\n \"int\": 10 /* the integer should be 10 */\n}", + "{\"int\" :\f10}", + "{'int': 10}", + "{\"int\": 10,}" + ] + } + }, + { + "id": "RestJsonTechnicallyValidJsonBody", + "documentation": "When the request body is technically valid, but cannot map to a Smithy structure,\nthe response should be a 400 SerializationException.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedRequestBody", + "body": "$value:L", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "[{ \"int\": 10}]", + "10", + "null" + ] + }, + "tags": [ + "technically_valid_json_body" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedRequestBodyInput": { + "type": "structure", + "members": { + "int": { + "target": "smithy.api#Integer" + }, + "float": { + "target": "smithy.api#Float" + } + } + }, + "aws.protocoltests.restjson#MalformedShort": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedShortInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedShort/{shortInPath}", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonBodyShortUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedShort/1", + "body": "{ \"shortInBody\" : $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "40000", + "-40000", + "-9223372000000000000", + "9223372000000000000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonPathShortUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedShort/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "40000", + "-40000", + "-9223372000000000000", + "9223372000000000000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonQueryShortUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedShort/1", + "queryParams": [ + "shortInQuery=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "40000", + "-40000", + "-9223372000000000000", + "9223372000000000000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonHeaderShortUnderflowOverflow", + "documentation": "Underflow or overflow should result in SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedShort/1", + "headers": { + "shortInHeader": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "40000", + "-40000", + "-9223372000000000000", + "9223372000000000000", + "123000000000000000000000" + ] + }, + "tags": [ + "underflow/overflow" + ] + }, + { + "id": "RestJsonBodyShortMalformedValueRejected", + "documentation": "Malformed values in the body should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedShort/1", + "body": "{ \"shortInBody\" : $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "\"123\"", + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "\"Infinity\"", + "-Infinity", + "\"-Infinity\"", + "NaN", + "\"NaN\"" + ], + "tag": [ + "string_coercion", + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "string_inf", + "negative_inf", + "string_negative_inf", + "nan", + "string_nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonPathShortMalformedValueRejected", + "documentation": "Malformed values in the path should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedShort/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonQueryShortMalformedValueRejected", + "documentation": "Malformed values in query parameters should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedShort/1", + "queryParams": [ + "shortInQuery=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + }, + { + "id": "RestJsonHeaderShortMalformedValueRejected", + "documentation": "Malformed values in headers should be rejected", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedShort/1", + "headers": { + "shortInHeader": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1.001", + "2ABC", + "0x42", + "Infinity", + "-Infinity", + "NaN" + ], + "tag": [ + "boolean_coercion", + "float_truncation", + "trailing_chars", + "hex", + "inf", + "negative_inf", + "nan" + ] + }, + "tags": [ + "$tag:L" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedShortInput": { + "type": "structure", + "members": { + "shortInBody": { + "target": "smithy.api#Short" + }, + "shortInPath": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "shortInQuery": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#httpQuery": "shortInQuery" + } + }, + "shortInHeader": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#httpHeader": "shortInHeader" + } + } + } + }, + "aws.protocoltests.restjson#MalformedString": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedStringInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedString", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonHeaderMalformedStringInvalidBase64MediaType", + "documentation": "When string with the mediaType trait is bound to a header, its value\nmust be base64 encoded. The server should reject values that aren't\nvalid base64 out of hand.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedString", + "headers": { + "content-type": "application/json", + "amz-media-typed-header": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "xyz", + "YmxvYg=", + "[][]", + "-_==" + ] + } + } + ] + } + }, + "aws.protocoltests.restjson#MalformedStringInput": { + "type": "structure", + "members": { + "blob": { + "target": "aws.protocoltests.restjson#JsonHeaderString", + "traits": { + "smithy.api#httpHeader": "amz-media-typed-header" + } + } + } + }, + "aws.protocoltests.restjson#MalformedTimestampBodyDateTime": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedTimestampBodyDateTimeInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedTimestampBodyDateTime", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonBodyTimestampDateTimeRejectsHttpDate", + "documentation": "When the format is date-time, IMF-fixdate timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampBodyDateTime", + "body": "{ \"timestamp\": $value:S }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "Tue, 29 Apr 2014 18:30:38 GMT" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonBodyTimestampDateTimeRejectsEpochSeconds", + "documentation": "When the format is date-time, epoch-seconds timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampBodyDateTime", + "body": "{ \"timestamp\": $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1515531081.1234", + "1515531081" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonBodyTimestampDateTimeRejectsUTCOffsets", + "documentation": "When the format is date-time, RFC 3339 timestamps with a UTC offset are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampBodyDateTime", + "body": "{ \"timestamp\": $value:S }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1996-12-19T16:39:57-08:00" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonBodyTimestampDateTimeRejectsDifferent8601Formats", + "documentation": "When the format is date-time, maybe-valid ISO-8601 date-times not conforming to RFC 3339\nare rejected with a 400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampBodyDateTime", + "body": "{ \"timestamp\": $value:S }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1996-12-19T16:39:57+00", + "1996-12-19T16:39:57+00Z", + "1996-12-19T16:39:57", + "1996-12-19T163957", + "19961219T163957Z", + "19961219T163957", + "19961219T16:39:57Z", + "19961219T16:39:57", + "1996-12-19T16:39Z", + "1996-12-19T16:39", + "1996-12-19T1639", + "1996-12-19T16Z", + "1996-12-19T16", + "1996-12-19 16:39:57Z", + "2011-12-03T10:15:30+01:00[Europe/Paris]" + ] + }, + "tags": [ + "timestamp" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedTimestampBodyDateTimeInput": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + } + } + }, + "aws.protocoltests.restjson#MalformedTimestampBodyDefault": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedTimestampBodyDefaultInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedTimestampBodyDefault", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonBodyTimestampDefaultRejectsDateTime", + "documentation": "By default, RFC3339 timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampBodyDefault", + "body": "{ \"timestamp\": $value:S }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1985-04-12T23:20:50.52Z", + "1985-04-12T23:20:50Z", + "1996-12-19T16:39:57-08:00" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonBodyTimestampDefaultRejectsStringifiedEpochSeconds", + "documentation": "By default, epoch second timestamps as strings are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampBodyDefault", + "body": "{ \"timestamp\": $value:S }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1515531081.1234", + "1515531081" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonBodyTimestampDefaultRejectsMalformedEpochSeconds", + "documentation": "Invalid values for epoch seconds are rejected with a 400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampBodyDefault", + "body": "{ \"timestamp\": $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1515531081ABC", + "0x42", + "1515531081.123.456", + "Infinity", + "\"Infinity\"", + "-Infinity", + "\"-Infinity\"", + "NaN", + "\"NaN\"" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonBodyTimestampDefaultRejectsHttpDate", + "documentation": "By default, IMF-fixdate timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampBodyDefault", + "body": "{ \"timestamp\": $value:S }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "Tue, 29 Apr 2014 18:30:38 GMT" + ] + }, + "tags": [ + "timestamp" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedTimestampBodyDefaultInput": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restjson#MalformedTimestampBodyHttpDate": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedTimestampBodyHttpDateInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedTimestampBodyHttpDate", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonBodyTimestampHttpDateRejectsDateTime", + "documentation": "When the format is http-date, RFC3339 timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampBodyHttpDate", + "body": "{ \"timestamp\": $value:S }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1985-04-12T23:20:50.52Z", + "1985-04-12T23:20:50Z", + "1996-12-19T16:39:57-08:00" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonBodyTimestampHttpDateRejectsEpoch", + "documentation": "When the format is http-date, epoch-seconds timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampBodyHttpDate", + "body": "{ \"timestamp\": $value:L }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1515531081.1234", + "1515531081" + ] + }, + "tags": [ + "timestamp" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedTimestampBodyHttpDateInput": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#required": {}, + "smithy.api#timestampFormat": "http-date" + } + } + } + }, + "aws.protocoltests.restjson#MalformedTimestampHeaderDateTime": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedTimestampHeaderDateTimeInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedTimestampHeaderDateTime", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonHeaderTimestampDateTimeRejectsHttpDate", + "documentation": "When the format is date-time, IMF-fixdate timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampHeaderDateTime", + "headers": { + "timestamp": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "Tue, 29 Apr 2014 18:30:38 GMT" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonHeaderTimestampDateTimeRejectsEpochSeconds", + "documentation": "When the format is date-time, epoch-seconds timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampHeaderDateTime", + "headers": { + "timestamp": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1515531081.1234", + "1515531081" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonHeaderTimestampDateTimeRejectsDifferent8601Formats", + "documentation": "When the format is date-time, maybe-valid ISO-8601 date-times not conforming to RFC 3339\nare rejected with a 400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampHeaderDateTime", + "headers": { + "timestamp": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1996-12-19T16:39:57+00", + "1996-12-19T16:39:57+00Z", + "1996-12-19T16:39:57", + "1996-12-19T163957", + "19961219T163957Z", + "19961219T163957", + "19961219T16:39:57Z", + "19961219T16:39:57", + "1996-12-19T16:39Z", + "1996-12-19T16:39", + "1996-12-19T1639", + "1996-12-19T16Z", + "1996-12-19T16", + "1996-12-19 16:39:57Z", + "2011-12-03T10:15:30+01:00[Europe/Paris]" + ] + }, + "tags": [ + "timestamp" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedTimestampHeaderDateTimeInput": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpHeader": "timestamp", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + } + } + }, + "aws.protocoltests.restjson#MalformedTimestampHeaderDefault": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedTimestampHeaderDefaultInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedTimestampHeaderDefault", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonHeaderTimestampDefaultRejectsDateTime", + "documentation": "By default, RFC3339 timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampHeaderDefault", + "headers": { + "timestamp": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1985-04-12T23:20:50.52Z", + "1985-04-12T23:20:50Z", + "1996-12-19T16:39:57-08:00" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonHeaderTimestampDefaultRejectsEpochSeconds", + "documentation": "By default, epoch second timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampHeaderDefault", + "headers": { + "timestamp": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1515531081.1234", + "1515531081" + ] + }, + "tags": [ + "timestamp" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedTimestampHeaderDefaultInput": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpHeader": "timestamp", + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restjson#MalformedTimestampHeaderEpoch": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedTimestampHeaderEpochInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedTimestampHeaderEpoch", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonHeaderTimestampEpochRejectsDateTime", + "documentation": "When the format is epoch-seconds, RFC3339 timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampHeaderEpoch", + "headers": { + "timestamp": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1985-04-12T23:20:50.52Z", + "1985-04-12T23:20:50Z", + "1996-12-19T16:39:57-08:00" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonHeaderTimestampEpochRejectsHttpDate", + "documentation": "When the format is epoch-seconds, IMF-fixdate timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampHeaderEpoch", + "headers": { + "timestamp": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "Tue, 29 Apr 2014 18:30:38 GMT" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonHeaderTimestampEpochRejectsMalformedValues", + "documentation": "Invalid values for epoch seconds are rejected with a 400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampHeaderEpoch", + "headers": { + "timestamp": "$value:L" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1515531081ABC", + "0x42", + "1515531081.123.456", + "Infinity", + "-Infinity", + "NaN" + ] + }, + "tags": [ + "timestamp" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedTimestampHeaderEpochInput": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpHeader": "timestamp", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + } + } + }, + "aws.protocoltests.restjson#MalformedTimestampPathDefault": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedTimestampPathDefaultInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedTimestampPathDefault/{timestamp}", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonPathTimestampDefaultRejectsHttpDate", + "documentation": "By default, IMF-fixdate timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampPathDefault/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "Tue%2C%2029%20Apr%202014%2018%3A30%3A38%20GMT", + "Sun%2C%2002%20Jan%202000%2020%3A34%3A56.000%20GMT" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonPathTimestampDefaultRejectsEpochSeconds", + "documentation": "By default, epoch second timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampPathDefault/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1515531081.1234", + "1515531081" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonPathTimestampDefaultRejectsUTCOffsets", + "documentation": "UTC offsets must be rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampPathDefault/1996-12-19T16%3A39%3A57-08%3A00" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonPathTimestampDefaultRejectsDifferent8601Formats", + "documentation": "By default, maybe-valid ISO-8601 date-times not conforming to RFC 3339\nare rejected with a 400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampPathDefault/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1996-12-19T16%3A39%3A57%2B00", + "1996-12-19T16%3A39%3A57%2B00Z", + "1996-12-19T16%3A39%3A57", + "1996-12-19T163957", + "19961219T163957Z", + "19961219T163957", + "19961219T16%3A39%3A57Z", + "19961219T16%3A39%3A57", + "1996-12-19T16%3A39Z", + "1996-12-19T16%3A39", + "1996-12-19T1639", + "1996-12-19T16Z", + "1996-12-19T16", + "1996-12-19%2016%3A39%3A57Z", + "2011-12-03T10%3A15%3A30%2B01%3A00%5BEurope%2FParis%5D" + ] + }, + "tags": [ + "timestamp" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedTimestampPathDefaultInput": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restjson#MalformedTimestampPathEpoch": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedTimestampPathEpochInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedTimestampPathEpoch/{timestamp}", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonPathTimestampEpochRejectsDateTime", + "documentation": "When the format is epoch-seconds, RFC3339 timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampPathEpoch/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1985-04-12T23%3A20%3A50.52Z", + "1985-04-12T23%3A20%3A50Z", + "1996-12-19T16%3A39%3A57-08%3A00" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonPathTimestampEpochRejectsHttpDate", + "documentation": "When the format is epoch-seconds, IMF-fixdate timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampPathEpoch/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "Tue%2C%2029%20Apr%202014%2018%3A30%3A38%20GMT", + "Sun%2C%2002%20Jan%202000%2020%3A34%3A56.000%20GMT" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonPathTimestampEpochRejectsMalformedValues", + "documentation": "Invalid values for epoch seconds are rejected with a 400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampPathEpoch/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1515531081ABC", + "0x42", + "1515531081.123.456", + "Infinity", + "-Infinity", + "NaN" + ] + }, + "tags": [ + "timestamp" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedTimestampPathEpochInput": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + } + } + }, + "aws.protocoltests.restjson#MalformedTimestampPathHttpDate": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedTimestampPathHttpDateInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedTimestampPathHttpDate/{timestamp}", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonPathTimestampHttpDateRejectsDateTime", + "documentation": "When the format is http-date, RFC3339 timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampPathHttpDate/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1985-04-12T23%3A20%3A50.52Z", + "1985-04-12T23%3A20%3A50Z", + "1996-12-19T16%3A39%3A57-08%3A00" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonPathTimestampHttpDateRejectsEpochSeconds", + "documentation": "When the format is http-date, epoch second timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampPathHttpDate/$value:L" + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1515531081.1234", + "1515531081" + ] + }, + "tags": [ + "timestamp" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedTimestampPathHttpDateInput": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#timestampFormat": "http-date" + } + } + } + }, + "aws.protocoltests.restjson#MalformedTimestampQueryDefault": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedTimestampQueryDefaultInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedTimestampQueryDefault", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonQueryTimestampDefaultRejectsHttpDate", + "documentation": "By default, IMF-fixdate timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampQueryDefault", + "queryParams": [ + "timestamp=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "Tue%2C%2029%20Apr%202014%2018%3A30%3A38%20GMT", + "Sun%2C%2002%20Jan%202000%2020%3A34%3A56.000%20GMT" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonQueryTimestampDefaultRejectsEpochSeconds", + "documentation": "By default, epoch second timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampQueryDefault", + "queryParams": [ + "timestamp=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1515531081.1234", + "1515531081" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonQueryTimestampDefaultRejectsUTCOffsets", + "documentation": "UTC offsets must be rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampQueryDefault", + "queryParams": [ + "timestamp=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonQueryTimestampDefaultRejectsDifferent8601Formats", + "documentation": "By default, maybe-valid ISO-8601 date-times not conforming to RFC 3339\nare rejected with a 400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampQueryDefault", + "queryParams": [ + "timestamp=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1996-12-19T16:39:57+00", + "1996-12-19T16:39:57+00Z", + "1996-12-19T16:39:57", + "1996-12-19T163957", + "19961219T163957Z", + "19961219T163957", + "19961219T16:39:57Z", + "19961219T16:39:57", + "1996-12-19T16:39Z", + "1996-12-19T16:39", + "1996-12-19T1639", + "1996-12-19T16Z", + "1996-12-19T16", + "1996-12-19%2016:39:57Z", + "2011-12-03T10:15:30+01:00[Europe/Paris]" + ] + }, + "tags": [ + "timestamp" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedTimestampQueryDefaultInput": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpQuery": "timestamp", + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restjson#MalformedTimestampQueryEpoch": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedTimestampQueryEpochInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedTimestampQueryEpoch", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonQueryTimestampEpochRejectsDateTime", + "documentation": "When the format is epoch-seconds, RFC3339 timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampQueryEpoch", + "queryParams": [ + "timestamp=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1985-04-12T23%3A20%3A50.52Z", + "1985-04-12T23%3A20%3A50Z", + "1996-12-19T16%3A39%3A57-08%3A00" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonQueryTimestampEpochRejectsHttpDate", + "documentation": "When the format is epoch-seconds, IMF-fixdate timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampQueryEpoch", + "queryParams": [ + "timestamp=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "Tue%2C%2029%20Apr%202014%2018%3A30%3A38%20GMT", + "Sun%2C%2002%20Jan%202000%2020%3A34%3A56.000%20GMT" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonQueryTimestampEpochRejectsMalformedValues", + "documentation": "Invalid values for epoch seconds are rejected with a 400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampQueryEpoch", + "queryParams": [ + "timestamp=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "true", + "1515531081ABC", + "0x42", + "1515531081.123.456", + "Infinity", + "-Infinity", + "NaN" + ] + }, + "tags": [ + "timestamp" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedTimestampQueryEpochInput": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpQuery": "timestamp", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + } + } + }, + "aws.protocoltests.restjson#MalformedTimestampQueryHttpDate": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedTimestampQueryHttpDateInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedTimestampQueryHttpDate", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonQueryTimestampHttpDateRejectsDateTime", + "documentation": "When the format is http-date, RFC3339 timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampQueryHttpDate", + "queryParams": [ + "timestamp=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1985-04-12T23%3A20%3A50.52Z", + "1985-04-12T23%3A20%3A50Z", + "1996-12-19T16%3A39%3A57-08%3A00" + ] + }, + "tags": [ + "timestamp" + ] + }, + { + "id": "RestJsonQueryTimestampHttpDateRejectsEpochSeconds", + "documentation": "When the format is http-date, epoch second timestamps are rejected with a\n400 SerializationException", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedTimestampQueryHttpDate", + "queryParams": [ + "timestamp=$value:L" + ] + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + }, + "testParameters": { + "value": [ + "1515531081.1234", + "1515531081" + ] + }, + "tags": [ + "timestamp" + ] + } + ] + } + }, + "aws.protocoltests.restjson#MalformedTimestampQueryHttpDateInput": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpQuery": "timestamp", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "http-date" + } + } + } + }, + "aws.protocoltests.restjson#MalformedUnion": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MalformedUnionInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/MalformedUnion", + "method": "POST" + }, + "smithy.api#suppress": [ + "UnstableTrait" + ], + "smithy.test#httpMalformedRequestTests": [ + { + "id": "RestJsonMalformedUnionMultipleFieldsSet", + "documentation": "When the union has multiple fields set, the response should be a 400\nSerializationException.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedUnion", + "body": "{ \"union\" : { \"int\": 2, \"string\": \"three\" } }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + } + }, + { + "id": "RestJsonMalformedUnionKnownAndUnknownFieldsSet", + "documentation": "When the union has multiple fields set, even when only one is modeled,\nthe response should be a 400 SerializationException.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedUnion", + "body": "{ \"union\" : { \"int\": 2, \"unknownField\": \"three\" } }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + } + }, + { + "id": "RestJsonMalformedUnionNoFieldsSet", + "documentation": "When the union has no fields set, the response should be a 400\nSerializationException.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedUnion", + "body": "{ \"union\" : { \"int\": null } }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + } + }, + { + "id": "RestJsonMalformedUnionEmptyObjectNoFieldsSet", + "documentation": "When the union is an empty object, it has no fields set, so the\nresponse should be a 400 SerializationException.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedUnion", + "body": "{ \"union\" : { } }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + } + }, + { + "id": "RestJsonMalformedUnionValueIsArray", + "documentation": "When the union value is actually an array, the response should be a 400\nSerializationException.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedUnion", + "body": "{ \"union\" : [\"int\"] }", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + } + }, + { + "id": "RestJsonMalformedUnionUnknownMember", + "documentation": "When an unknown union member is received, the response should be a 400\nSerializationException.", + "protocol": "aws.protocols#restJson1", + "request": { + "method": "POST", + "uri": "/MalformedUnion", + "body": "{\n \"union\": {\n \"unknown\": \"hello\"\n }\n}", + "headers": { + "content-type": "application/json" + } + }, + "response": { + "code": 400, + "headers": { + "x-amzn-errortype": "SerializationException" + } + } + } + ] + } + }, + "aws.protocoltests.restjson#MalformedUnionInput": { + "type": "structure", + "members": { + "union": { + "target": "aws.protocoltests.restjson#SimpleUnion" + } + } + }, + "aws.protocoltests.restjson#MediaTypeHeader": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#MediaTypeHeaderInput" + }, + "output": { + "target": "aws.protocoltests.restjson#MediaTypeHeaderOutput" + }, + "traits": { + "smithy.api#documentation": "This example ensures that mediaType strings are base64 encoded in headers.", + "smithy.api#http": { + "uri": "/MediaTypeHeader", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#MediaTypeHeaderInput": { + "type": "structure", + "members": { + "json": { + "target": "aws.protocoltests.restjson#JsonValue", + "traits": { + "smithy.api#httpHeader": "X-Json" + } + } + } + }, + "aws.protocoltests.restjson#MediaTypeHeaderOutput": { + "type": "structure", + "members": { + "json": { + "target": "aws.protocoltests.restjson#JsonValue", + "traits": { + "smithy.api#httpHeader": "X-Json" + } + } + } + }, + "aws.protocoltests.restjson#MyUnion": { + "type": "union", + "members": { + "stringValue": { + "target": "smithy.api#String" + }, + "booleanValue": { + "target": "smithy.api#Boolean" + }, + "numberValue": { + "target": "smithy.api#Integer" + }, + "blobValue": { + "target": "smithy.api#Blob" + }, + "timestampValue": { + "target": "smithy.api#Timestamp" + }, + "enumValue": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "listValue": { + "target": "aws.protocoltests.shared#StringList" + }, + "mapValue": { + "target": "aws.protocoltests.shared#StringMap" + }, + "structureValue": { + "target": "aws.protocoltests.shared#GreetingStruct" + }, + "renamedStructureValue": { + "target": "aws.protocoltests.restjson.nested#GreetingStruct" + }, + "unionValue": { + "target": "aws.protocoltests.restjson#NestedUnion" + } + }, + "traits": { + "smithy.api#documentation": "A union with a representative set of types for members." + } + }, + "aws.protocoltests.restjson#NestedDefaultsMixin": { + "type": "structure", + "members": { + "dialog": { + "target": "aws.protocoltests.restjson#Dialog", + "traits": { + "smithy.api#required": {} + } + }, + "dialogList": { + "target": "aws.protocoltests.restjson#DialogList", + "traits": { + "smithy.api#default": [] + } + }, + "dialogMap": { + "target": "aws.protocoltests.restjson#DialogMap", + "traits": { + "smithy.api#default": {} + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.restjson#NestedPayload": { + "type": "structure", + "members": { + "greeting": { + "target": "smithy.api#String" + }, + "name": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.restjson#NestedUnion": { + "type": "union", + "members": { + "stringValue": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "A union used to test unions nested inside unions." + } + }, + "aws.protocoltests.restjson#NoInputAndNoOutput": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request or response payload because the operation has no input or output.\nWhile this should be rare, code generators must support this.", + "smithy.api#http": { + "uri": "/NoInputAndNoOutput", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#NoInputAndOutput": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restjson#NoInputAndOutputOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request or response payload because the operation has no input and the\noutput is empty. While this should be rare, code generators must support\nthis.", + "smithy.api#http": { + "uri": "/NoInputAndOutputOutput", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#NoInputAndOutputOutput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#NullAndEmptyHeadersClient": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#NullAndEmptyHeadersIO" + }, + "output": { + "target": "aws.protocoltests.restjson#NullAndEmptyHeadersIO" + }, + "traits": { + "smithy.api#documentation": "Null headers are not sent over the wire, empty headers are serialized to \"\"", + "smithy.api#http": { + "uri": "/NullAndEmptyHeadersClient", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restjson#NullAndEmptyHeadersIO": { + "type": "structure", + "members": { + "a": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-A" + } + }, + "b": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-B" + } + }, + "c": { + "target": "aws.protocoltests.shared#StringList", + "traits": { + "smithy.api#httpHeader": "X-C" + } + } + } + }, + "aws.protocoltests.restjson#NullAndEmptyHeadersServer": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#NullAndEmptyHeadersIO" + }, + "output": { + "target": "aws.protocoltests.restjson#NullAndEmptyHeadersIO" + }, + "traits": { + "smithy.api#documentation": "Null headers are not sent over the wire, empty headers are serialized to \"\"", + "smithy.api#http": { + "uri": "/NullAndEmptyHeadersServer", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": [ + "server-only" + ] + } + }, + "aws.protocoltests.restjson#OmitsNullSerializesEmptyString": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#OmitsNullSerializesEmptyStringInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "Omits null, but serializes empty string value.", + "smithy.api#http": { + "uri": "/OmitsNullSerializesEmptyString", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#OmitsNullSerializesEmptyStringInput": { + "type": "structure", + "members": { + "nullValue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "Null" + } + }, + "emptyString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "Empty" + } + } + } + }, + "aws.protocoltests.restjson#OmitsSerializingEmptyLists": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#OmitsSerializingEmptyListsInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "Omits serializing empty lists. Because empty strings are serilized as\n`Foo=`, empty lists cannot also be serialized as `Foo=` and instead\nmust be omitted.", + "smithy.api#http": { + "uri": "/OmitsSerializingEmptyLists", + "method": "POST" + }, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restjson#OmitsSerializingEmptyListsInput": { + "type": "structure", + "members": { + "queryStringList": { + "target": "aws.protocoltests.shared#StringList", + "traits": { + "smithy.api#httpQuery": "StringList" + } + }, + "queryIntegerList": { + "target": "aws.protocoltests.shared#IntegerList", + "traits": { + "smithy.api#httpQuery": "IntegerList" + } + }, + "queryDoubleList": { + "target": "aws.protocoltests.shared#DoubleList", + "traits": { + "smithy.api#httpQuery": "DoubleList" + } + }, + "queryBooleanList": { + "target": "aws.protocoltests.shared#BooleanList", + "traits": { + "smithy.api#httpQuery": "BooleanList" + } + }, + "queryTimestampList": { + "target": "aws.protocoltests.shared#TimestampList", + "traits": { + "smithy.api#httpQuery": "TimestampList" + } + }, + "queryEnumList": { + "target": "aws.protocoltests.shared#FooEnumList", + "traits": { + "smithy.api#httpQuery": "EnumList" + } + }, + "queryIntegerEnumList": { + "target": "aws.protocoltests.shared#IntegerEnumList", + "traits": { + "smithy.api#httpQuery": "IntegerEnumList" + } + } + } + }, + "aws.protocoltests.restjson#OperationWithDefaults": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#OperationWithDefaultsInput" + }, + "output": { + "target": "aws.protocoltests.restjson#OperationWithDefaultsOutput" + }, + "traits": { + "smithy.api#http": { + "uri": "/OperationWithDefaults", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#OperationWithDefaultsInput": { + "type": "structure", + "members": { + "defaults": { + "target": "aws.protocoltests.restjson#Defaults" + }, + "clientOptionalDefaults": { + "target": "aws.protocoltests.restjson#ClientOptionalDefaults" + }, + "topLevelDefault": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "hi" + } + }, + "otherTopLevelDefault": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 0 + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#OperationWithDefaultsOutput": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restjson#DefaultsMixin" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#OperationWithNestedStructure": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#OperationWithNestedStructureInput" + }, + "output": { + "target": "aws.protocoltests.restjson#OperationWithNestedStructureOutput" + }, + "traits": { + "smithy.api#http": { + "uri": "/OperationWithNestedStructure", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#OperationWithNestedStructureInput": { + "type": "structure", + "members": { + "topLevel": { + "target": "aws.protocoltests.restjson#TopLevel", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#OperationWithNestedStructureOutput": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restjson#NestedDefaultsMixin" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#OutputStream": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restjson#OutputStreamOutput" + }, + "errors": [ + { + "target": "aws.protocoltests.restjson#ServiceUnavailableError" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/OutputStream" + }, + "smithy.test#eventStreamTests": [ + { + "id": "BooleanHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "booleanHeader": true + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "booleanHeader": { + "boolean": true + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMNYm9vbGVhbkhlYWRlcgC4J9Ws" + } + ] + }, + { + "id": "ByteHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "byteHeader": 1 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "byteHeader": { + "byte": 1 + } + }, + "bytes": "AAAASQAAADlvxG1ZDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMKYnl0ZUhlYWRlcgIBKFTmjg==" + } + ] + }, + { + "id": "ShortHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "shortHeader": 2 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "shortHeader": { + "short": 2 + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMLc2hvcnRIZWFkZXIDAAL1ETsK" + } + ] + }, + { + "id": "IntegerHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "intHeader": 3 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "intHeader": { + "integer": 3 + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMJaW50SGVhZGVyBAAAAAPlyUrb" + } + ] + }, + { + "id": "LongHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "longHeader": 4294967294 + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "longHeader": { + "long": 4294967294 + } + }, + "bytes": "AAAAUAAAAEAr7VEyDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMKbG9uZ0hlYWRlcgUAAAAA/////udnd/I=" + } + ] + }, + { + "id": "BlobHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "blobHeader": "foo" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "blobHeader": { + "blob": "Zm9v" + } + }, + "bytes": "AAAATQAAAD2dKQ+ADTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMKYmxvYkhlYWRlcgYAA2Zvb5sbbGM=" + } + ] + }, + { + "id": "StringHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "stringHeader": "foo" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "stringHeader": { + "string": "foo" + } + }, + "bytes": "AAAATwAAAD8J5z3MDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMMc3RyaW5nSGVhZGVyBwADZm9vxT+2MA==" + } + ] + }, + { + "id": "TimestampHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "timestampHeader": "2024-10-31T14:15:14Z" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "timestampHeader": { + "timestamp": "2024-10-31T14:15:14Z" + } + }, + "bytes": "AAAAVQAAAEWTZyrNDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMPdGltZXN0YW1wSGVhZGVyCAAAAZLi7jFQ6uV3Eg==" + } + ] + }, + { + "id": "MultipleHeaderOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "booleanHeader": true, + "stringHeader": "foo", + "blobHeader": "bar" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "booleanHeader": { + "boolean": true + }, + "stringHeader": { + "string": "foo" + }, + "blobHeader": { + "blob": "YmFy" + } + }, + "bytes": "AAAAbwAAAF+FlHOQDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMNYm9vbGVhbkhlYWRlcgAMc3RyaW5nSGVhZGVyBwADZm9vCmJsb2JIZWFkZXIGAANiYXIDXbo7" + } + ] + }, + { + "id": "StringPayloadOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "stringPayload": { + "payload": "foo" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "stringPayload" + }, + ":content-type": { + "string": "text/plain" + } + }, + "body": "foo", + "bodyMediaType": "text/plain", + "bytes": "AAAAYAAAAE30fZUJDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcADXN0cmluZ1BheWxvYWQNOmNvbnRlbnQtdHlwZQcACnRleHQvcGxhaW5mb29G1ELr" + } + ] + }, + { + "id": "BlobPayloadOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "blobPayload": { + "payload": "bar" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "blobPayload" + }, + ":content-type": { + "string": "application/octet-stream" + } + }, + "body": "bar", + "bodyMediaType": "application/octet-stream", + "bytes": "AAAAbAAAAFkrV6x1DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAC2Jsb2JQYXlsb2FkDTpjb250ZW50LXR5cGUHABhhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW1iYXJv5nGJ" + } + ] + }, + { + "id": "StructurePayloadOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "structurePayload": { + "payload": { + "structureMember": "foo" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "structurePayload" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"structureMember\":\"foo\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAfwAAAFacqFy2DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAEHN0cnVjdHVyZVBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb257InN0cnVjdHVyZU1lbWJlciI6ImZvbyJ9rcIRVA==" + } + ] + }, + { + "id": "UnionPayloadOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "unionPayload": { + "payload": { + "unionMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "unionPayload" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"unionMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAdwAAAFKrtdNuDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcADHVuaW9uUGF5bG9hZA06Y29udGVudC10eXBlBwAQYXBwbGljYXRpb24vanNvbnsidW5pb25NZW1iZXIiOiJiYXIifcZDMD4=" + } + ] + }, + { + "id": "HeadersAndExplicitPayloadOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headersAndExplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAlQAAAGw4wFp6DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAGWhlYWRlcnNBbmRFeHBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJzdHJ1Y3R1cmVNZW1iZXIiOiJiYXIifTafKXs=" + } + ] + }, + { + "id": "HeadersAndImplicitPayloadOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headersAndImplicitPayload": { + "header": "foo", + "payload": "bar" + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headersAndImplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"payload\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAjQAAAGxoUIY5DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAGWhlYWRlcnNBbmRJbXBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJwYXlsb2FkIjoiYmFyIn15lZtT" + } + ] + }, + { + "id": "ServerErrorOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "error": { + "message": "foo" + } + }, + "headers": { + ":message-type": { + "string": "exception" + }, + ":exception-type": { + "string": "error" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"message\":\"foo\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAdAAAAFObEpkoDTptZXNzYWdlLXR5cGUHAAlleGNlcHRpb24POmV4Y2VwdGlvbi10eXBlBwAFZXJyb3INOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb257Im1lc3NhZ2UiOiJmb28ifTua1S8=" + } + ], + "appliesTo": "server" + }, + { + "id": "ClientErrorOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "error": { + "message": "foo" + } + }, + "headers": { + ":message-type": { + "string": "exception" + }, + ":exception-type": { + "string": "error" + }, + ":content-type": { + "string": "application/json" + } + }, + "body": "{\"message\":\"foo\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAdAAAAFObEpkoDTptZXNzYWdlLXR5cGUHAAlleGNlcHRpb24POmV4Y2VwdGlvbi10eXBlBwAFZXJyb3INOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb257Im1lc3NhZ2UiOiJmb28ifTua1S8=" + } + ], + "expectation": { + "failure": { + "errorId": "aws.protocoltests.restjson#ErrorEvent" + } + }, + "appliesTo": "client" + }, + { + "id": "ClientUnexpectedErrorOutput", + "documentation": "Clients must be able to handle structured, but unmodeled errors.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "headers": { + ":message-type": { + "string": "error" + }, + ":error-code": { + "string": "internal-error" + }, + ":error-message": { + "string": "An unknown error occurred." + } + }, + "bytes": "AAAAbwAAAF+FlHOQDTptZXNzYWdlLXR5cGUHAAVlcnJvcgs6ZXJyb3ItY29kZQcADmludGVybmFsLWVycm9yDjplcnJvci1tZXNzYWdlBwAaQW4gdW5rbm93biBlcnJvciBvY2N1cnJlZC4kun0t" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "client" + }, + { + "id": "MissingMessageTypeOutput", + "documentation": "Clients must reject events that don't contain a :message-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":event-type": { + "string": "headersAndExplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAfwAAAFacqFy2CzpldmVudC10eXBlBwAZaGVhZGVyc0FuZEV4cGxpY2l0UGF5bG9hZA06Y29udGVudC10eXBlBwAQYXBwbGljYXRpb24vanNvbgZoZWFkZXIHAANmb297InN0cnVjdHVyZU1lbWJlciI6ImJhciJ98LexJg==" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "client" + }, + { + "id": "MalformedMessageTypeOutput", + "documentation": "Client must reject events that contain a malformed :message-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "blob": "ZXZlbnQ=" + }, + ":event-type": { + "string": "headersAndExplicitPayload" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAlQAAAGw4wFp6DTptZXNzYWdlLXR5cGUGAAVldmVudAs6ZXZlbnQtdHlwZQcAGWhlYWRlcnNBbmRFeHBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJzdHJ1Y3R1cmVNZW1iZXIiOiJiYXIifVwdfzU=" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "client" + }, + { + "id": "MissingEventTypeOutput", + "documentation": "Clients must reject message events that don't contain an :event-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAbQAAAER1MekcDTptZXNzYWdlLXR5cGUHAAVldmVudA06Y29udGVudC10eXBlBwAQYXBwbGljYXRpb24vanNvbgZoZWFkZXIHAANmb297InN0cnVjdHVyZU1lbWJlciI6ImJhciJ9riy0Gg==" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "client" + }, + { + "id": "MalformedEventTypeOutput", + "documentation": "Clients must reject message events that contain a malformed :event-type header.", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headersAndExplicitPayload": { + "header": "foo", + "payload": { + "structureMember": "bar" + } + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "blob": "aGVhZGVyc0FuZEV4cGxpY2l0UGF5bG9hZA==" + }, + ":content-type": { + "string": "application/json" + }, + "header": { + "string": "foo" + } + }, + "body": "{\"structureMember\":\"bar\"}", + "bodyMediaType": "application/json", + "bytes": "AAAAlQAAAGw4wFp6DTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQYAGWhlYWRlcnNBbmRFeHBsaWNpdFBheWxvYWQNOmNvbnRlbnQtdHlwZQcAEGFwcGxpY2F0aW9uL2pzb24GaGVhZGVyBwADZm9veyJzdHJ1Y3R1cmVNZW1iZXIiOiJiYXIifcP6KLk=" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "client" + }, + { + "id": "ModeledProtocolError", + "protocol": "aws.protocols#restJson1", + "initialResponse": { + "code": 500, + "headers": { + "Content-Type": "application/json", + "X-Amzn-Errortype": "ServiceUnavailableError" + }, + "body": "{\"message\": \"foo\"}", + "bodyMediaType": "application/json" + }, + "initialResponseShape": "smithy.test#InitialHttpResponse", + "expectation": { + "failure": { + "errorId": "aws.protocoltests.restjson#ServiceUnavailableError" + } + }, + "appliesTo": "client" + }, + { + "id": "UnmodeledProtocolError", + "protocol": "aws.protocols#restJson1", + "initialResponse": { + "code": 500, + "headers": { + "Content-Type": "text/plain" + }, + "body": "service unavailable", + "bodyMediaType": "text/plain" + }, + "initialResponseShape": "smithy.test#InitialHttpResponse", + "expectation": { + "failure": {} + }, + "appliesTo": "client" + } + ] + } + }, + "aws.protocoltests.restjson#OutputStreamOutput": { + "type": "structure", + "members": { + "stream": { + "target": "aws.protocoltests.restjson#EventStream", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#OutputStreamWithInitialResponse": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restjson#OutputStreamWithInitialResponseOutput" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/OutputStreamWithInitialResponse" + }, + "smithy.test#eventStreamTests": [ + { + "id": "InitialResponseOutput", + "protocol": "aws.protocols#restJson1", + "initialResponseParams": { + "initialResponseMember": "foo" + }, + "initialResponse": { + "code": 200, + "headers": { + "initial-response-member": "foo" + } + }, + "initialResponseShape": "smithy.test#InitialHttpResponse" + }, + { + "id": "MissingRequiredInitialResponseOutput", + "protocol": "aws.protocols#restJson1", + "events": [ + { + "type": "response", + "params": { + "headers": { + "booleanHeader": true + } + }, + "headers": { + ":message-type": { + "string": "event" + }, + ":event-type": { + "string": "headers" + }, + "booleanHeader": { + "boolean": true + } + }, + "bytes": "AAAASwAAADv7Cl8VDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAB2hlYWRlcnMNYm9vbGVhbkhlYWRlcgC4J9Ws" + } + ], + "expectation": { + "failure": {} + }, + "appliesTo": "client" + } + ] + } + }, + "aws.protocoltests.restjson#OutputStreamWithInitialResponseOutput": { + "type": "structure", + "members": { + "initialResponseMember": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "initial-response-member", + "smithy.api#required": {} + } + }, + "stream": { + "target": "aws.protocoltests.restjson#EventStream", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#PayloadConfig": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Integer" + } + } + }, + "aws.protocoltests.restjson#PayloadStructure": { + "type": "structure", + "members": { + "structureMember": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.restjson#PayloadUnion": { + "type": "union", + "members": { + "unionMember": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.restjson#PlayerAction": { + "type": "union", + "members": { + "quit": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "Quit the game." + } + } + } + }, + "aws.protocoltests.restjson#PostPlayerAction": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#PostPlayerActionInput" + }, + "output": { + "target": "aws.protocoltests.restjson#PostPlayerActionOutput" + }, + "traits": { + "smithy.api#documentation": "This operation defines a union with a Unit member.", + "smithy.api#http": { + "uri": "/PostPlayerAction", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#PostPlayerActionInput": { + "type": "structure", + "members": { + "action": { + "target": "aws.protocoltests.restjson#PlayerAction" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#PostPlayerActionOutput": { + "type": "structure", + "members": { + "action": { + "target": "aws.protocoltests.restjson#PlayerAction", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#PostUnionWithJsonName": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#PostUnionWithJsonNameInput" + }, + "output": { + "target": "aws.protocoltests.restjson#PostUnionWithJsonNameOutput" + }, + "traits": { + "smithy.api#documentation": "This operation defines a union that uses jsonName on some members.", + "smithy.api#http": { + "uri": "/PostUnionWithJsonName", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#PostUnionWithJsonNameInput": { + "type": "structure", + "members": { + "value": { + "target": "aws.protocoltests.restjson#UnionWithJsonName" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#PostUnionWithJsonNameOutput": { + "type": "structure", + "members": { + "value": { + "target": "aws.protocoltests.restjson#UnionWithJsonName", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#PutWithContentEncoding": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#PutWithContentEncodingInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/requestcompression/putcontentwithencoding" + }, + "smithy.api#requestCompression": { + "encodings": [ + "gzip" + ] + } + } + }, + "aws.protocoltests.restjson#PutWithContentEncodingInput": { + "type": "structure", + "members": { + "encoding": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "data": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#QueryIdempotencyTokenAutoFill": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#QueryIdempotencyTokenAutoFillInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "Automatically adds idempotency tokens.", + "smithy.api#http": { + "uri": "/QueryIdempotencyTokenAutoFill", + "method": "POST" + }, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restjson#QueryIdempotencyTokenAutoFillInput": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "token", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "aws.protocoltests.restjson#QueryMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.restjson#QueryParamsAsStringListMap": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#QueryParamsAsStringListMapInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/StringListMap", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#QueryParamsAsStringListMapInput": { + "type": "structure", + "members": { + "qux": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "corge" + } + }, + "foo": { + "target": "aws.protocoltests.shared#StringListMap", + "traits": { + "smithy.api#httpQueryParams": {} + } + } + }, + "traits": { + "smithy.api#suppress": [ + "HttpQueryParamsTrait" + ] + } + }, + "aws.protocoltests.restjson#QueryPrecedence": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#QueryPrecedenceInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/Precedence", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#QueryPrecedenceInput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "bar" + } + }, + "baz": { + "target": "aws.protocoltests.shared#StringMap", + "traits": { + "smithy.api#httpQueryParams": {} + } + } + }, + "traits": { + "smithy.api#suppress": [ + "HttpQueryParamsTrait" + ] + } + }, + "aws.protocoltests.restjson#RecursiveShapes": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#RecursiveShapesInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#RecursiveShapesInputOutput" + }, + "traits": { + "smithy.api#documentation": "Recursive shapes", + "smithy.api#http": { + "uri": "/RecursiveShapes", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#RecursiveShapesInputOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.restjson#RecursiveShapesInputOutputNested1" + } + } + }, + "aws.protocoltests.restjson#RecursiveShapesInputOutputNested1": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String" + }, + "nested": { + "target": "aws.protocoltests.restjson#RecursiveShapesInputOutputNested2" + } + } + }, + "aws.protocoltests.restjson#RecursiveShapesInputOutputNested2": { + "type": "structure", + "members": { + "bar": { + "target": "smithy.api#String" + }, + "recursiveMember": { + "target": "aws.protocoltests.restjson#RecursiveShapesInputOutputNested1" + } + } + }, + "aws.protocoltests.restjson#ResponseCodeHttpFallback": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#ResponseCodeHttpFallbackInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#ResponseCodeHttpFallbackInputOutput" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/responseCodeHttpFallback", + "code": 201 + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#ResponseCodeHttpFallbackInputOutput": { + "type": "structure", + "members": {} + }, + "aws.protocoltests.restjson#ResponseCodeRequired": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restjson#ResponseCodeRequiredOutput" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/responseCodeRequired", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#ResponseCodeRequiredOutput": { + "type": "structure", + "members": { + "responseCode": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpResponseCode": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restjson#RestJson": { + "type": "service", + "version": "2019-12-16", + "operations": [ + { + "target": "aws.protocoltests.restjson#AllQueryStringTypes" + }, + { + "target": "aws.protocoltests.restjson#ConstantAndVariableQueryString" + }, + { + "target": "aws.protocoltests.restjson#ConstantQueryString" + }, + { + "target": "aws.protocoltests.restjson#ContentTypeParameters" + }, + { + "target": "aws.protocoltests.restjson#DatetimeOffsets" + }, + { + "target": "aws.protocoltests.restjson#DocumentType" + }, + { + "target": "aws.protocoltests.restjson#DocumentTypeAsMapValue" + }, + { + "target": "aws.protocoltests.restjson#DocumentTypeAsPayload" + }, + { + "target": "aws.protocoltests.restjson#DuplexStream" + }, + { + "target": "aws.protocoltests.restjson#DuplexStreamWithDistinctStreams" + }, + { + "target": "aws.protocoltests.restjson#DuplexStreamWithInitialMessages" + }, + { + "target": "aws.protocoltests.restjson#EmptyInputAndEmptyOutput" + }, + { + "target": "aws.protocoltests.restjson#EndpointOperation" + }, + { + "target": "aws.protocoltests.restjson#EndpointWithHostLabelOperation" + }, + { + "target": "aws.protocoltests.restjson#FractionalSeconds" + }, + { + "target": "aws.protocoltests.restjson#GreetingWithErrors" + }, + { + "target": "aws.protocoltests.restjson#HostWithPathOperation" + }, + { + "target": "aws.protocoltests.restjson#HttpChecksumRequired" + }, + { + "target": "aws.protocoltests.restjson#HttpEmptyPrefixHeaders" + }, + { + "target": "aws.protocoltests.restjson#HttpEnumPayload" + }, + { + "target": "aws.protocoltests.restjson#HttpPayloadTraits" + }, + { + "target": "aws.protocoltests.restjson#HttpPayloadTraitsWithMediaType" + }, + { + "target": "aws.protocoltests.restjson#HttpPayloadWithStructure" + }, + { + "target": "aws.protocoltests.restjson#HttpPayloadWithUnion" + }, + { + "target": "aws.protocoltests.restjson#HttpPrefixHeaders" + }, + { + "target": "aws.protocoltests.restjson#HttpPrefixHeadersInResponse" + }, + { + "target": "aws.protocoltests.restjson#HttpQueryParamsOnlyOperation" + }, + { + "target": "aws.protocoltests.restjson#HttpRequestWithFloatLabels" + }, + { + "target": "aws.protocoltests.restjson#HttpRequestWithGreedyLabelInPath" + }, + { + "target": "aws.protocoltests.restjson#HttpRequestWithLabels" + }, + { + "target": "aws.protocoltests.restjson#HttpRequestWithLabelsAndTimestampFormat" + }, + { + "target": "aws.protocoltests.restjson#HttpRequestWithRegexLiteral" + }, + { + "target": "aws.protocoltests.restjson#HttpResponseCode" + }, + { + "target": "aws.protocoltests.restjson#HttpStringPayload" + }, + { + "target": "aws.protocoltests.restjson#IgnoreQueryParamsInResponse" + }, + { + "target": "aws.protocoltests.restjson#InputAndOutputWithHeaders" + }, + { + "target": "aws.protocoltests.restjson#InputStream" + }, + { + "target": "aws.protocoltests.restjson#InputStreamWithInitialRequest" + }, + { + "target": "aws.protocoltests.restjson#JsonBlobs" + }, + { + "target": "aws.protocoltests.restjson#JsonEnums" + }, + { + "target": "aws.protocoltests.restjson#JsonIntEnums" + }, + { + "target": "aws.protocoltests.restjson#JsonLists" + }, + { + "target": "aws.protocoltests.restjson#JsonMaps" + }, + { + "target": "aws.protocoltests.restjson#JsonTimestamps" + }, + { + "target": "aws.protocoltests.restjson#JsonUnions" + }, + { + "target": "aws.protocoltests.restjson#MalformedAcceptWithBody" + }, + { + "target": "aws.protocoltests.restjson#MalformedAcceptWithGenericString" + }, + { + "target": "aws.protocoltests.restjson#MalformedAcceptWithPayload" + }, + { + "target": "aws.protocoltests.restjson#MalformedBlob" + }, + { + "target": "aws.protocoltests.restjson#MalformedBoolean" + }, + { + "target": "aws.protocoltests.restjson#MalformedByte" + }, + { + "target": "aws.protocoltests.restjson#MalformedContentTypeWithBody" + }, + { + "target": "aws.protocoltests.restjson#MalformedContentTypeWithGenericString" + }, + { + "target": "aws.protocoltests.restjson#MalformedContentTypeWithoutBody" + }, + { + "target": "aws.protocoltests.restjson#MalformedContentTypeWithoutBodyEmptyInput" + }, + { + "target": "aws.protocoltests.restjson#MalformedContentTypeWithPayload" + }, + { + "target": "aws.protocoltests.restjson#MalformedDouble" + }, + { + "target": "aws.protocoltests.restjson#MalformedFloat" + }, + { + "target": "aws.protocoltests.restjson#MalformedInteger" + }, + { + "target": "aws.protocoltests.restjson#MalformedList" + }, + { + "target": "aws.protocoltests.restjson#MalformedLong" + }, + { + "target": "aws.protocoltests.restjson#MalformedMap" + }, + { + "target": "aws.protocoltests.restjson#MalformedRequestBody" + }, + { + "target": "aws.protocoltests.restjson#MalformedShort" + }, + { + "target": "aws.protocoltests.restjson#MalformedString" + }, + { + "target": "aws.protocoltests.restjson#MalformedTimestampBodyDateTime" + }, + { + "target": "aws.protocoltests.restjson#MalformedTimestampBodyDefault" + }, + { + "target": "aws.protocoltests.restjson#MalformedTimestampBodyHttpDate" + }, + { + "target": "aws.protocoltests.restjson#MalformedTimestampHeaderDateTime" + }, + { + "target": "aws.protocoltests.restjson#MalformedTimestampHeaderDefault" + }, + { + "target": "aws.protocoltests.restjson#MalformedTimestampHeaderEpoch" + }, + { + "target": "aws.protocoltests.restjson#MalformedTimestampPathDefault" + }, + { + "target": "aws.protocoltests.restjson#MalformedTimestampPathEpoch" + }, + { + "target": "aws.protocoltests.restjson#MalformedTimestampPathHttpDate" + }, + { + "target": "aws.protocoltests.restjson#MalformedTimestampQueryDefault" + }, + { + "target": "aws.protocoltests.restjson#MalformedTimestampQueryEpoch" + }, + { + "target": "aws.protocoltests.restjson#MalformedTimestampQueryHttpDate" + }, + { + "target": "aws.protocoltests.restjson#MalformedUnion" + }, + { + "target": "aws.protocoltests.restjson#MediaTypeHeader" + }, + { + "target": "aws.protocoltests.restjson#NoInputAndNoOutput" + }, + { + "target": "aws.protocoltests.restjson#NoInputAndOutput" + }, + { + "target": "aws.protocoltests.restjson#NullAndEmptyHeadersClient" + }, + { + "target": "aws.protocoltests.restjson#NullAndEmptyHeadersServer" + }, + { + "target": "aws.protocoltests.restjson#OmitsNullSerializesEmptyString" + }, + { + "target": "aws.protocoltests.restjson#OmitsSerializingEmptyLists" + }, + { + "target": "aws.protocoltests.restjson#OperationWithDefaults" + }, + { + "target": "aws.protocoltests.restjson#OperationWithNestedStructure" + }, + { + "target": "aws.protocoltests.restjson#OutputStream" + }, + { + "target": "aws.protocoltests.restjson#OutputStreamWithInitialResponse" + }, + { + "target": "aws.protocoltests.restjson#PostPlayerAction" + }, + { + "target": "aws.protocoltests.restjson#PostUnionWithJsonName" + }, + { + "target": "aws.protocoltests.restjson#PutWithContentEncoding" + }, + { + "target": "aws.protocoltests.restjson#QueryIdempotencyTokenAutoFill" + }, + { + "target": "aws.protocoltests.restjson#QueryParamsAsStringListMap" + }, + { + "target": "aws.protocoltests.restjson#QueryPrecedence" + }, + { + "target": "aws.protocoltests.restjson#RecursiveShapes" + }, + { + "target": "aws.protocoltests.restjson#ResponseCodeHttpFallback" + }, + { + "target": "aws.protocoltests.restjson#ResponseCodeRequired" + }, + { + "target": "aws.protocoltests.restjson#SimpleScalarProperties" + }, + { + "target": "aws.protocoltests.restjson#SparseJsonLists" + }, + { + "target": "aws.protocoltests.restjson#SparseJsonMaps" + }, + { + "target": "aws.protocoltests.restjson#StreamingTraits" + }, + { + "target": "aws.protocoltests.restjson#StreamingTraitsRequireLength" + }, + { + "target": "aws.protocoltests.restjson#StreamingTraitsWithMediaType" + }, + { + "target": "aws.protocoltests.restjson#TestBodyStructure" + }, + { + "target": "aws.protocoltests.restjson#TestGetNoInputNoPayload" + }, + { + "target": "aws.protocoltests.restjson#TestGetNoPayload" + }, + { + "target": "aws.protocoltests.restjson#TestPayloadBlob" + }, + { + "target": "aws.protocoltests.restjson#TestPayloadStructure" + }, + { + "target": "aws.protocoltests.restjson#TestPostNoInputNoPayload" + }, + { + "target": "aws.protocoltests.restjson#TestPostNoPayload" + }, + { + "target": "aws.protocoltests.restjson#TimestampFormatHeaders" + }, + { + "target": "aws.protocoltests.restjson#UnitInputAndOutput" + } + ], + "rename": { + "aws.protocoltests.restjson.nested#GreetingStruct": "RenamedGreeting" + }, + "traits": { + "aws.api#service": { + "sdkId": "Rest Json Protocol" + }, + "aws.auth#sigv4": { + "name": "restjson" + }, + "aws.protocols#restJson1": {}, + "smithy.api#title": "Sample Rest Json Protocol Service" + } + }, + "aws.protocoltests.restjson#ServiceUnavailableError": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "aws.protocoltests.restjson#SimpleList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.restjson#SimpleMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.restjson#SimpleScalarProperties": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#SimpleScalarPropertiesInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#SimpleScalarPropertiesInputOutput" + }, + "traits": { + "smithy.api#http": { + "uri": "/SimpleScalarProperties", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#SimpleScalarPropertiesInputOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Foo" + } + }, + "stringValue": { + "target": "smithy.api#String" + }, + "trueBooleanValue": { + "target": "smithy.api#Boolean" + }, + "falseBooleanValue": { + "target": "smithy.api#Boolean" + }, + "byteValue": { + "target": "smithy.api#Byte" + }, + "shortValue": { + "target": "smithy.api#Short" + }, + "integerValue": { + "target": "smithy.api#Integer" + }, + "longValue": { + "target": "smithy.api#Long" + }, + "floatValue": { + "target": "smithy.api#Float" + }, + "doubleValue": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "DoubleDribble" + } + } + } + }, + "aws.protocoltests.restjson#SimpleUnion": { + "type": "union", + "members": { + "int": { + "target": "smithy.api#Integer" + }, + "string": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.restjson#SingletonEvent": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.restjson#SingletonEventStream": { + "type": "union", + "members": { + "singleton": { + "target": "aws.protocoltests.restjson#SingletonEvent" + } + } + }, + "aws.protocoltests.restjson#SparseBooleanMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Boolean" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "aws.protocoltests.restjson#SparseJsonLists": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#SparseJsonListsInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#SparseJsonListsInputOutput" + }, + "traits": { + "smithy.api#http": { + "uri": "/SparseJsonLists", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#SparseJsonListsInputOutput": { + "type": "structure", + "members": { + "sparseStringList": { + "target": "aws.protocoltests.shared#SparseStringList" + }, + "sparseShortList": { + "target": "aws.protocoltests.shared#SparseShortList" + } + } + }, + "aws.protocoltests.restjson#SparseJsonMaps": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#SparseJsonMapsInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#SparseJsonMapsInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example tests sparse map serialization.", + "smithy.api#http": { + "uri": "/SparseJsonMaps", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#SparseJsonMapsInputOutput": { + "type": "structure", + "members": { + "sparseStructMap": { + "target": "aws.protocoltests.restjson#SparseStructMap" + }, + "sparseNumberMap": { + "target": "aws.protocoltests.restjson#SparseNumberMap" + }, + "sparseBooleanMap": { + "target": "aws.protocoltests.restjson#SparseBooleanMap" + }, + "sparseStringMap": { + "target": "aws.protocoltests.shared#SparseStringMap" + }, + "sparseSetMap": { + "target": "aws.protocoltests.restjson#SparseSetMap" + } + } + }, + "aws.protocoltests.restjson#SparseNumberMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "aws.protocoltests.restjson#SparseSetMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#StringSet" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "aws.protocoltests.restjson#SparseStructMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#GreetingStruct" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "aws.protocoltests.restjson#StreamingBlob": { + "type": "blob", + "traits": { + "smithy.api#streaming": {} + } + }, + "aws.protocoltests.restjson#StreamingTextPlainBlob": { + "type": "blob", + "traits": { + "smithy.api#mediaType": "text/plain", + "smithy.api#streaming": {} + } + }, + "aws.protocoltests.restjson#StreamingTraits": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#StreamingTraitsInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#StreamingTraitsInputOutput" + }, + "traits": { + "smithy.api#documentation": "This examples serializes a streaming blob shape in the request body.\n\nIn this example, no JSON document is synthesized because the payload is\nnot a structure or a union type.", + "smithy.api#http": { + "uri": "/StreamingTraits", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#StreamingTraitsInputOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Foo" + } + }, + "blob": { + "target": "aws.protocoltests.restjson#StreamingBlob", + "traits": { + "smithy.api#default": "", + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#StreamingTraitsRequireLength": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#StreamingTraitsRequireLengthInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This examples serializes a streaming blob shape with a required content\nlength in the request body.\n\nIn this example, no JSON document is synthesized because the payload is\nnot a structure or a union type.", + "smithy.api#http": { + "uri": "/StreamingTraitsRequireLength", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#StreamingTraitsRequireLengthInput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Foo" + } + }, + "blob": { + "target": "aws.protocoltests.restjson#FiniteStreamingBlob", + "traits": { + "smithy.api#default": "", + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restjson#StreamingTraitsWithMediaType": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#StreamingTraitsWithMediaTypeInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#StreamingTraitsWithMediaTypeInputOutput" + }, + "traits": { + "smithy.api#documentation": "This examples serializes a streaming media-typed blob shape in the request body.\n\nThis examples uses a `@mediaType` trait on the payload to force a custom\ncontent-type to be serialized.", + "smithy.api#http": { + "uri": "/StreamingTraitsWithMediaType", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#StreamingTraitsWithMediaTypeInputOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Foo" + } + }, + "blob": { + "target": "aws.protocoltests.restjson#StreamingTextPlainBlob", + "traits": { + "smithy.api#default": "", + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#StringEnum": { + "type": "enum", + "members": { + "V": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "enumvalue" + } + } + } + }, + "aws.protocoltests.restjson#StringPayloadEvent": { + "type": "structure", + "members": { + "payload": { + "target": "smithy.api#String", + "traits": { + "smithy.api#eventPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#StringPayloadInput": { + "type": "structure", + "members": { + "payload": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#StructureList": { + "type": "list", + "member": { + "target": "aws.protocoltests.restjson#StructureListMember" + } + }, + "aws.protocoltests.restjson#StructureListMember": { + "type": "structure", + "members": { + "a": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "value" + } + }, + "b": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "other" + } + } + } + }, + "aws.protocoltests.restjson#StructurePayloadEvent": { + "type": "structure", + "members": { + "payload": { + "target": "aws.protocoltests.restjson#PayloadStructure", + "traits": { + "smithy.api#eventPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#TestBodyStructure": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#TestBodyStructureInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#TestBodyStructureInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example operation serializes a structure in the HTTP body.\n\nIt should ensure Content-Type: application/json is\nused in all requests and that an \"empty\" body is\nan empty JSON document ({}).\n", + "smithy.api#http": { + "uri": "/body", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#TestBodyStructureInputOutput": { + "type": "structure", + "members": { + "testId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "x-amz-test-id" + } + }, + "testConfig": { + "target": "aws.protocoltests.restjson#TestConfig" + } + } + }, + "aws.protocoltests.restjson#TestConfig": { + "type": "structure", + "members": { + "timeout": { + "target": "smithy.api#Integer" + } + } + }, + "aws.protocoltests.restjson#TestEnum": { + "type": "enum", + "members": { + "FOO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FOO" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BAR" + } + }, + "BAZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BAZ" + } + } + } + }, + "aws.protocoltests.restjson#TestGetNoInputNoPayload": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restjson#TestNoPayloadInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example GET operation has no input and serializes a request without a HTTP body.\n\nThese tests are to ensure we do not attach a body or related headers\n(Content-Length, Content-Type) to operations that semantically\ncannot produce an HTTP body.\n", + "smithy.api#http": { + "uri": "/no_input_no_payload", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#TestGetNoPayload": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#TestNoPayloadInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#TestNoPayloadInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example GET operation serializes a request without a modeled HTTP body.\n\nThese tests are to ensure we do not attach a body or related headers\n(Content-Length, Content-Type) to operations that semantically\ncannot produce an HTTP body.\n", + "smithy.api#http": { + "uri": "/no_payload", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restjson#TestIntEnum": { + "type": "intEnum", + "members": { + "ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 1 + } + }, + "TWO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 2 + } + } + } + }, + "aws.protocoltests.restjson#TestNoPayloadInputOutput": { + "type": "structure", + "members": { + "testId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Amz-Test-Id" + } + } + } + }, + "aws.protocoltests.restjson#TestPayloadBlob": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#TestPayloadBlobInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#TestPayloadBlobInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example operation serializes a payload targeting a blob.\n\nThe Blob shape is not structured content and we cannot\nmake assumptions about what data will be sent. This test ensures\nonly a generic \"Content-Type: application/octet-stream\" header\nis used, and that we are not treating an empty body as an\nempty JSON document.\n", + "smithy.api#http": { + "uri": "/blob_payload", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#TestPayloadBlobInputOutput": { + "type": "structure", + "members": { + "contentType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "Content-Type" + } + }, + "data": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#TestPayloadStructure": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#TestPayloadStructureInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#TestPayloadStructureInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example operation serializes a payload targeting a structure.\n\nThis enforces the same requirements as TestBodyStructure\nbut with the body specified by the @httpPayload trait.\n", + "smithy.api#http": { + "uri": "/payload", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restjson#TestPayloadStructureInputOutput": { + "type": "structure", + "members": { + "testId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "x-amz-test-id" + } + }, + "payloadConfig": { + "target": "aws.protocoltests.restjson#PayloadConfig", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#TestPostNoInputNoPayload": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restjson#TestNoPayloadInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example POST operation has no input and serializes a request without a HTTP body.\n\nThese tests are to ensure we do not attach a body or related headers\n(Content-Type) to a POST operation with no modeled input.\n", + "smithy.api#http": { + "uri": "/no_input_no_payload", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#TestPostNoPayload": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#TestNoPayloadInputOutput" + }, + "output": { + "target": "aws.protocoltests.restjson#TestNoPayloadInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example POST operation serializes a request without a modeled HTTP body.\n\nThese tests are to ensure we do not attach a body or related headers\n(Content-Type) to a POST operation with no modeled payload.\n", + "smithy.api#http": { + "uri": "/no_payload", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#TestStringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.restjson#TestStringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.restjson#TimestampFormatHeaders": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restjson#TimestampFormatHeadersIO" + }, + "output": { + "target": "aws.protocoltests.restjson#TimestampFormatHeadersIO" + }, + "traits": { + "smithy.api#documentation": "This example tests how timestamp request and response headers are serialized.", + "smithy.api#http": { + "uri": "/TimestampFormatHeaders", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson#TimestampFormatHeadersIO": { + "type": "structure", + "members": { + "memberEpochSeconds": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpHeader": "X-memberEpochSeconds", + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "memberHttpDate": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpHeader": "X-memberHttpDate", + "smithy.api#timestampFormat": "http-date" + } + }, + "memberDateTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpHeader": "X-memberDateTime", + "smithy.api#timestampFormat": "date-time" + } + }, + "defaultFormat": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpHeader": "X-defaultFormat" + } + }, + "targetEpochSeconds": { + "target": "aws.protocoltests.shared#EpochSeconds", + "traits": { + "smithy.api#httpHeader": "X-targetEpochSeconds" + } + }, + "targetHttpDate": { + "target": "aws.protocoltests.shared#HttpDate", + "traits": { + "smithy.api#httpHeader": "X-targetHttpDate" + } + }, + "targetDateTime": { + "target": "aws.protocoltests.shared#DateTime", + "traits": { + "smithy.api#httpHeader": "X-targetDateTime" + } + } + } + }, + "aws.protocoltests.restjson#TopLevel": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restjson#NestedDefaultsMixin" + } + ], + "members": {} + }, + "aws.protocoltests.restjson#UnionInputOutput": { + "type": "structure", + "members": { + "contents": { + "target": "aws.protocoltests.restjson#MyUnion" + } + }, + "traits": { + "smithy.api#documentation": "A shared structure that contains a single union member." + } + }, + "aws.protocoltests.restjson#UnionPayload": { + "type": "union", + "members": { + "greeting": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.restjson#UnionPayloadEvent": { + "type": "structure", + "members": { + "payload": { + "target": "aws.protocoltests.restjson#PayloadUnion", + "traits": { + "smithy.api#eventPayload": {} + } + } + } + }, + "aws.protocoltests.restjson#UnionWithJsonName": { + "type": "union", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "FOO" + } + }, + "bar": { + "target": "smithy.api#String" + }, + "baz": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "_baz" + } + } + } + }, + "aws.protocoltests.restjson#UnitInputAndOutput": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This test is similar to NoInputAndNoOutput, but uses explicit Unit types.", + "smithy.api#http": { + "uri": "/UnitInputAndOutput", + "method": "POST" + } + } + }, + "aws.protocoltests.restjson.nested#GreetingStruct": { + "type": "structure", + "members": { + "salutation": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.shared#BooleanList": { + "type": "list", + "member": { + "target": "smithy.api#Boolean" + } + }, + "aws.protocoltests.shared#DateTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "aws.protocoltests.shared#DoubleList": { + "type": "list", + "member": { + "target": "smithy.api#Double" + } + }, + "aws.protocoltests.shared#EpochSeconds": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "aws.protocoltests.shared#FooEnum": { + "type": "enum", + "members": { + "FOO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Foo" + } + }, + "BAZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Baz" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Bar" + } + }, + "ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "1" + } + }, + "ZERO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "0" + } + } + } + }, + "aws.protocoltests.shared#FooEnumList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#FooEnum" + } + }, + "aws.protocoltests.shared#FooEnumMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#FooEnum" + } + }, + "aws.protocoltests.shared#FooEnumSet": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.shared#HttpDate": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "aws.protocoltests.shared#IntegerEnum": { + "type": "intEnum", + "members": { + "A": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 1 + } + }, + "B": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 2 + } + }, + "C": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 3 + } + } + } + }, + "aws.protocoltests.shared#IntegerEnumList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#IntegerEnum" + } + }, + "aws.protocoltests.shared#IntegerEnumMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#IntegerEnum" + } + }, + "aws.protocoltests.shared#IntegerEnumSet": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#IntegerList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + } + }, + "aws.protocoltests.shared#IntegerSet": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#JpegBlob": { + "type": "blob", + "traits": { + "smithy.api#mediaType": "image/jpeg" + } + }, + "aws.protocoltests.shared#NestedStringList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#StringList" + }, + "traits": { + "smithy.api#documentation": "A list of lists of strings." + } + }, + "aws.protocoltests.shared#SparseShortList": { + "type": "list", + "member": { + "target": "smithy.api#Short" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "aws.protocoltests.shared#SparseStringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "aws.protocoltests.shared#SparseStringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "aws.protocoltests.shared#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.shared#StringListMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#StringList" + } + }, + "aws.protocoltests.shared#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.shared#StringSet": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#TextPlainBlob": { + "type": "blob", + "traits": { + "smithy.api#mediaType": "text/plain" + } + }, + "aws.protocoltests.shared#TimestampList": { + "type": "list", + "member": { + "target": "smithy.api#Timestamp" + } + }, + "smithy.test#AppliesTo": { + "type": "enum", + "members": { + "CLIENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to client implementations.", + "smithy.api#enumValue": "client" + } + }, + "SERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to server implementations.", + "smithy.api#enumValue": "server" + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#Event": { + "type": "structure", + "members": { + "type": { + "target": "smithy.test#EventType", + "traits": { + "smithy.api#documentation": "The type of event - request or response.", + "smithy.api#required": {} + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The parameters used to generate the event.\n\nIf set, these parameters MUST be compatible with a modeled event.\n\nIf not set, this event represents an unmodeled event." + } + }, + "headers": { + "target": "smithy.test#EventHeaders", + "traits": { + "smithy.api#documentation": "A map of expected headers.\n\nHeaders that are not listed in this map are ignored unless they are\nexplicitly forbidden through `forbidHeaders`." + } + }, + "forbidHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must not appear in the serialized\nevent." + } + }, + "requireHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must appear in the serialized\nevent, but no assertion is made on the value.\n\nHeaders listed in `headers` do not need to appear in this list." + } + }, + "body": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "The expected event body.\n\nIf no request body is defined, then no assertions are made about\nthe body of the event." + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + }, + "bytes": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "An optional binary representation of the entire event.\n\nThis is used to test deserialization. If set, implementations SHOULD\nuse this value to represent the binary value of received events rather\nthan constructing that binary value from the other properties of the\nevent.\n\nThis value SHOULD NOT be used to make assertions about serialized\nevents as such assertions likely would not be reliable. They would\nsuffer from the same problems of making body assertions without a\nbodyMediaType where nonspecified ordering and optional whitespace\ncan cause semantically equivalent values to have different bytes. This\nis made worse by headers having no defined order, and is likely made\neven worse by common event framing features such as checksums." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#default": {}, + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "selector": "structure", + "failWhenMissing": true + } + } + } + }, + "traits": { + "smithy.api#documentation": "An event sent over the event stream.", + "smithy.api#private": {} + } + }, + "smithy.test#EventHeaderValue": { + "type": "union", + "members": { + "boolean": { + "target": "smithy.api#Boolean" + }, + "byte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#documentation": "Byte headers MUST be written in the model as base64-encoded\nstrings, e.g. `Zm9v` represents utf8 `foo`." + } + }, + "short": { + "target": "smithy.api#Short" + }, + "integer": { + "target": "smithy.api#Integer" + }, + "long": { + "target": "smithy.api#Long" + }, + "blob": { + "target": "smithy.api#Blob" + }, + "string": { + "target": "smithy.api#String" + }, + "timestamp": { + "target": "smithy.api#Timestamp" + } + }, + "traits": { + "smithy.api#documentation": "A typed event header value. This is needed to disambiguate\ntypes that the Smithy Node would otherwise not be able to.", + "smithy.api#private": {} + } + }, + "smithy.test#EventHeaders": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.test#EventHeaderValue" + }, + "traits": { + "smithy.api#documentation": "A map of event headers. The value is a union to indicate type,\nbut it MUST be serialized / deserialized without any sort of\nwrapping from the union.\n\nThe union value type is needed to disambiguate types that the\nSmithy Node would otherwise not be able to. This can't be a\nsimple map like for HTTP headers because HTTP headers only have\none value type, and the Smithy IDL isn't able to distinguish\nbetween types like byte/short without some additional layer.", + "smithy.api#private": {} + } + }, + "smithy.test#EventStreamTestCase": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two test cases can share\nthe same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "initialRequestParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The input parameters used to generate the initial request.\n\nThese parameters MUST be compatible with the input shape of the operation." + } + }, + "initialRequest": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The protocol-specific initial request.\n\nIf an `initialRequestShape` is set, this value MUST be compatible with that\nshape's definition." + } + }, + "initialRequestShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `initialRequest` member's contents.\n\nIf set, the value in `initialRequest` MUST be compatible with this shape's\ndefinition.\n\nFor HTTP protocols, use `smithy.test#InitialHttpRequest`", + "smithy.api#idRef": { + "selector": "structure", + "failWhenMissing": true + } + } + }, + "initialResponseParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The output parameters used to generate the initial response.\n\nThese parameters MUST be compatible with the output shape of the operation." + } + }, + "initialResponse": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The protocol-specific initial response.\n\nIf an `initialResponseShape` is set, this value MUST be compatible with that\nshape's definition." + } + }, + "initialResponseShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `initialResponse` member's contents.\n\nIf set, the value in `initialResponse` MUST be compatible with this shape's\ndefinition.\n\nFor HTTP protocols, use `smithy.test#InitialHttpResponse`", + "smithy.api#idRef": { + "selector": "structure", + "failWhenMissing": true + } + } + }, + "events": { + "target": "smithy.test#Events", + "traits": { + "smithy.api#documentation": "A list of events to be sent over the event stream. This includes input message,\noutput message, and error events." + } + }, + "expectation": { + "target": "smithy.test#TestExpectation", + "traits": { + "smithy.api#documentation": "The kind of result that is expected from the event stream.\n\nIf not set, the result is expected to be success." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "selector": "structure", + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + } + }, + "traits": { + "smithy.api#documentation": "A single event stream test case.", + "smithy.api#private": {} + } + }, + "smithy.test#EventType": { + "type": "enum", + "members": { + "REQUEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "Indicates the event is a request message.", + "smithy.api#enumValue": "request" + } + }, + "RESPONSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "Indicates the event is a response message.", + "smithy.api#enumValue": "response" + } + } + }, + "traits": { + "smithy.api#documentation": "The different types of event that are able to be sent over event streams.", + "smithy.api#private": {} + } + }, + "smithy.test#Events": { + "type": "list", + "member": { + "target": "smithy.test#Event" + }, + "traits": { + "smithy.api#documentation": "A list of events sent over the event stream.", + "smithy.api#private": {} + } + }, + "smithy.test#HttpMalformedRequestDefinition": { + "type": "structure", + "members": { + "method": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The HTTP request method.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request-target of the HTTP request, not including\nthe query string (for example, \"/foo/bar\").", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint provided to the client, not including the path\nor scheme (for example, \"example.com\")." + } + }, + "queryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of the serialized query string parameters to include in the request.\n\nEach element in the list is a query string key value pair\nthat starts with the query string parameter name optionally\nfollowed by \"=\", optionally followed by the query string\nparameter value. For example, \"foo=bar\", \"foo=\", and \"foo\"\nare all valid values. The query string parameter name and\nthe value MUST appear in the format in which it is expected\nto be sent over the wire; if a key or value needs to be\npercent-encoded, then it MUST appear percent-encoded in this list." + } + }, + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of HTTP headers to include in the request" + } + }, + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The HTTP message body to include in the request" + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMalformedRequestTestCase": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpMalformedRequestTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "request": { + "target": "smithy.test#HttpMalformedRequestDefinition", + "traits": { + "smithy.api#documentation": "The malformed request to send.", + "smithy.api#required": {} + } + }, + "response": { + "target": "smithy.test#HttpMalformedResponseDefinition", + "traits": { + "smithy.api#documentation": "The expected response.", + "smithy.api#required": {} + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "testParameters": { + "target": "smithy.test#HttpMalformedRequestTestParametersDefinition", + "traits": { + "smithy.api#documentation": "An optional set of test parameters for parameterized testing." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMalformedRequestTestParametersDefinition": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.test#StringList" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMalformedResponseBodyAssertion": { + "type": "union", + "members": { + "contents": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Defines the expected serialized response body, which will be matched\nexactly." + } + }, + "messageRegex": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A regex to evaluate against the `message` field in the body. For\nresponses that may have some variance from platform to platform,\nsuch as those that include messages from a parser." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMalformedResponseBodyDefinition": { + "type": "structure", + "members": { + "assertion": { + "target": "smithy.test#HttpMalformedResponseBodyAssertion", + "traits": { + "smithy.api#documentation": "The assertion to execute against the response body.", + "smithy.api#required": {} + } + }, + "mediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the response body.\n\nThis is used to help test runners to parse and evaluate\n`contents' and `messageRegex` in the assertion", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMalformedResponseDefinition": { + "type": "structure", + "members": { + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of expected HTTP headers.\n\nHeaders that are not listed in this map are ignored." + } + }, + "code": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Defines the HTTP response code.", + "smithy.api#range": { + "min": 100, + "max": 599 + }, + "smithy.api#required": {} + } + }, + "body": { + "target": "smithy.test#HttpMalformedResponseBodyDefinition", + "traits": { + "smithy.api#documentation": "The expected response body." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMessageMixin": { + "type": "structure", + "members": { + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of expected HTTP headers.\n\nHeaders that are not listed in this map are ignored unless they are\nexplicitly forbidden through `forbidHeaders`." + } + }, + "forbidHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must not appear in the serialized\nHTTP request." + } + }, + "requireHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must appear in the serialized\nHTTP message, but no assertion is made on the value.\n\nHeaders listed in `headers` do not need to appear in this list." + } + }, + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected HTTP message body.\n\nIf no request body is defined, then no assertions are made about\nthe body of the message." + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP message members and supporting protocol test members,\nsuitable for both requests and responses.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "method": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected serialized HTTP request method.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request-target of the HTTP request, not including\nthe query string (for example, \"/foo/bar\").", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint provided to the client, not including the path\nor scheme (for example, \"example.com\")." + } + }, + "resolvedHost": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint that the client should send to, not including\nthe path or scheme (for example, \"prefix.example.com\").\n\nThis can differ from the host provided to the client if the `hostPrefix`\nmember of the `endpoint` trait is set, for instance." + } + }, + "queryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of the expected serialized query string parameters.\n\nEach element in the list is a query string key value pair\nthat starts with the query string parameter name optionally\nfollowed by \"=\", optionally followed by the query string\nparameter value. For example, \"foo=bar\", \"foo=\", and \"foo\"\nare all valid values. The query string parameter name and\nthe value MUST appear in the format in which it is expected\nto be sent over the wire; if a key or value needs to be\npercent-encoded, then it MUST appear percent-encoded in this list.\n\nA serialized HTTP request is not in compliance with the protocol\nif any query string parameter defined in `queryParams` is not\ndefined in the request or if the value of a query string parameter\nin the request differs from the expected value.\n\n`queryParams` applies no constraints on additional query parameters." + } + }, + "forbidQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that must not appear in the\nserialized HTTP request.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + }, + "requireQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that MUST appear in the\nserialized request URI, but no assertion is made on the value.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP request members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpRequestMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpRequestTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's\npossible that specific authentication schemes might influence\nthe serialization logic of an HTTP request.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the input parameters used to generated the HTTP request.\n\nThese parameters MUST be compatible with the input of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "code": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Defines the HTTP response code.", + "smithy.api#range": { + "min": 100, + "max": 599 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP response members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpResponseMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpResponseTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The shape ID of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's possible\nthat specific authentication schemes might influence the serialization\nlogic of an HTTP response.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the output parameters deserialized from the HTTP response.\n\nThese parameters MUST be compatible with the output of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nresponse. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#InitialHttpRequest": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpRequestMixin" + } + ], + "members": {}, + "traits": { + "smithy.api#documentation": "A structure defining http request shapes for initial requests." + } + }, + "smithy.test#InitialHttpResponse": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpResponseMixin" + } + ], + "members": {}, + "traits": { + "smithy.api#documentation": "A structure defining http response shapes for initial responses." + } + }, + "smithy.test#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + }, + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyStringList": { + "type": "list", + "member": { + "target": "smithy.test#NonEmptyString" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#TestExpectation": { + "type": "union", + "members": { + "success": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "Indicates that the test should pass successfully." + } + }, + "failure": { + "target": "smithy.test#TestFailureExpectation", + "traits": { + "smithy.api#documentation": "Indicates that the test is expected to throw an exception." + } + } + }, + "traits": { + "smithy.api#documentation": "The different kinds of outcomes a test case may have.", + "smithy.api#private": {} + } + }, + "smithy.test#TestFailureExpectation": { + "type": "structure", + "members": { + "errorId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If specified, the error must be of the targeted type.", + "smithy.api#idRef": { + "failWhenMissing": true, + "selector": "[trait|error]" + } + } + } + }, + "traits": { + "smithy.api#documentation": "Indicates that the test is expected to throw an error.", + "smithy.api#private": {} + } + }, + "smithy.test#eventStreamTests": { + "type": "list", + "member": { + "target": "smithy.test#EventStreamTestCase" + }, + "traits": { + "smithy.api#documentation": "Defines a list of protocol tests that enforce how an event stream\nis serialized / deserialized for a specific protocol.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#trait": { + "selector": "operation :test(-[input, output]-> structure > member > union[trait|streaming])" + } + } + }, + "smithy.test#httpMalformedRequestTests": { + "type": "list", + "member": { + "target": "smithy.test#HttpMalformedRequestTestCase" + }, + "traits": { + "smithy.api#documentation": "Define how a malformed HTTP request is rejected by a server given a specific protocol", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#trait": { + "selector": "operation" + }, + "smithy.api#unstable": {} + } + } + } +} diff --git a/scripts/codegen-output-py/models/rest-xml-with-namespace.json b/scripts/codegen-output-py/models/rest-xml-with-namespace.json new file mode 100644 index 000000000..447fb488f --- /dev/null +++ b/scripts/codegen-output-py/models/rest-xml-with-namespace.json @@ -0,0 +1,753 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "aws.api#ArnNamespace": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a service's ARN namespace.", + "smithy.api#pattern": "^[a-z0-9.\\-]{1,63}$", + "smithy.api#private": {} + } + }, + "aws.api#CloudFormationName": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a CloudFormation service name.", + "smithy.api#pattern": "^[A-Z][A-Za-z0-9]+$", + "smithy.api#private": {} + } + }, + "aws.api#CloudWatchMetricNamespace": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[^:].*$", + "smithy.api#private": {} + } + }, + "aws.api#service": { + "type": "structure", + "members": { + "sdkId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `sdkId` property is a required string value that specifies the AWS\nSDK service ID (e.g., \"API Gateway\"). This value is used for generating\nclient names in SDKs and for linking between services.", + "smithy.api#required": {} + } + }, + "arnNamespace": { + "target": "aws.api#ArnNamespace", + "traits": { + "smithy.api#documentation": "The `arnNamespace` property is a string value that defines the ARN service\nnamespace of the service (e.g., \"apigateway\"). This value is used in\nARNs assigned to resources in the service. If not set, this value\ndefaults to the lowercase name of the service shape." + } + }, + "cloudFormationName": { + "target": "aws.api#CloudFormationName", + "traits": { + "smithy.api#documentation": "The `cloudFormationName` property is a string value that specifies the\nAWS CloudFormation service name (e.g., `ApiGateway`). When not set,\nthis value defaults to the name of the service shape. This value is\npart of the CloudFormation resource type name that is automatically\nassigned to resources in the service (e.g., `AWS::::resourceName`)." + } + }, + "cloudTrailEventSource": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `cloudTrailEventSource` property is a string value that defines the\nAWS customer-facing eventSource property contained in CloudTrail event\nrecords emitted by the service. If not specified, this value defaults\nto the `arnNamespace` plus `.amazonaws.com`." + } + }, + "docId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `docId` property is a string value that defines the identifier\nused to implement linking between service and SDK documentation for\nAWS services. If not specified, this value defaults to the `sdkId` in\nlower case plus the service `version` property, separated by dashes." + } + }, + "endpointPrefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `endpointPrefix` property is a string value that identifies which\nendpoint in a given region should be used to connect to the service.\nFor example, most services in the AWS standard partition have endpoints\nwhich follow the format: `{endpointPrefix}.{region}.amazonaws.com`. A\nservice with the endpoint prefix example in the region us-west-2 might\nhave the endpoint example.us-west-2.amazonaws.com.\n\nThis value is not unique across services and is subject to change.\nTherefore, it MUST NOT be used for client naming or for any other\npurpose that requires a static, unique identifier. sdkId should be used\nfor those purposes. Additionally, this value can be used to attempt to\nresolve endpoints." + } + }, + "cloudWatchNamespace": { + "target": "aws.api#CloudWatchMetricNamespace", + "traits": { + "smithy.api#documentation": "The `cloudWatchNamespace` property is a string value that defines the\nAWS customer-facing namespace of most metrics emitted by the service." + } + } + }, + "traits": { + "smithy.api#documentation": "An AWS service is defined using the `aws.api#service` trait. This trait\nprovides information about the service like the name used to generate AWS\nSDK client classes and the namespace used in ARNs.", + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.auth#sigv4": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The signature version 4 service signing name to use in the credential\nscope when signing requests. This value SHOULD match the `arnNamespace`\nproperty of the `aws.api#service` trait if present and the `name`\nproperty of the `aws.api#sigv4a` trait if present.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html" + }, + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#authDefinition": {}, + "smithy.api#documentation": "[Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)\nis the process to add authentication information to AWS requests sent by HTTP. For\nsecurity, most requests to AWS must be signed with an access key, which consists\nof an access key ID and secret access key. These two keys are commonly referred to\nas your security credentials.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html" + }, + "smithy.api#trait": { + "selector": "service", + "breakingChanges": [ + { + "change": "remove", + "message": "Removing the existing authentication scheme is not backward compatible and can break existing clients' authentication." + } + ] + } + } + }, + "aws.protocols#HttpConfiguration": { + "type": "structure", + "members": { + "http": { + "target": "aws.protocols#StringList", + "traits": { + "smithy.api#documentation": "The priority ordered list of supported HTTP protocol versions." + } + }, + "eventStreamHttp": { + "target": "aws.protocols#StringList", + "traits": { + "smithy.api#documentation": "The priority ordered list of supported HTTP protocol versions that\nare required when using event streams with the service. If not set,\nthis value defaults to the value of the `http` member. Any entry in\n`eventStreamHttp` MUST also appear in `http`." + } + } + }, + "traits": { + "smithy.api#documentation": "Contains HTTP protocol configuration for HTTP-based protocols.", + "smithy.api#mixin": { + "localTraits": [ + "smithy.api#private" + ] + }, + "smithy.api#private": {} + } + }, + "aws.protocols#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "aws.protocols#restXml": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocols#HttpConfiguration" + } + ], + "members": { + "noErrorWrapping": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#deprecated": {}, + "smithy.api#documentation": "Disables the serialization wrapping of error properties in an 'Error'\nXML element." + } + } + }, + "traits": { + "smithy.api#deprecated": {}, + "smithy.api#documentation": "A RESTful protocol that sends XML in structured payloads.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#timestampFormat", + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel", + "smithy.api#http", + "smithy.api#httpError", + "smithy.api#httpHeader", + "smithy.api#httpLabel", + "smithy.api#httpPayload", + "smithy.api#httpPrefixHeaders", + "smithy.api#httpQuery", + "smithy.api#httpQueryParams", + "smithy.api#httpResponseCode", + "smithy.api#httpChecksumRequired", + "smithy.api#xmlAttribute", + "smithy.api#xmlFlattened", + "smithy.api#xmlName", + "smithy.api#xmlNamespace" + ] + }, + "smithy.api#trait": { + "selector": "service" + }, + "smithy.api#traitValidators": { + "UnsupportedProtocolDocument": { + "selector": "~> member :test(> document)", + "message": "Document types are not supported with restXml" + } + } + } + }, + "aws.protocoltests.restxml.xmlns#NestedWithNamespace": { + "type": "structure", + "members": { + "attrField": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlAttribute": {}, + "smithy.api#xmlName": "xsi:someName" + } + } + } + }, + "aws.protocoltests.restxml.xmlns#RestXmlWithNamespace": { + "type": "service", + "version": "2019-12-16", + "operations": [ + { + "target": "aws.protocoltests.restxml.xmlns#SimpleScalarProperties" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Rest Xml Protocol Namespace" + }, + "aws.auth#sigv4": { + "name": "restxmlwithnamespace" + }, + "aws.protocols#restXml": {}, + "smithy.api#documentation": "A REST XML service that sends XML requests and responses.\n\nThis service and test case is complementary to the test cases\nin the `restXml` directory, but the service under test here has\nthe `xmlNamespace` trait applied to it.\n\nSee https://github.com/smithy-lang/smithy/issues/616", + "smithy.api#title": "Sample Rest Xml Protocol Service With Namespace", + "smithy.api#xmlNamespace": { + "uri": "https://example.com" + } + } + }, + "aws.protocoltests.restxml.xmlns#SimpleScalarProperties": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml.xmlns#SimpleScalarPropertiesRequest" + }, + "output": { + "target": "aws.protocoltests.restxml.xmlns#SimpleScalarPropertiesResponse" + }, + "traits": { + "smithy.api#http": { + "uri": "/SimpleScalarProperties", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml.xmlns#SimpleScalarPropertiesInputOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Foo" + } + }, + "stringValue": { + "target": "smithy.api#String" + }, + "trueBooleanValue": { + "target": "smithy.api#Boolean" + }, + "falseBooleanValue": { + "target": "smithy.api#Boolean" + }, + "byteValue": { + "target": "smithy.api#Byte" + }, + "shortValue": { + "target": "smithy.api#Short" + }, + "integerValue": { + "target": "smithy.api#Integer" + }, + "longValue": { + "target": "smithy.api#Long" + }, + "floatValue": { + "target": "smithy.api#Float" + }, + "Nested": { + "target": "aws.protocoltests.restxml.xmlns#NestedWithNamespace", + "traits": { + "smithy.api#xmlNamespace": { + "prefix": "xsi", + "uri": "https://example.com" + } + } + }, + "doubleValue": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#xmlName": "DoubleDribble" + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.restxml.xmlns#SimpleScalarPropertiesRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml.xmlns#SimpleScalarPropertiesInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml.xmlns#SimpleScalarPropertiesResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml.xmlns#SimpleScalarPropertiesInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "smithy.test#AppliesTo": { + "type": "enum", + "members": { + "CLIENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to client implementations.", + "smithy.api#enumValue": "client" + } + }, + "SERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to server implementations.", + "smithy.api#enumValue": "server" + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMessageMixin": { + "type": "structure", + "members": { + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of expected HTTP headers.\n\nHeaders that are not listed in this map are ignored unless they are\nexplicitly forbidden through `forbidHeaders`." + } + }, + "forbidHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must not appear in the serialized\nHTTP request." + } + }, + "requireHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must appear in the serialized\nHTTP message, but no assertion is made on the value.\n\nHeaders listed in `headers` do not need to appear in this list." + } + }, + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected HTTP message body.\n\nIf no request body is defined, then no assertions are made about\nthe body of the message." + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP message members and supporting protocol test members,\nsuitable for both requests and responses.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "method": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected serialized HTTP request method.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request-target of the HTTP request, not including\nthe query string (for example, \"/foo/bar\").", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint provided to the client, not including the path\nor scheme (for example, \"example.com\")." + } + }, + "resolvedHost": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint that the client should send to, not including\nthe path or scheme (for example, \"prefix.example.com\").\n\nThis can differ from the host provided to the client if the `hostPrefix`\nmember of the `endpoint` trait is set, for instance." + } + }, + "queryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of the expected serialized query string parameters.\n\nEach element in the list is a query string key value pair\nthat starts with the query string parameter name optionally\nfollowed by \"=\", optionally followed by the query string\nparameter value. For example, \"foo=bar\", \"foo=\", and \"foo\"\nare all valid values. The query string parameter name and\nthe value MUST appear in the format in which it is expected\nto be sent over the wire; if a key or value needs to be\npercent-encoded, then it MUST appear percent-encoded in this list.\n\nA serialized HTTP request is not in compliance with the protocol\nif any query string parameter defined in `queryParams` is not\ndefined in the request or if the value of a query string parameter\nin the request differs from the expected value.\n\n`queryParams` applies no constraints on additional query parameters." + } + }, + "forbidQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that must not appear in the\nserialized HTTP request.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + }, + "requireQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that MUST appear in the\nserialized request URI, but no assertion is made on the value.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP request members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpRequestMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpRequestTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's\npossible that specific authentication schemes might influence\nthe serialization logic of an HTTP request.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the input parameters used to generated the HTTP request.\n\nThese parameters MUST be compatible with the input of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "code": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Defines the HTTP response code.", + "smithy.api#range": { + "min": 100, + "max": 599 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP response members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpResponseMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpResponseTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The shape ID of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's possible\nthat specific authentication schemes might influence the serialization\nlogic of an HTTP response.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the output parameters deserialized from the HTTP response.\n\nThese parameters MUST be compatible with the output of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nresponse. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + }, + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyStringList": { + "type": "list", + "member": { + "target": "smithy.test#NonEmptyString" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + } + } +} diff --git a/scripts/codegen-output-py/models/rest-xml.json b/scripts/codegen-output-py/models/rest-xml.json new file mode 100644 index 000000000..d8048a09a --- /dev/null +++ b/scripts/codegen-output-py/models/rest-xml.json @@ -0,0 +1,4384 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "aws.api#ArnNamespace": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a service's ARN namespace.", + "smithy.api#pattern": "^[a-z0-9.\\-]{1,63}$", + "smithy.api#private": {} + } + }, + "aws.api#CloudFormationName": { + "type": "string", + "traits": { + "smithy.api#documentation": "A string representing a CloudFormation service name.", + "smithy.api#pattern": "^[A-Z][A-Za-z0-9]+$", + "smithy.api#private": {} + } + }, + "aws.api#CloudWatchMetricNamespace": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[^:].*$", + "smithy.api#private": {} + } + }, + "aws.api#service": { + "type": "structure", + "members": { + "sdkId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `sdkId` property is a required string value that specifies the AWS\nSDK service ID (e.g., \"API Gateway\"). This value is used for generating\nclient names in SDKs and for linking between services.", + "smithy.api#required": {} + } + }, + "arnNamespace": { + "target": "aws.api#ArnNamespace", + "traits": { + "smithy.api#documentation": "The `arnNamespace` property is a string value that defines the ARN service\nnamespace of the service (e.g., \"apigateway\"). This value is used in\nARNs assigned to resources in the service. If not set, this value\ndefaults to the lowercase name of the service shape." + } + }, + "cloudFormationName": { + "target": "aws.api#CloudFormationName", + "traits": { + "smithy.api#documentation": "The `cloudFormationName` property is a string value that specifies the\nAWS CloudFormation service name (e.g., `ApiGateway`). When not set,\nthis value defaults to the name of the service shape. This value is\npart of the CloudFormation resource type name that is automatically\nassigned to resources in the service (e.g., `AWS::::resourceName`)." + } + }, + "cloudTrailEventSource": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `cloudTrailEventSource` property is a string value that defines the\nAWS customer-facing eventSource property contained in CloudTrail event\nrecords emitted by the service. If not specified, this value defaults\nto the `arnNamespace` plus `.amazonaws.com`." + } + }, + "docId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `docId` property is a string value that defines the identifier\nused to implement linking between service and SDK documentation for\nAWS services. If not specified, this value defaults to the `sdkId` in\nlower case plus the service `version` property, separated by dashes." + } + }, + "endpointPrefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `endpointPrefix` property is a string value that identifies which\nendpoint in a given region should be used to connect to the service.\nFor example, most services in the AWS standard partition have endpoints\nwhich follow the format: `{endpointPrefix}.{region}.amazonaws.com`. A\nservice with the endpoint prefix example in the region us-west-2 might\nhave the endpoint example.us-west-2.amazonaws.com.\n\nThis value is not unique across services and is subject to change.\nTherefore, it MUST NOT be used for client naming or for any other\npurpose that requires a static, unique identifier. sdkId should be used\nfor those purposes. Additionally, this value can be used to attempt to\nresolve endpoints." + } + }, + "cloudWatchNamespace": { + "target": "aws.api#CloudWatchMetricNamespace", + "traits": { + "smithy.api#documentation": "The `cloudWatchNamespace` property is a string value that defines the\nAWS customer-facing namespace of most metrics emitted by the service." + } + } + }, + "traits": { + "smithy.api#documentation": "An AWS service is defined using the `aws.api#service` trait. This trait\nprovides information about the service like the name used to generate AWS\nSDK client classes and the namespace used in ARNs.", + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.auth#sigv4": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The signature version 4 service signing name to use in the credential\nscope when signing requests. This value SHOULD match the `arnNamespace`\nproperty of the `aws.api#service` trait if present and the `name`\nproperty of the `aws.api#sigv4a` trait if present.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html" + }, + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#authDefinition": {}, + "smithy.api#documentation": "[Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)\nis the process to add authentication information to AWS requests sent by HTTP. For\nsecurity, most requests to AWS must be signed with an access key, which consists\nof an access key ID and secret access key. These two keys are commonly referred to\nas your security credentials.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html" + }, + "smithy.api#trait": { + "selector": "service", + "breakingChanges": [ + { + "change": "remove", + "message": "Removing the existing authentication scheme is not backward compatible and can break existing clients' authentication." + } + ] + } + } + }, + "aws.protocols#HttpConfiguration": { + "type": "structure", + "members": { + "http": { + "target": "aws.protocols#StringList", + "traits": { + "smithy.api#documentation": "The priority ordered list of supported HTTP protocol versions." + } + }, + "eventStreamHttp": { + "target": "aws.protocols#StringList", + "traits": { + "smithy.api#documentation": "The priority ordered list of supported HTTP protocol versions that\nare required when using event streams with the service. If not set,\nthis value defaults to the value of the `http` member. Any entry in\n`eventStreamHttp` MUST also appear in `http`." + } + } + }, + "traits": { + "smithy.api#documentation": "Contains HTTP protocol configuration for HTTP-based protocols.", + "smithy.api#mixin": { + "localTraits": [ + "smithy.api#private" + ] + }, + "smithy.api#private": {} + } + }, + "aws.protocols#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "aws.protocols#restXml": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocols#HttpConfiguration" + } + ], + "members": { + "noErrorWrapping": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#deprecated": {}, + "smithy.api#documentation": "Disables the serialization wrapping of error properties in an 'Error'\nXML element." + } + } + }, + "traits": { + "smithy.api#deprecated": {}, + "smithy.api#documentation": "A RESTful protocol that sends XML in structured payloads.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#timestampFormat", + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel", + "smithy.api#http", + "smithy.api#httpError", + "smithy.api#httpHeader", + "smithy.api#httpLabel", + "smithy.api#httpPayload", + "smithy.api#httpPrefixHeaders", + "smithy.api#httpQuery", + "smithy.api#httpQueryParams", + "smithy.api#httpResponseCode", + "smithy.api#httpChecksumRequired", + "smithy.api#xmlAttribute", + "smithy.api#xmlFlattened", + "smithy.api#xmlName", + "smithy.api#xmlNamespace" + ] + }, + "smithy.api#trait": { + "selector": "service" + }, + "smithy.api#traitValidators": { + "UnsupportedProtocolDocument": { + "selector": "~> member :test(> document)", + "message": "Document types are not supported with restXml" + } + } + } + }, + "aws.protocoltests.restxml#AllQueryStringTypes": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#AllQueryStringTypesInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This example uses all query string types.", + "smithy.api#http": { + "uri": "/AllQueryStringTypesInput", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restxml#AllQueryStringTypesInput": { + "type": "structure", + "members": { + "queryString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "String" + } + }, + "queryStringList": { + "target": "aws.protocoltests.shared#StringList", + "traits": { + "smithy.api#httpQuery": "StringList" + } + }, + "queryStringSet": { + "target": "aws.protocoltests.shared#StringSet", + "traits": { + "smithy.api#httpQuery": "StringSet" + } + }, + "queryByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#httpQuery": "Byte" + } + }, + "queryShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#httpQuery": "Short" + } + }, + "queryInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "Integer" + } + }, + "queryIntegerList": { + "target": "aws.protocoltests.shared#IntegerList", + "traits": { + "smithy.api#httpQuery": "IntegerList" + } + }, + "queryIntegerSet": { + "target": "aws.protocoltests.shared#IntegerSet", + "traits": { + "smithy.api#httpQuery": "IntegerSet" + } + }, + "queryLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#httpQuery": "Long" + } + }, + "queryFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#httpQuery": "Float" + } + }, + "queryDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpQuery": "Double" + } + }, + "queryDoubleList": { + "target": "aws.protocoltests.shared#DoubleList", + "traits": { + "smithy.api#httpQuery": "DoubleList" + } + }, + "queryBoolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "Boolean" + } + }, + "queryBooleanList": { + "target": "aws.protocoltests.shared#BooleanList", + "traits": { + "smithy.api#httpQuery": "BooleanList" + } + }, + "queryTimestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpQuery": "Timestamp" + } + }, + "queryTimestampList": { + "target": "aws.protocoltests.shared#TimestampList", + "traits": { + "smithy.api#httpQuery": "TimestampList" + } + }, + "queryEnum": { + "target": "aws.protocoltests.shared#FooEnum", + "traits": { + "smithy.api#httpQuery": "Enum" + } + }, + "queryEnumList": { + "target": "aws.protocoltests.shared#FooEnumList", + "traits": { + "smithy.api#httpQuery": "EnumList" + } + }, + "queryIntegerEnum": { + "target": "aws.protocoltests.shared#IntegerEnum", + "traits": { + "smithy.api#httpQuery": "IntegerEnum" + } + }, + "queryIntegerEnumList": { + "target": "aws.protocoltests.shared#IntegerEnumList", + "traits": { + "smithy.api#httpQuery": "IntegerEnumList" + } + }, + "queryParamsMapOfStrings": { + "target": "aws.protocoltests.shared#StringMap", + "traits": { + "smithy.api#httpQueryParams": {} + } + } + }, + "traits": { + "smithy.api#suppress": [ + "HttpQueryParamsTrait" + ] + } + }, + "aws.protocoltests.restxml#BodyWithXmlName": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#BodyWithXmlNameInputOutput" + }, + "output": { + "target": "aws.protocoltests.restxml#BodyWithXmlNameInputOutput" + }, + "traits": { + "smithy.api#documentation": "The following example serializes a body that uses an XML name,\nchanging the wrapper name.", + "smithy.api#http": { + "uri": "/BodyWithXmlName", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#BodyWithXmlNameInputOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.restxml#PayloadWithXmlName" + } + }, + "traits": { + "smithy.api#xmlName": "Ahoy" + } + }, + "aws.protocoltests.restxml#ComplexError": { + "type": "structure", + "members": { + "Header": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Header" + } + }, + "TopLevel": { + "target": "smithy.api#String" + }, + "Nested": { + "target": "aws.protocoltests.restxml#ComplexNestedErrorData" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when a request is invalid.", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "aws.protocoltests.restxml#ComplexNestedErrorData": { + "type": "structure", + "members": { + "Foo": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.restxml#ConstantAndVariableQueryString": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#ConstantAndVariableQueryStringInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This example uses fixed query string params and variable query string params.\nThe fixed query string parameters and variable parameters must both be\nserialized (implementations may need to merge them together).", + "smithy.api#http": { + "uri": "/ConstantAndVariableQueryString?foo=bar", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restxml#ConstantAndVariableQueryStringInput": { + "type": "structure", + "members": { + "baz": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "baz" + } + }, + "maybeSet": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "maybeSet" + } + } + } + }, + "aws.protocoltests.restxml#ConstantQueryString": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#ConstantQueryStringInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "This example uses a constant query string parameters and a label.\nThis simply tests that labels and query string parameters are\ncompatible. The fixed query string parameter named \"hello\" should\nin no way conflict with the label, `{hello}`.", + "smithy.api#http": { + "uri": "/ConstantQueryString/{hello}?foo=bar&hello", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restxml#ConstantQueryStringInput": { + "type": "structure", + "members": { + "hello": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restxml#ContentTypeParameters": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#ContentTypeParametersInput" + }, + "output": { + "target": "aws.protocoltests.restxml#ContentTypeParametersOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how servers must support requests\ncontaining a `Content-Type` header with parameters.", + "smithy.api#http": { + "uri": "/ContentTypeParameters", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#ContentTypeParametersInput": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#Integer" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#ContentTypeParametersOutput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#DatetimeOffsets": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restxml#DatetimeOffsetsOutput" + }, + "traits": { + "smithy.api#http": { + "uri": "/DatetimeOffsets", + "method": "POST" + }, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restxml#DatetimeOffsetsOutput": { + "type": "structure", + "members": { + "datetime": { + "target": "aws.protocoltests.shared#DateTime" + } + } + }, + "aws.protocoltests.restxml#EmptyInputAndEmptyOutput": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#EmptyInputAndEmptyOutputInput" + }, + "output": { + "target": "aws.protocoltests.restxml#EmptyInputAndEmptyOutputOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request or response payload because the operation has an empty input\nand empty output structure that reuses the same shape. While this should\nbe rare, code generators must support this.", + "smithy.api#http": { + "uri": "/EmptyInputAndEmptyOutput", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#EmptyInputAndEmptyOutputInput": { + "type": "structure", + "members": {} + }, + "aws.protocoltests.restxml#EmptyInputAndEmptyOutputOutput": { + "type": "structure", + "members": {} + }, + "aws.protocoltests.restxml#EndpointOperation": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#endpoint": { + "hostPrefix": "foo." + }, + "smithy.api#http": { + "uri": "/EndpointOperation", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#EndpointWithHostLabelHeaderOperation": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HostLabelHeaderInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#endpoint": { + "hostPrefix": "{accountId}." + }, + "smithy.api#http": { + "uri": "/EndpointWithHostLabelHeaderOperation", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#EndpointWithHostLabelOperation": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#EndpointWithHostLabelOperationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#endpoint": { + "hostPrefix": "foo.{label}." + }, + "smithy.api#http": { + "uri": "/EndpointWithHostLabelOperation", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#EndpointWithHostLabelOperationRequest": { + "type": "structure", + "members": { + "label": { + "target": "smithy.api#String", + "traits": { + "smithy.api#hostLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#EnumPayloadInput": { + "type": "structure", + "members": { + "payload": { + "target": "aws.protocoltests.restxml#StringEnum", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restxml#FlattenedXmlMap": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#FlattenedXmlMapRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#FlattenedXmlMapResponse" + }, + "traits": { + "smithy.api#documentation": "Flattened maps", + "smithy.api#http": { + "uri": "/FlattenedXmlMap", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#FlattenedXmlMapRequest": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.shared#FooEnumMap", + "traits": { + "smithy.api#xmlFlattened": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#FlattenedXmlMapResponse": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.shared#FooEnumMap", + "traits": { + "smithy.api#xmlFlattened": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#FlattenedXmlMapWithXmlName": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#FlattenedXmlMapWithXmlNameRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#FlattenedXmlMapWithXmlNameResponse" + }, + "traits": { + "smithy.api#documentation": "Flattened maps with @xmlName", + "smithy.api#http": { + "uri": "/FlattenedXmlMapWithXmlName", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#FlattenedXmlMapWithXmlNameInputOutputMap": { + "type": "map", + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "K" + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "V" + } + } + }, + "aws.protocoltests.restxml#FlattenedXmlMapWithXmlNameRequest": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.restxml#FlattenedXmlMapWithXmlNameInputOutputMap", + "traits": { + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "KVP" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#FlattenedXmlMapWithXmlNameResponse": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.restxml#FlattenedXmlMapWithXmlNameInputOutputMap", + "traits": { + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "KVP" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#FlattenedXmlMapWithXmlNamespace": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restxml#FlattenedXmlMapWithXmlNamespaceOutput" + }, + "traits": { + "smithy.api#documentation": "Flattened maps with @xmlNamespace and @xmlName", + "smithy.api#http": { + "uri": "/FlattenedXmlMapWithXmlNamespace", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#FlattenedXmlMapWithXmlNamespaceOutput": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.restxml#FlattenedXmlMapWithXmlNamespaceOutputMap", + "traits": { + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "KVP", + "smithy.api#xmlNamespace": { + "uri": "https://the-member.example.com" + } + } + } + } + }, + "aws.protocoltests.restxml#FlattenedXmlMapWithXmlNamespaceOutputMap": { + "type": "map", + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "K", + "smithy.api#xmlNamespace": { + "uri": "https://the-key.example.com" + } + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "V", + "smithy.api#xmlNamespace": { + "uri": "https://the-value.example.com" + } + } + } + }, + "aws.protocoltests.restxml#FooPrefixHeaders": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.restxml#FractionalSeconds": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restxml#FractionalSecondsOutput" + }, + "traits": { + "smithy.api#http": { + "uri": "/FractionalSeconds", + "method": "POST" + }, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restxml#FractionalSecondsOutput": { + "type": "structure", + "members": { + "datetime": { + "target": "aws.protocoltests.shared#DateTime" + } + } + }, + "aws.protocoltests.restxml#GreetingWithErrors": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restxml#GreetingWithErrorsOutput" + }, + "errors": [ + { + "target": "aws.protocoltests.restxml#ComplexError" + }, + { + "target": "aws.protocoltests.restxml#InvalidGreeting" + } + ], + "traits": { + "smithy.api#documentation": "This operation has three possible return values:\n\n1. A successful response in the form of GreetingWithErrorsOutput\n2. An InvalidGreeting error.\n3. A BadRequest error.\n\nImplementations must be able to successfully take a response and\nproperly (de)serialize successful and error responses based on the\nthe presence of the", + "smithy.api#http": { + "uri": "/GreetingWithErrors", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#GreetingWithErrorsOutput": { + "type": "structure", + "members": { + "greeting": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Greeting" + } + } + } + }, + "aws.protocoltests.restxml#HostLabelHeaderInput": { + "type": "structure", + "members": { + "accountId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#hostLabel": {}, + "smithy.api#httpHeader": "X-Amz-Account-Id", + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restxml#HttpEmptyPrefixHeaders": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpEmptyPrefixHeadersInput" + }, + "output": { + "target": "aws.protocoltests.restxml#HttpEmptyPrefixHeadersOutput" + }, + "traits": { + "smithy.api#documentation": "Clients that perform this test extract all headers from the response.", + "smithy.api#http": { + "uri": "/HttpEmptyPrefixHeaders", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restxml#HttpEmptyPrefixHeadersInput": { + "type": "structure", + "members": { + "prefixHeaders": { + "target": "aws.protocoltests.shared#StringMap", + "traits": { + "smithy.api#httpPrefixHeaders": "" + } + }, + "specificHeader": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "hello" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#HttpEmptyPrefixHeadersOutput": { + "type": "structure", + "members": { + "prefixHeaders": { + "target": "aws.protocoltests.shared#StringMap", + "traits": { + "smithy.api#httpPrefixHeaders": "" + } + }, + "specificHeader": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "hello" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#HttpEnumPayload": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#EnumPayloadInput" + }, + "output": { + "target": "aws.protocoltests.restxml#EnumPayloadInput" + }, + "traits": { + "smithy.api#http": { + "uri": "/EnumPayload", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#HttpPayloadTraits": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpPayloadTraitsInputOutput" + }, + "output": { + "target": "aws.protocoltests.restxml#HttpPayloadTraitsInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes a blob shape in the payload.\n\nIn this example, no XML document is synthesized because the payload is\nnot a structure or a union type.", + "smithy.api#http": { + "uri": "/HttpPayloadTraits", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#HttpPayloadTraitsInputOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Foo" + } + }, + "blob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restxml#HttpPayloadTraitsWithMediaType": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpPayloadTraitsWithMediaTypeInputOutput" + }, + "output": { + "target": "aws.protocoltests.restxml#HttpPayloadTraitsWithMediaTypeInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example uses a `@mediaType` trait on the payload to force a custom\ncontent-type to be serialized.", + "smithy.api#http": { + "uri": "/HttpPayloadTraitsWithMediaType", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#HttpPayloadTraitsWithMediaTypeInputOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Foo" + } + }, + "blob": { + "target": "aws.protocoltests.shared#TextPlainBlob", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restxml#HttpPayloadWithMemberXmlName": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpPayloadWithMemberXmlNameInputOutput" + }, + "output": { + "target": "aws.protocoltests.restxml#HttpPayloadWithMemberXmlNameInputOutput" + }, + "traits": { + "smithy.api#documentation": "The following example serializes a payload that uses an XML name\non the member, changing the wrapper name.", + "smithy.api#http": { + "uri": "/HttpPayloadWithMemberXmlName", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#HttpPayloadWithMemberXmlNameInputOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.restxml#PayloadWithXmlName", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#xmlName": "Hola" + } + } + } + }, + "aws.protocoltests.restxml#HttpPayloadWithStructure": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpPayloadWithStructureInputOutput" + }, + "output": { + "target": "aws.protocoltests.restxml#HttpPayloadWithStructureInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes a structure in the payload.\n\nNote that serializing a structure changes the wrapper element name\nto match the targeted structure.", + "smithy.api#http": { + "uri": "/HttpPayloadWithStructure", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#HttpPayloadWithStructureInputOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.restxml#NestedPayload", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restxml#HttpPayloadWithUnion": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpPayloadWithUnionInputOutput" + }, + "output": { + "target": "aws.protocoltests.restxml#HttpPayloadWithUnionInputOutput" + }, + "traits": { + "smithy.api#documentation": "This example serializes a union in the payload.", + "smithy.api#http": { + "uri": "/HttpPayloadWithUnion", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#HttpPayloadWithUnionInputOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.restxml#UnionPayload", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restxml#HttpPayloadWithXmlName": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpPayloadWithXmlNameInputOutput" + }, + "output": { + "target": "aws.protocoltests.restxml#HttpPayloadWithXmlNameInputOutput" + }, + "traits": { + "smithy.api#documentation": "The following example serializes a payload that uses an XML name,\nchanging the wrapper name.", + "smithy.api#http": { + "uri": "/HttpPayloadWithXmlName", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#HttpPayloadWithXmlNameInputOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.restxml#PayloadWithXmlName", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restxml#HttpPayloadWithXmlNamespace": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpPayloadWithXmlNamespaceInputOutput" + }, + "output": { + "target": "aws.protocoltests.restxml#HttpPayloadWithXmlNamespaceInputOutput" + }, + "traits": { + "smithy.api#documentation": "The following example serializes a payload that uses an XML namespace.", + "smithy.api#http": { + "uri": "/HttpPayloadWithXmlNamespace", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#HttpPayloadWithXmlNamespaceAndPrefix": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpPayloadWithXmlNamespaceAndPrefixInputOutput" + }, + "output": { + "target": "aws.protocoltests.restxml#HttpPayloadWithXmlNamespaceAndPrefixInputOutput" + }, + "traits": { + "smithy.api#documentation": "The following example serializes a payload that uses an XML namespace.", + "smithy.api#http": { + "uri": "/HttpPayloadWithXmlNamespaceAndPrefix", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#HttpPayloadWithXmlNamespaceAndPrefixInputOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.restxml#PayloadWithXmlNamespaceAndPrefix", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restxml#HttpPayloadWithXmlNamespaceInputOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.restxml#PayloadWithXmlNamespace", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restxml#HttpPrefixHeaders": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpPrefixHeadersInputOutput" + }, + "output": { + "target": "aws.protocoltests.restxml#HttpPrefixHeadersInputOutput" + }, + "traits": { + "smithy.api#documentation": "This examples adds headers to the input of a request and response by prefix.", + "smithy.api#externalDocumentation": { + "httpPrefixHeaders Trait": "https://smithy.io/2.0/spec/http-bindings.html#httpprefixheaders-trait" + }, + "smithy.api#http": { + "uri": "/HttpPrefixHeaders", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restxml#HttpPrefixHeadersInputOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "x-foo" + } + }, + "fooMap": { + "target": "aws.protocoltests.restxml#FooPrefixHeaders", + "traits": { + "smithy.api#httpPrefixHeaders": "x-foo-" + } + } + } + }, + "aws.protocoltests.restxml#HttpRequestWithFloatLabels": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpRequestWithFloatLabelsInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/FloatHttpLabels/{float}/{double}" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restxml#HttpRequestWithFloatLabelsInput": { + "type": "structure", + "members": { + "float": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "double": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restxml#HttpRequestWithGreedyLabelInPath": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpRequestWithGreedyLabelInPathInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/HttpRequestWithGreedyLabelInPath/foo/{foo}/baz/{baz+}" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restxml#HttpRequestWithGreedyLabelInPathInput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "baz": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restxml#HttpRequestWithLabels": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpRequestWithLabelsInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests are serialized when there's no input\npayload but there are HTTP labels.", + "smithy.api#http": { + "method": "GET", + "uri": "/HttpRequestWithLabels/{string}/{short}/{integer}/{long}/{float}/{double}/{boolean}/{timestamp}" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restxml#HttpRequestWithLabelsAndTimestampFormat": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#HttpRequestWithLabelsAndTimestampFormatInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests serialize different timestamp formats in the\nURI path.", + "smithy.api#http": { + "method": "GET", + "uri": "/HttpRequestWithLabelsAndTimestampFormat/{memberEpochSeconds}/{memberHttpDate}/{memberDateTime}/{defaultFormat}/{targetEpochSeconds}/{targetHttpDate}/{targetDateTime}" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restxml#HttpRequestWithLabelsAndTimestampFormatInput": { + "type": "structure", + "members": { + "memberEpochSeconds": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "memberHttpDate": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#timestampFormat": "http-date" + } + }, + "memberDateTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "defaultFormat": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "targetEpochSeconds": { + "target": "aws.protocoltests.shared#EpochSeconds", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "targetHttpDate": { + "target": "aws.protocoltests.shared#HttpDate", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "targetDateTime": { + "target": "aws.protocoltests.shared#DateTime", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restxml#HttpRequestWithLabelsInput": { + "type": "structure", + "members": { + "string": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "short": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "integer": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "long": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "float": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "double": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "boolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Serialized in the path as true or false.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "Note that this member has no format, so it's serialized as an RFC 3399 date-time.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "aws.protocoltests.restxml#HttpResponseCode": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restxml#HttpResponseCodeOutput" + }, + "traits": { + "smithy.api#http": { + "uri": "/HttpResponseCode", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#HttpResponseCodeOutput": { + "type": "structure", + "members": { + "Status": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpResponseCode": {} + } + } + } + }, + "aws.protocoltests.restxml#HttpStringPayload": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#StringPayloadInput" + }, + "output": { + "target": "aws.protocoltests.restxml#StringPayloadInput" + }, + "traits": { + "smithy.api#http": { + "uri": "/StringPayload", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#IgnoreQueryParamsInResponse": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restxml#IgnoreQueryParamsInResponseOutput" + }, + "traits": { + "smithy.api#documentation": "This example ensures that query string bound request parameters are\nserialized in the body of responses if the structure is used in both\nthe request and response.", + "smithy.api#http": { + "uri": "/IgnoreQueryParamsInResponse", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restxml#IgnoreQueryParamsInResponseOutput": { + "type": "structure", + "members": { + "baz": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "baz", + "smithy.api#suppress": [ + "HttpBindingTraitIgnored" + ] + } + } + } + }, + "aws.protocoltests.restxml#InputAndOutputWithHeaders": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#InputAndOutputWithHeadersIO" + }, + "output": { + "target": "aws.protocoltests.restxml#InputAndOutputWithHeadersIO" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there is\nno input or output payload but there are HTTP header bindings.", + "smithy.api#http": { + "uri": "/InputAndOutputWithHeaders", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#InputAndOutputWithHeadersIO": { + "type": "structure", + "members": { + "headerString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-String" + } + }, + "headerByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#httpHeader": "X-Byte" + } + }, + "headerShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#httpHeader": "X-Short" + } + }, + "headerInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpHeader": "X-Integer" + } + }, + "headerLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#httpHeader": "X-Long" + } + }, + "headerFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#httpHeader": "X-Float" + } + }, + "headerDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpHeader": "X-Double" + } + }, + "headerTrueBool": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpHeader": "X-Boolean1" + } + }, + "headerFalseBool": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpHeader": "X-Boolean2" + } + }, + "headerStringList": { + "target": "aws.protocoltests.shared#StringList", + "traits": { + "smithy.api#httpHeader": "X-StringList" + } + }, + "headerStringSet": { + "target": "aws.protocoltests.shared#StringSet", + "traits": { + "smithy.api#httpHeader": "X-StringSet" + } + }, + "headerIntegerList": { + "target": "aws.protocoltests.shared#IntegerList", + "traits": { + "smithy.api#httpHeader": "X-IntegerList" + } + }, + "headerBooleanList": { + "target": "aws.protocoltests.shared#BooleanList", + "traits": { + "smithy.api#httpHeader": "X-BooleanList" + } + }, + "headerTimestampList": { + "target": "aws.protocoltests.shared#TimestampList", + "traits": { + "smithy.api#httpHeader": "X-TimestampList" + } + }, + "headerEnum": { + "target": "aws.protocoltests.shared#FooEnum", + "traits": { + "smithy.api#httpHeader": "X-Enum" + } + }, + "headerEnumList": { + "target": "aws.protocoltests.shared#FooEnumList", + "traits": { + "smithy.api#httpHeader": "X-EnumList" + } + } + } + }, + "aws.protocoltests.restxml#InvalidGreeting": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when an invalid greeting value is provided.", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "aws.protocoltests.restxml#ListWithMemberNamespace": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlNamespace": { + "uri": "https://xml-member.example.com" + } + } + }, + "traits": { + "smithy.api#xmlNamespace": { + "uri": "https://xml-list.example.com" + } + } + }, + "aws.protocoltests.restxml#ListWithNamespace": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#xmlNamespace": { + "uri": "https://xml-list.example.com" + } + } + }, + "aws.protocoltests.restxml#NestedMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#FooEnumMap" + } + }, + "aws.protocoltests.restxml#NestedPayload": { + "type": "structure", + "members": { + "greeting": { + "target": "smithy.api#String" + }, + "name": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.restxml#NestedXmlMapWithXmlName": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#NestedXmlMapWithXmlNameRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#NestedXmlMapWithXmlNameResponse" + }, + "traits": { + "smithy.api#documentation": "Nested Xml Maps with key/values with @xmlName", + "smithy.api#http": { + "uri": "/NestedXmlMapWithXmlName", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#NestedXmlMapWithXmlNameInnerMap": { + "type": "map", + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "InnerKey" + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "InnerValue" + } + } + }, + "aws.protocoltests.restxml#NestedXmlMapWithXmlNameInputOutput": { + "type": "structure", + "members": { + "nestedXmlMapWithXmlNameMap": { + "target": "aws.protocoltests.restxml#NestedXmlMapWithXmlNameMap" + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.restxml#NestedXmlMapWithXmlNameMap": { + "type": "map", + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "OuterKey" + } + }, + "value": { + "target": "aws.protocoltests.restxml#NestedXmlMapWithXmlNameInnerMap" + } + }, + "aws.protocoltests.restxml#NestedXmlMapWithXmlNameRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#NestedXmlMapWithXmlNameInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#NestedXmlMapWithXmlNameResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#NestedXmlMapWithXmlNameInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#NestedXmlMaps": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#NestedXmlMapsRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#NestedXmlMapsResponse" + }, + "traits": { + "smithy.api#http": { + "uri": "/NestedXmlMaps", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#NestedXmlMapsInputOutput": { + "type": "structure", + "members": { + "nestedMap": { + "target": "aws.protocoltests.restxml#NestedMap" + }, + "flatNestedMap": { + "target": "aws.protocoltests.restxml#NestedMap", + "traits": { + "smithy.api#xmlFlattened": {} + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.restxml#NestedXmlMapsRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#NestedXmlMapsInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#NestedXmlMapsResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#NestedXmlMapsInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#NoInputAndNoOutput": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request or response payload because the operation has no input or output.\nWhile this should be rare, code generators must support this.", + "smithy.api#http": { + "uri": "/NoInputAndNoOutput", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#NoInputAndOutput": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "aws.protocoltests.restxml#NoInputAndOutputOutput" + }, + "traits": { + "smithy.api#documentation": "The example tests how requests and responses are serialized when there's\nno request or response payload because the operation has no input and the\noutput is empty. While this should be rare, code generators must support\nthis.", + "smithy.api#http": { + "uri": "/NoInputAndOutputOutput", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#NoInputAndOutputOutput": { + "type": "structure", + "members": {} + }, + "aws.protocoltests.restxml#NullAndEmptyHeadersClient": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#NullAndEmptyHeadersIO" + }, + "output": { + "target": "aws.protocoltests.restxml#NullAndEmptyHeadersIO" + }, + "traits": { + "smithy.api#documentation": "Null headers are not sent over the wire, empty headers are serialized to \"\"", + "smithy.api#http": { + "uri": "/NullAndEmptyHeadersClient", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restxml#NullAndEmptyHeadersIO": { + "type": "structure", + "members": { + "a": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-A" + } + }, + "b": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-B" + } + }, + "c": { + "target": "aws.protocoltests.shared#StringList", + "traits": { + "smithy.api#httpHeader": "X-C" + } + } + } + }, + "aws.protocoltests.restxml#NullAndEmptyHeadersServer": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#NullAndEmptyHeadersIO" + }, + "output": { + "target": "aws.protocoltests.restxml#NullAndEmptyHeadersIO" + }, + "traits": { + "smithy.api#documentation": "Null headers are not sent over the wire, empty headers are serialized to \"\"", + "smithy.api#http": { + "uri": "/NullAndEmptyHeadersServer", + "method": "GET" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": [ + "server-only" + ] + } + }, + "aws.protocoltests.restxml#OmitsNullSerializesEmptyString": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#OmitsNullSerializesEmptyStringInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "Omits null, but serializes empty string value.", + "smithy.api#http": { + "uri": "/OmitsNullSerializesEmptyString", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "aws.protocoltests.restxml#OmitsNullSerializesEmptyStringInput": { + "type": "structure", + "members": { + "nullValue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "Null" + } + }, + "emptyString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "Empty" + } + } + } + }, + "aws.protocoltests.restxml#PayloadWithXmlName": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#xmlName": "Hello" + } + }, + "aws.protocoltests.restxml#PayloadWithXmlNamespace": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://foo.com" + } + } + }, + "aws.protocoltests.restxml#PayloadWithXmlNamespaceAndPrefix": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://foo.com", + "prefix": "baz" + } + } + }, + "aws.protocoltests.restxml#PutWithContentEncoding": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#PutWithContentEncodingInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/requestcompression/putcontentwithencoding" + }, + "smithy.api#requestCompression": { + "encodings": [ + "gzip" + ] + } + } + }, + "aws.protocoltests.restxml#PutWithContentEncodingInput": { + "type": "structure", + "members": { + "encoding": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "Content-Encoding" + } + }, + "data": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#QueryIdempotencyTokenAutoFill": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#QueryIdempotencyTokenAutoFillInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "Automatically adds idempotency tokens.", + "smithy.api#http": { + "uri": "/QueryIdempotencyTokenAutoFill", + "method": "POST" + }, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restxml#QueryIdempotencyTokenAutoFillInput": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "token", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "aws.protocoltests.restxml#QueryParamsAsStringListMap": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#QueryParamsAsStringListMapInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/StringListMap", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#QueryParamsAsStringListMapInput": { + "type": "structure", + "members": { + "qux": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "corge" + } + }, + "foo": { + "target": "aws.protocoltests.shared#StringListMap", + "traits": { + "smithy.api#httpQueryParams": {} + } + } + }, + "traits": { + "smithy.api#suppress": [ + "HttpQueryParamsTrait" + ] + } + }, + "aws.protocoltests.restxml#QueryPrecedence": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#QueryPrecedenceInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "uri": "/Precedence", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#QueryPrecedenceInput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "bar" + } + }, + "baz": { + "target": "aws.protocoltests.shared#StringMap", + "traits": { + "smithy.api#httpQueryParams": {} + } + } + }, + "traits": { + "smithy.api#suppress": [ + "HttpQueryParamsTrait" + ] + } + }, + "aws.protocoltests.restxml#RecursiveShapes": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#RecursiveShapesRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#RecursiveShapesResponse" + }, + "traits": { + "smithy.api#documentation": "Recursive shapes", + "smithy.api#http": { + "uri": "/RecursiveShapes", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#RecursiveShapesInputOutputNested1": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String" + }, + "nested": { + "target": "aws.protocoltests.restxml#RecursiveShapesInputOutputNested2" + } + } + }, + "aws.protocoltests.restxml#RecursiveShapesInputOutputNested2": { + "type": "structure", + "members": { + "bar": { + "target": "smithy.api#String" + }, + "recursiveMember": { + "target": "aws.protocoltests.restxml#RecursiveShapesInputOutputNested1" + } + } + }, + "aws.protocoltests.restxml#RecursiveShapesRequest": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.restxml#RecursiveShapesInputOutputNested1" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#RecursiveShapesResponse": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.restxml#RecursiveShapesInputOutputNested1" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#RenamedListMembers": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, + "aws.protocoltests.restxml#RestXml": { + "type": "service", + "version": "2019-12-16", + "operations": [ + { + "target": "aws.protocoltests.restxml#AllQueryStringTypes" + }, + { + "target": "aws.protocoltests.restxml#BodyWithXmlName" + }, + { + "target": "aws.protocoltests.restxml#ConstantAndVariableQueryString" + }, + { + "target": "aws.protocoltests.restxml#ConstantQueryString" + }, + { + "target": "aws.protocoltests.restxml#ContentTypeParameters" + }, + { + "target": "aws.protocoltests.restxml#DatetimeOffsets" + }, + { + "target": "aws.protocoltests.restxml#EmptyInputAndEmptyOutput" + }, + { + "target": "aws.protocoltests.restxml#EndpointOperation" + }, + { + "target": "aws.protocoltests.restxml#EndpointWithHostLabelHeaderOperation" + }, + { + "target": "aws.protocoltests.restxml#EndpointWithHostLabelOperation" + }, + { + "target": "aws.protocoltests.restxml#FlattenedXmlMap" + }, + { + "target": "aws.protocoltests.restxml#FlattenedXmlMapWithXmlName" + }, + { + "target": "aws.protocoltests.restxml#FlattenedXmlMapWithXmlNamespace" + }, + { + "target": "aws.protocoltests.restxml#FractionalSeconds" + }, + { + "target": "aws.protocoltests.restxml#GreetingWithErrors" + }, + { + "target": "aws.protocoltests.restxml#HttpEmptyPrefixHeaders" + }, + { + "target": "aws.protocoltests.restxml#HttpEnumPayload" + }, + { + "target": "aws.protocoltests.restxml#HttpPayloadTraits" + }, + { + "target": "aws.protocoltests.restxml#HttpPayloadTraitsWithMediaType" + }, + { + "target": "aws.protocoltests.restxml#HttpPayloadWithMemberXmlName" + }, + { + "target": "aws.protocoltests.restxml#HttpPayloadWithStructure" + }, + { + "target": "aws.protocoltests.restxml#HttpPayloadWithUnion" + }, + { + "target": "aws.protocoltests.restxml#HttpPayloadWithXmlName" + }, + { + "target": "aws.protocoltests.restxml#HttpPayloadWithXmlNamespace" + }, + { + "target": "aws.protocoltests.restxml#HttpPayloadWithXmlNamespaceAndPrefix" + }, + { + "target": "aws.protocoltests.restxml#HttpPrefixHeaders" + }, + { + "target": "aws.protocoltests.restxml#HttpRequestWithFloatLabels" + }, + { + "target": "aws.protocoltests.restxml#HttpRequestWithGreedyLabelInPath" + }, + { + "target": "aws.protocoltests.restxml#HttpRequestWithLabels" + }, + { + "target": "aws.protocoltests.restxml#HttpRequestWithLabelsAndTimestampFormat" + }, + { + "target": "aws.protocoltests.restxml#HttpResponseCode" + }, + { + "target": "aws.protocoltests.restxml#HttpStringPayload" + }, + { + "target": "aws.protocoltests.restxml#IgnoreQueryParamsInResponse" + }, + { + "target": "aws.protocoltests.restxml#InputAndOutputWithHeaders" + }, + { + "target": "aws.protocoltests.restxml#NestedXmlMaps" + }, + { + "target": "aws.protocoltests.restxml#NestedXmlMapWithXmlName" + }, + { + "target": "aws.protocoltests.restxml#NoInputAndNoOutput" + }, + { + "target": "aws.protocoltests.restxml#NoInputAndOutput" + }, + { + "target": "aws.protocoltests.restxml#NullAndEmptyHeadersClient" + }, + { + "target": "aws.protocoltests.restxml#NullAndEmptyHeadersServer" + }, + { + "target": "aws.protocoltests.restxml#OmitsNullSerializesEmptyString" + }, + { + "target": "aws.protocoltests.restxml#PutWithContentEncoding" + }, + { + "target": "aws.protocoltests.restxml#QueryIdempotencyTokenAutoFill" + }, + { + "target": "aws.protocoltests.restxml#QueryParamsAsStringListMap" + }, + { + "target": "aws.protocoltests.restxml#QueryPrecedence" + }, + { + "target": "aws.protocoltests.restxml#RecursiveShapes" + }, + { + "target": "aws.protocoltests.restxml#SimpleScalarProperties" + }, + { + "target": "aws.protocoltests.restxml#TimestampFormatHeaders" + }, + { + "target": "aws.protocoltests.restxml#XmlAttributes" + }, + { + "target": "aws.protocoltests.restxml#XmlAttributesInMiddle" + }, + { + "target": "aws.protocoltests.restxml#XmlAttributesOnPayload" + }, + { + "target": "aws.protocoltests.restxml#XmlBlobs" + }, + { + "target": "aws.protocoltests.restxml#XmlEmptyBlobs" + }, + { + "target": "aws.protocoltests.restxml#XmlEmptyLists" + }, + { + "target": "aws.protocoltests.restxml#XmlEmptyMaps" + }, + { + "target": "aws.protocoltests.restxml#XmlEmptyStrings" + }, + { + "target": "aws.protocoltests.restxml#XmlEnums" + }, + { + "target": "aws.protocoltests.restxml#XmlIntEnums" + }, + { + "target": "aws.protocoltests.restxml#XmlLists" + }, + { + "target": "aws.protocoltests.restxml#XmlMaps" + }, + { + "target": "aws.protocoltests.restxml#XmlMapsXmlName" + }, + { + "target": "aws.protocoltests.restxml#XmlMapWithXmlNamespace" + }, + { + "target": "aws.protocoltests.restxml#XmlNamespaces" + }, + { + "target": "aws.protocoltests.restxml#XmlTimestamps" + }, + { + "target": "aws.protocoltests.restxml#XmlUnions" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Rest Xml Protocol" + }, + "aws.auth#sigv4": { + "name": "restxml" + }, + "aws.protocols#restXml": {}, + "smithy.api#documentation": "A REST XML service that sends XML requests and responses.", + "smithy.api#title": "Sample Rest Xml Protocol Service" + } + }, + "aws.protocoltests.restxml#SimpleScalarProperties": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#SimpleScalarPropertiesRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#SimpleScalarPropertiesResponse" + }, + "traits": { + "smithy.api#http": { + "uri": "/SimpleScalarProperties", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#SimpleScalarPropertiesInputOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpHeader": "X-Foo" + } + }, + "stringValue": { + "target": "smithy.api#String" + }, + "trueBooleanValue": { + "target": "smithy.api#Boolean" + }, + "falseBooleanValue": { + "target": "smithy.api#Boolean" + }, + "byteValue": { + "target": "smithy.api#Byte" + }, + "shortValue": { + "target": "smithy.api#Short" + }, + "integerValue": { + "target": "smithy.api#Integer" + }, + "longValue": { + "target": "smithy.api#Long" + }, + "floatValue": { + "target": "smithy.api#Float" + }, + "doubleValue": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#xmlName": "DoubleDribble" + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.restxml#SimpleScalarPropertiesRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#SimpleScalarPropertiesInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#SimpleScalarPropertiesResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#SimpleScalarPropertiesInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#StringEnum": { + "type": "enum", + "members": { + "V": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "enumvalue" + } + } + } + }, + "aws.protocoltests.restxml#StringPayloadInput": { + "type": "structure", + "members": { + "payload": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, + "aws.protocoltests.restxml#StructureList": { + "type": "list", + "member": { + "target": "aws.protocoltests.restxml#StructureListMember", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, + "aws.protocoltests.restxml#StructureListMember": { + "type": "structure", + "members": { + "a": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "value" + } + }, + "b": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "other" + } + } + } + }, + "aws.protocoltests.restxml#TimestampFormatHeaders": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#TimestampFormatHeadersIO" + }, + "output": { + "target": "aws.protocoltests.restxml#TimestampFormatHeadersIO" + }, + "traits": { + "smithy.api#documentation": "The example tests how timestamp request and response headers are serialized.", + "smithy.api#http": { + "uri": "/TimestampFormatHeaders", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#TimestampFormatHeadersIO": { + "type": "structure", + "members": { + "memberEpochSeconds": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpHeader": "X-memberEpochSeconds", + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "memberHttpDate": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpHeader": "X-memberHttpDate", + "smithy.api#timestampFormat": "http-date" + } + }, + "memberDateTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpHeader": "X-memberDateTime", + "smithy.api#timestampFormat": "date-time" + } + }, + "defaultFormat": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#httpHeader": "X-defaultFormat" + } + }, + "targetEpochSeconds": { + "target": "aws.protocoltests.shared#EpochSeconds", + "traits": { + "smithy.api#httpHeader": "X-targetEpochSeconds" + } + }, + "targetHttpDate": { + "target": "aws.protocoltests.shared#HttpDate", + "traits": { + "smithy.api#httpHeader": "X-targetHttpDate" + } + }, + "targetDateTime": { + "target": "aws.protocoltests.shared#DateTime", + "traits": { + "smithy.api#httpHeader": "X-targetDateTime" + } + } + } + }, + "aws.protocoltests.restxml#UnionPayload": { + "type": "union", + "members": { + "greeting": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.restxml#XmlAttributes": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlAttributesRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlAttributesResponse" + }, + "traits": { + "smithy.api#documentation": "This example serializes an XML attributes on synthesized document.", + "smithy.api#http": { + "uri": "/XmlAttributes", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#XmlAttributesInMiddle": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlAttributesInMiddleRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlAttributesInMiddleResponse" + }, + "traits": { + "smithy.api#documentation": "This example serializes an XML attribute on a payload when it's defined in the middle of the member list.\nThis tests that implementations correctly write attributes immediately after the element start tag,\nwhich is critical for languages like C# where attribute writing must happen before child elements.", + "smithy.api#http": { + "uri": "/XmlAttributesInMiddle", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#XmlAttributesInMiddlePayloadRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlAttributesMiddleMemberInputOutput" + } + ], + "members": {} + }, + "aws.protocoltests.restxml#XmlAttributesInMiddlePayloadResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlAttributesMiddleMemberInputOutput" + } + ], + "members": {} + }, + "aws.protocoltests.restxml#XmlAttributesInMiddleRequest": { + "type": "structure", + "members": { + "payload": { + "target": "aws.protocoltests.restxml#XmlAttributesInMiddlePayloadRequest", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlAttributesInMiddleResponse": { + "type": "structure", + "members": { + "payload": { + "target": "aws.protocoltests.restxml#XmlAttributesInMiddlePayloadResponse", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlAttributesInputOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String" + }, + "attr": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlAttribute": {}, + "smithy.api#xmlName": "test" + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.restxml#XmlAttributesMiddleMemberInputOutput": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String" + }, + "attr": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlAttribute": {}, + "smithy.api#xmlName": "test" + } + }, + "baz": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.restxml#XmlAttributesOnPayload": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlAttributesOnPayloadRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlAttributesOnPayloadResponse" + }, + "traits": { + "smithy.api#documentation": "This example serializes an XML attributes on a document targeted by httpPayload.", + "smithy.api#http": { + "uri": "/XmlAttributesOnPayload", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#XmlAttributesOnPayloadRequest": { + "type": "structure", + "members": { + "payload": { + "target": "aws.protocoltests.restxml#XmlAttributesPayloadRequest", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlAttributesOnPayloadResponse": { + "type": "structure", + "members": { + "payload": { + "target": "aws.protocoltests.restxml#XmlAttributesPayloadResponse", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlAttributesPayloadRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlAttributesInputOutput" + } + ], + "members": {} + }, + "aws.protocoltests.restxml#XmlAttributesPayloadResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlAttributesInputOutput" + } + ], + "members": {} + }, + "aws.protocoltests.restxml#XmlAttributesRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlAttributesInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlAttributesResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlAttributesInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlBlobs": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlBlobsRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlBlobsResponse" + }, + "traits": { + "smithy.api#documentation": "Blobs are base64 encoded", + "smithy.api#http": { + "uri": "/XmlBlobs", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#XmlBlobsRequest": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Blob" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlBlobsResponse": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Blob" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlEmptyBlobs": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlEmptyBlobsRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlEmptyBlobsResponse" + }, + "traits": { + "smithy.api#documentation": "Blobs are base64 encoded", + "smithy.api#http": { + "uri": "/XmlEmptyBlobs", + "method": "POST" + }, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restxml#XmlEmptyBlobsRequest": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Blob" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlEmptyBlobsResponse": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#Blob" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlEmptyLists": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlEmptyListsRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlEmptyListsResponse" + }, + "traits": { + "smithy.api#http": { + "uri": "/XmlEmptyLists", + "method": "PUT" + }, + "smithy.api#idempotent": {}, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restxml#XmlEmptyListsRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlListsInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlEmptyListsResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlListsInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlEmptyMaps": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlEmptyMapsRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlEmptyMapsResponse" + }, + "traits": { + "smithy.api#http": { + "uri": "/XmlEmptyMaps", + "method": "POST" + }, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restxml#XmlEmptyMapsRequest": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.restxml#XmlMapsInputOutputMap" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlEmptyMapsResponse": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.restxml#XmlMapsInputOutputMap" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlEmptyStrings": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlEmptyStringsRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlEmptyStringsResponse" + }, + "traits": { + "smithy.api#http": { + "uri": "/XmlEmptyStrings", + "method": "PUT" + }, + "smithy.api#idempotent": {}, + "smithy.api#tags": [ + "client-only" + ] + } + }, + "aws.protocoltests.restxml#XmlEmptyStringsRequest": { + "type": "structure", + "members": { + "emptyString": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlEmptyStringsResponse": { + "type": "structure", + "members": { + "emptyString": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlEnums": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlEnumsRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlEnumsResponse" + }, + "traits": { + "smithy.api#documentation": "This example serializes enums as top level properties, in lists, sets, and maps.", + "smithy.api#http": { + "uri": "/XmlEnums", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#XmlEnumsInputOutput": { + "type": "structure", + "members": { + "fooEnum1": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnum2": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnum3": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "fooEnumList": { + "target": "aws.protocoltests.shared#FooEnumList" + }, + "fooEnumSet": { + "target": "aws.protocoltests.shared#FooEnumSet" + }, + "fooEnumMap": { + "target": "aws.protocoltests.shared#FooEnumMap" + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.restxml#XmlEnumsRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlEnumsInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlEnumsResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlEnumsInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlIntEnums": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlIntEnumsRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlIntEnumsResponse" + }, + "traits": { + "smithy.api#documentation": "This example serializes enums as top level properties, in lists, sets, and maps.", + "smithy.api#http": { + "uri": "/XmlIntEnums", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#XmlIntEnumsInputOutput": { + "type": "structure", + "members": { + "intEnum1": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "intEnum2": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "intEnum3": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "intEnumList": { + "target": "aws.protocoltests.shared#IntegerEnumList" + }, + "intEnumSet": { + "target": "aws.protocoltests.shared#IntegerEnumSet" + }, + "intEnumMap": { + "target": "aws.protocoltests.shared#IntegerEnumMap" + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.restxml#XmlIntEnumsRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlIntEnumsInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlIntEnumsResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlIntEnumsInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlLists": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlListsRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlListsResponse" + }, + "traits": { + "smithy.api#documentation": "This test case serializes XML lists for the following cases for both\ninput and output:\n\n1. Normal XML lists.\n2. Normal XML sets.\n3. XML lists of lists.\n4. XML lists with @xmlName on its members\n5. Flattened XML lists.\n6. Flattened XML lists with @xmlName.\n7. Flattened XML lists with @xmlNamespace.\n8. Lists of structures.\n9. Flattened XML list of structures", + "smithy.api#http": { + "uri": "/XmlLists", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#XmlListsInputOutput": { + "type": "structure", + "members": { + "stringList": { + "target": "aws.protocoltests.shared#StringList" + }, + "stringSet": { + "target": "aws.protocoltests.shared#StringSet" + }, + "integerList": { + "target": "aws.protocoltests.shared#IntegerList" + }, + "booleanList": { + "target": "aws.protocoltests.shared#BooleanList" + }, + "timestampList": { + "target": "aws.protocoltests.shared#TimestampList" + }, + "enumList": { + "target": "aws.protocoltests.shared#FooEnumList" + }, + "intEnumList": { + "target": "aws.protocoltests.shared#IntegerEnumList" + }, + "nestedStringList": { + "target": "aws.protocoltests.shared#NestedStringList" + }, + "renamedListMembers": { + "target": "aws.protocoltests.restxml#RenamedListMembers", + "traits": { + "smithy.api#xmlName": "renamed" + } + }, + "flattenedList": { + "target": "aws.protocoltests.restxml#RenamedListMembers", + "traits": { + "smithy.api#suppress": [ + "XmlFlattenedTrait" + ], + "smithy.api#xmlFlattened": {} + } + }, + "flattenedList2": { + "target": "aws.protocoltests.restxml#RenamedListMembers", + "traits": { + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "customName" + } + }, + "flattenedListWithMemberNamespace": { + "target": "aws.protocoltests.restxml#ListWithMemberNamespace", + "traits": { + "smithy.api#xmlFlattened": {} + } + }, + "flattenedListWithNamespace": { + "target": "aws.protocoltests.restxml#ListWithNamespace", + "traits": { + "smithy.api#xmlFlattened": {} + } + }, + "structureList": { + "target": "aws.protocoltests.restxml#StructureList", + "traits": { + "smithy.api#xmlName": "myStructureList" + } + }, + "flattenedStructureList": { + "target": "aws.protocoltests.restxml#StructureList", + "traits": { + "smithy.api#suppress": [ + "XmlFlattenedTrait" + ], + "smithy.api#xmlFlattened": {} + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.restxml#XmlListsRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlListsInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlListsResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlListsInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlMapWithXmlNamespace": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlMapWithXmlNamespaceRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlMapWithXmlNamespaceResponse" + }, + "traits": { + "smithy.api#documentation": "Maps with @xmlNamespace and @xmlName", + "smithy.api#http": { + "uri": "/XmlMapWithXmlNamespace", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#XmlMapWithXmlNamespaceInputOutput": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.restxml#XmlMapWithXmlNamespaceInputOutputMap", + "traits": { + "smithy.api#xmlName": "KVP", + "smithy.api#xmlNamespace": { + "uri": "https://the-member.example.com" + } + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.restxml#XmlMapWithXmlNamespaceInputOutputMap": { + "type": "map", + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "K", + "smithy.api#xmlNamespace": { + "uri": "https://the-key.example.com" + } + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "V", + "smithy.api#xmlNamespace": { + "uri": "https://the-value.example.com" + } + } + } + }, + "aws.protocoltests.restxml#XmlMapWithXmlNamespaceRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlMapWithXmlNamespaceInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlMapWithXmlNamespaceResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlMapWithXmlNamespaceInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlMaps": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlMapsRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlMapsResponse" + }, + "traits": { + "smithy.api#documentation": "The example tests basic map serialization.", + "smithy.api#http": { + "uri": "/XmlMaps", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#XmlMapsInputOutputMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#GreetingStruct" + } + }, + "aws.protocoltests.restxml#XmlMapsRequest": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.restxml#XmlMapsInputOutputMap" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlMapsResponse": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.restxml#XmlMapsInputOutputMap" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlMapsXmlName": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlMapsXmlNameRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlMapsXmlNameResponse" + }, + "traits": { + "smithy.api#http": { + "uri": "/XmlMapsXmlName", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#XmlMapsXmlNameInputOutputMap": { + "type": "map", + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlName": "Attribute" + } + }, + "value": { + "target": "aws.protocoltests.shared#GreetingStruct", + "traits": { + "smithy.api#xmlName": "Setting" + } + } + }, + "aws.protocoltests.restxml#XmlMapsXmlNameRequest": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.restxml#XmlMapsXmlNameInputOutputMap" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlMapsXmlNameResponse": { + "type": "structure", + "members": { + "myMap": { + "target": "aws.protocoltests.restxml#XmlMapsXmlNameInputOutputMap" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlNamespaceNested": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://baz.com", + "prefix": "baz" + } + } + }, + "values": { + "target": "aws.protocoltests.restxml#XmlNamespacedList", + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://qux.com" + } + } + } + }, + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://foo.com" + } + } + }, + "aws.protocoltests.restxml#XmlNamespacedList": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#xmlNamespace": { + "uri": "http://bux.com" + } + } + } + }, + "aws.protocoltests.restxml#XmlNamespaces": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlNamespacesRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlNamespacesResponse" + }, + "traits": { + "smithy.api#http": { + "uri": "/XmlNamespaces", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#XmlNamespacesInputOutput": { + "type": "structure", + "members": { + "nested": { + "target": "aws.protocoltests.restxml#XmlNamespaceNested" + } + }, + "traits": { + "smithy.api#mixin": {}, + "smithy.api#xmlNamespace": { + "uri": "http://foo.com" + } + } + }, + "aws.protocoltests.restxml#XmlNamespacesRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlNamespacesInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlNamespacesResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlNamespacesInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlNestedUnionStruct": { + "type": "structure", + "members": { + "stringValue": { + "target": "smithy.api#String" + }, + "booleanValue": { + "target": "smithy.api#Boolean" + }, + "byteValue": { + "target": "smithy.api#Byte" + }, + "shortValue": { + "target": "smithy.api#Short" + }, + "integerValue": { + "target": "smithy.api#Integer" + }, + "longValue": { + "target": "smithy.api#Long" + }, + "floatValue": { + "target": "smithy.api#Float" + }, + "doubleValue": { + "target": "smithy.api#Double" + } + } + }, + "aws.protocoltests.restxml#XmlTimestamps": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlTimestampsRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlTimestampsResponse" + }, + "traits": { + "smithy.api#documentation": "This tests how timestamps are serialized, including using the\ndefault format of date-time and various @timestampFormat trait\nvalues.", + "smithy.api#http": { + "uri": "/XmlTimestamps", + "method": "POST" + } + } + }, + "aws.protocoltests.restxml#XmlTimestampsInputOutput": { + "type": "structure", + "members": { + "normal": { + "target": "smithy.api#Timestamp" + }, + "dateTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "dateTimeOnTarget": { + "target": "aws.protocoltests.shared#DateTime" + }, + "epochSeconds": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "epochSecondsOnTarget": { + "target": "aws.protocoltests.shared#EpochSeconds" + }, + "httpDate": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "httpDateOnTarget": { + "target": "aws.protocoltests.shared#HttpDate" + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "aws.protocoltests.restxml#XmlTimestampsRequest": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlTimestampsInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlTimestampsResponse": { + "type": "structure", + "mixins": [ + { + "target": "aws.protocoltests.restxml#XmlTimestampsInputOutput" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.restxml#XmlUnionShape": { + "type": "union", + "members": { + "stringValue": { + "target": "smithy.api#String" + }, + "booleanValue": { + "target": "smithy.api#Boolean" + }, + "byteValue": { + "target": "smithy.api#Byte" + }, + "shortValue": { + "target": "smithy.api#Short" + }, + "integerValue": { + "target": "smithy.api#Integer" + }, + "longValue": { + "target": "smithy.api#Long" + }, + "floatValue": { + "target": "smithy.api#Float" + }, + "doubleValue": { + "target": "smithy.api#Double" + }, + "unionValue": { + "target": "aws.protocoltests.restxml#XmlUnionShape" + }, + "structValue": { + "target": "aws.protocoltests.restxml#XmlNestedUnionStruct" + } + } + }, + "aws.protocoltests.restxml#XmlUnions": { + "type": "operation", + "input": { + "target": "aws.protocoltests.restxml#XmlUnionsRequest" + }, + "output": { + "target": "aws.protocoltests.restxml#XmlUnionsResponse" + }, + "traits": { + "smithy.api#http": { + "uri": "/XmlUnions", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "aws.protocoltests.restxml#XmlUnionsRequest": { + "type": "structure", + "members": { + "unionValue": { + "target": "aws.protocoltests.restxml#XmlUnionShape" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "aws.protocoltests.restxml#XmlUnionsResponse": { + "type": "structure", + "members": { + "unionValue": { + "target": "aws.protocoltests.restxml#XmlUnionShape" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "aws.protocoltests.shared#BooleanList": { + "type": "list", + "member": { + "target": "smithy.api#Boolean" + } + }, + "aws.protocoltests.shared#DateTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "aws.protocoltests.shared#DoubleList": { + "type": "list", + "member": { + "target": "smithy.api#Double" + } + }, + "aws.protocoltests.shared#EpochSeconds": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "aws.protocoltests.shared#FooEnum": { + "type": "enum", + "members": { + "FOO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Foo" + } + }, + "BAZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Baz" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Bar" + } + }, + "ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "1" + } + }, + "ZERO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "0" + } + } + } + }, + "aws.protocoltests.shared#FooEnumList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#FooEnum" + } + }, + "aws.protocoltests.shared#FooEnumMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#FooEnum" + } + }, + "aws.protocoltests.shared#FooEnumSet": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#FooEnum" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "target": "smithy.api#String" + } + } + }, + "aws.protocoltests.shared#HttpDate": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "aws.protocoltests.shared#IntegerEnum": { + "type": "intEnum", + "members": { + "A": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 1 + } + }, + "B": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 2 + } + }, + "C": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 3 + } + } + } + }, + "aws.protocoltests.shared#IntegerEnumList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#IntegerEnum" + } + }, + "aws.protocoltests.shared#IntegerEnumMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#IntegerEnum" + } + }, + "aws.protocoltests.shared#IntegerEnumSet": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#IntegerEnum" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#IntegerList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + } + }, + "aws.protocoltests.shared#IntegerSet": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#NestedStringList": { + "type": "list", + "member": { + "target": "aws.protocoltests.shared#StringList" + }, + "traits": { + "smithy.api#documentation": "A list of lists of strings." + } + }, + "aws.protocoltests.shared#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.shared#StringListMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "aws.protocoltests.shared#StringList" + } + }, + "aws.protocoltests.shared#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "aws.protocoltests.shared#StringSet": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "aws.protocoltests.shared#TextPlainBlob": { + "type": "blob", + "traits": { + "smithy.api#mediaType": "text/plain" + } + }, + "aws.protocoltests.shared#TimestampList": { + "type": "list", + "member": { + "target": "smithy.api#Timestamp" + } + }, + "smithy.test#AppliesTo": { + "type": "enum", + "members": { + "CLIENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to client implementations.", + "smithy.api#enumValue": "client" + } + }, + "SERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to server implementations.", + "smithy.api#enumValue": "server" + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMessageMixin": { + "type": "structure", + "members": { + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of expected HTTP headers.\n\nHeaders that are not listed in this map are ignored unless they are\nexplicitly forbidden through `forbidHeaders`." + } + }, + "forbidHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must not appear in the serialized\nHTTP request." + } + }, + "requireHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must appear in the serialized\nHTTP message, but no assertion is made on the value.\n\nHeaders listed in `headers` do not need to appear in this list." + } + }, + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected HTTP message body.\n\nIf no request body is defined, then no assertions are made about\nthe body of the message." + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP message members and supporting protocol test members,\nsuitable for both requests and responses.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "method": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected serialized HTTP request method.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request-target of the HTTP request, not including\nthe query string (for example, \"/foo/bar\").", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint provided to the client, not including the path\nor scheme (for example, \"example.com\")." + } + }, + "resolvedHost": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint that the client should send to, not including\nthe path or scheme (for example, \"prefix.example.com\").\n\nThis can differ from the host provided to the client if the `hostPrefix`\nmember of the `endpoint` trait is set, for instance." + } + }, + "queryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of the expected serialized query string parameters.\n\nEach element in the list is a query string key value pair\nthat starts with the query string parameter name optionally\nfollowed by \"=\", optionally followed by the query string\nparameter value. For example, \"foo=bar\", \"foo=\", and \"foo\"\nare all valid values. The query string parameter name and\nthe value MUST appear in the format in which it is expected\nto be sent over the wire; if a key or value needs to be\npercent-encoded, then it MUST appear percent-encoded in this list.\n\nA serialized HTTP request is not in compliance with the protocol\nif any query string parameter defined in `queryParams` is not\ndefined in the request or if the value of a query string parameter\nin the request differs from the expected value.\n\n`queryParams` applies no constraints on additional query parameters." + } + }, + "forbidQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that must not appear in the\nserialized HTTP request.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + }, + "requireQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that MUST appear in the\nserialized request URI, but no assertion is made on the value.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP request members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpRequestMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpRequestTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's\npossible that specific authentication schemes might influence\nthe serialization logic of an HTTP request.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the input parameters used to generated the HTTP request.\n\nThese parameters MUST be compatible with the input of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "code": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Defines the HTTP response code.", + "smithy.api#range": { + "min": 100, + "max": 599 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP response members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpResponseMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpResponseTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The shape ID of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's possible\nthat specific authentication schemes might influence the serialization\nlogic of an HTTP response.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the output parameters deserialized from the HTTP response.\n\nThese parameters MUST be compatible with the output of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nresponse. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + }, + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyStringList": { + "type": "list", + "member": { + "target": "smithy.test#NonEmptyString" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + } + } +} diff --git a/scripts/codegen-output-py/models/rpcv2-cbor.json b/scripts/codegen-output-py/models/rpcv2-cbor.json new file mode 100644 index 000000000..bbfbc2125 --- /dev/null +++ b/scripts/codegen-output-py/models/rpcv2-cbor.json @@ -0,0 +1,1536 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "smithy.framework#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A summary of the validation failure.", + "smithy.api#required": {} + } + }, + "fieldList": { + "target": "smithy.framework#ValidationExceptionFieldList", + "traits": { + "smithy.api#documentation": "A list of specific failures encountered while validating the input.\nA member can appear in this list more than once if it failed to satisfy multiple constraints." + } + } + }, + "traits": { + "smithy.api#documentation": "A standard error for input validation failures.\nThis should be thrown by services when a member of the input structure\nfalls outside of the modeled or documented constraints.", + "smithy.api#error": "client" + } + }, + "smithy.framework#ValidationExceptionField": { + "type": "structure", + "members": { + "path": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.", + "smithy.api#required": {} + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A detailed description of the validation failure.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Describes one specific validation failure for an input member." + } + }, + "smithy.framework#ValidationExceptionFieldList": { + "type": "list", + "member": { + "target": "smithy.framework#ValidationExceptionField" + } + }, + "smithy.protocols#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "A list of String shapes.", + "smithy.api#private": {} + } + }, + "smithy.protocols#rpcv2Cbor": { + "type": "structure", + "members": { + "http": { + "target": "smithy.protocols#StringList", + "traits": { + "smithy.api#documentation": "Priority ordered list of supported HTTP protocol versions." + } + }, + "eventStreamHttp": { + "target": "smithy.protocols#StringList", + "traits": { + "smithy.api#documentation": "Priority ordered list of supported HTTP protocol versions\nthat are required when using event streams." + } + } + }, + "traits": { + "smithy.api#documentation": "An RPC-based protocol that serializes CBOR payloads.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel", + "smithy.api#httpError", + "smithy.api#requestCompression" + ] + }, + "smithy.api#trait": { + "selector": "service" + }, + "smithy.api#traitValidators": { + "rpcv2Cbor.NoDocuments": { + "selector": "service ~> member :test(> document)", + "message": "This protocol does not support document types in most possible scenarios.", + "severity": "DANGER" + } + } + } + }, + "smithy.protocoltests.rpcv2Cbor#ClientOptionalDefaults": { + "type": "structure", + "members": { + "member": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#default": 0 + } + } + } + }, + "smithy.protocoltests.rpcv2Cbor#ComplexError": { + "type": "structure", + "members": { + "TopLevel": { + "target": "smithy.api#String" + }, + "Nested": { + "target": "smithy.protocoltests.rpcv2Cbor#ComplexNestedErrorData" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when a request is invalid.", + "smithy.api#error": "client" + } + }, + "smithy.protocoltests.rpcv2Cbor#ComplexNestedErrorData": { + "type": "structure", + "members": { + "Foo": { + "target": "smithy.api#String" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#Defaults": { + "type": "structure", + "mixins": [ + { + "target": "smithy.protocoltests.rpcv2Cbor#DefaultsMixin" + } + ], + "members": {} + }, + "smithy.protocoltests.rpcv2Cbor#DefaultsMixin": { + "type": "structure", + "members": { + "defaultString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "hi" + } + }, + "defaultBoolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#default": true + } + }, + "defaultList": { + "target": "smithy.protocoltests.rpcv2Cbor#TestStringList", + "traits": { + "smithy.api#default": [] + } + }, + "defaultTimestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#default": 0 + } + }, + "defaultBlob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#default": "YWJj" + } + }, + "defaultByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#default": 1 + } + }, + "defaultShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#default": 1 + } + }, + "defaultInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 10 + } + }, + "defaultLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#default": 100 + } + }, + "defaultFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#default": 1.0 + } + }, + "defaultDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#default": 1.0 + } + }, + "defaultMap": { + "target": "smithy.protocoltests.rpcv2Cbor#TestStringMap", + "traits": { + "smithy.api#default": {} + } + }, + "defaultEnum": { + "target": "smithy.protocoltests.rpcv2Cbor#TestEnum", + "traits": { + "smithy.api#default": "FOO" + } + }, + "defaultIntEnum": { + "target": "smithy.protocoltests.rpcv2Cbor#TestIntEnum", + "traits": { + "smithy.api#default": 1 + } + }, + "emptyString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "" + } + }, + "falseBoolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#default": false + } + }, + "emptyBlob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#default": "" + } + }, + "zeroByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#default": 0.0 + } + }, + "zeroDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#default": 0.0 + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "smithy.protocoltests.rpcv2Cbor#DenseBooleanMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Boolean" + } + }, + "smithy.protocoltests.rpcv2Cbor#DenseNumberMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Integer" + } + }, + "smithy.protocoltests.rpcv2Cbor#DenseSetMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.protocoltests.shared#StringSet" + } + }, + "smithy.protocoltests.rpcv2Cbor#DenseStringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "smithy.protocoltests.rpcv2Cbor#DenseStructMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.protocoltests.shared#GreetingStruct" + } + }, + "smithy.protocoltests.rpcv2Cbor#EmptyInputOutput": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Cbor#EmptyStructure" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Cbor#EmptyStructure" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Cbor#EmptyStructure": { + "type": "structure", + "members": {} + }, + "smithy.protocoltests.rpcv2Cbor#Float16": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Cbor#Float16Output" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "smithy.protocoltests.rpcv2Cbor#Float16Output": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#Double" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#FractionalSeconds": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Cbor#FractionalSecondsOutput" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "smithy.protocoltests.rpcv2Cbor#FractionalSecondsOutput": { + "type": "structure", + "members": { + "datetime": { + "target": "smithy.protocoltests.shared#DateTime" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#GreetingWithErrors": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Cbor#GreetingWithErrorsOutput" + }, + "errors": [ + { + "target": "smithy.protocoltests.rpcv2Cbor#ComplexError" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#InvalidGreeting" + } + ], + "traits": { + "smithy.api#documentation": "This operation has three possible return values:\n\n1. A successful response in the form of GreetingWithErrorsOutput\n2. An InvalidGreeting error.\n3. A ComplexError error.\n\nImplementations must be able to successfully take a response and\nproperly deserialize successful and error responses.", + "smithy.api#idempotent": {} + } + }, + "smithy.protocoltests.rpcv2Cbor#GreetingWithErrorsOutput": { + "type": "structure", + "members": { + "greeting": { + "target": "smithy.api#String" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#InvalidGreeting": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when an invalid greeting value is provided.", + "smithy.api#error": "client" + } + }, + "smithy.protocoltests.rpcv2Cbor#NoInputOutput": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Cbor#OperationWithDefaults": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Cbor#OperationWithDefaultsInput" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Cbor#OperationWithDefaultsOutput" + }, + "errors": [ + { + "target": "smithy.framework#ValidationException" + } + ], + "traits": {} + }, + "smithy.protocoltests.rpcv2Cbor#OperationWithDefaultsInput": { + "type": "structure", + "members": { + "defaults": { + "target": "smithy.protocoltests.rpcv2Cbor#Defaults" + }, + "clientOptionalDefaults": { + "target": "smithy.protocoltests.rpcv2Cbor#ClientOptionalDefaults" + }, + "topLevelDefault": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "hi" + } + }, + "otherTopLevelDefault": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 0 + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "smithy.protocoltests.rpcv2Cbor#OperationWithDefaultsOutput": { + "type": "structure", + "mixins": [ + { + "target": "smithy.protocoltests.rpcv2Cbor#DefaultsMixin" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "smithy.protocoltests.rpcv2Cbor#OptionalInputOutput": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Cbor#SimpleStructure" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Cbor#SimpleStructure" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Cbor#RecursiveShapes": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Cbor#RecursiveShapesInputOutput" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Cbor#RecursiveShapesInputOutput" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Cbor#RecursiveShapesInputOutput": { + "type": "structure", + "members": { + "nested": { + "target": "smithy.protocoltests.rpcv2Cbor#RecursiveShapesInputOutputNested1" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#RecursiveShapesInputOutputNested1": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String" + }, + "nested": { + "target": "smithy.protocoltests.rpcv2Cbor#RecursiveShapesInputOutputNested2" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#RecursiveShapesInputOutputNested2": { + "type": "structure", + "members": { + "bar": { + "target": "smithy.api#String" + }, + "recursiveMember": { + "target": "smithy.protocoltests.rpcv2Cbor#RecursiveShapesInputOutputNested1" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#RpcV2CborDenseMaps": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborDenseMapsInputOutput" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborDenseMapsInputOutput" + }, + "errors": [ + { + "target": "smithy.framework#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "The example tests basic map serialization." + } + }, + "smithy.protocoltests.rpcv2Cbor#RpcV2CborDenseMapsInputOutput": { + "type": "structure", + "members": { + "denseStructMap": { + "target": "smithy.protocoltests.rpcv2Cbor#DenseStructMap" + }, + "denseNumberMap": { + "target": "smithy.protocoltests.rpcv2Cbor#DenseNumberMap" + }, + "denseBooleanMap": { + "target": "smithy.protocoltests.rpcv2Cbor#DenseBooleanMap" + }, + "denseStringMap": { + "target": "smithy.protocoltests.rpcv2Cbor#DenseStringMap" + }, + "denseSetMap": { + "target": "smithy.protocoltests.rpcv2Cbor#DenseSetMap" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#RpcV2CborListInputOutput": { + "type": "structure", + "members": { + "stringList": { + "target": "smithy.protocoltests.shared#StringList" + }, + "stringSet": { + "target": "smithy.protocoltests.shared#StringSet" + }, + "integerList": { + "target": "smithy.protocoltests.shared#IntegerList" + }, + "booleanList": { + "target": "smithy.protocoltests.shared#BooleanList" + }, + "timestampList": { + "target": "smithy.protocoltests.shared#TimestampList" + }, + "enumList": { + "target": "smithy.protocoltests.shared#FooEnumList" + }, + "intEnumList": { + "target": "smithy.protocoltests.shared#IntegerEnumList" + }, + "nestedStringList": { + "target": "smithy.protocoltests.shared#NestedStringList" + }, + "structureList": { + "target": "smithy.protocoltests.rpcv2Cbor#StructureList" + }, + "blobList": { + "target": "smithy.protocoltests.shared#BlobList" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#RpcV2CborLists": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborListInputOutput" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborListInputOutput" + }, + "errors": [ + { + "target": "smithy.framework#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "This test case serializes JSON lists for the following cases for both\ninput and output:\n\n1. Normal lists.\n2. Normal sets.\n3. Lists of lists.\n4. Lists of structures.", + "smithy.api#idempotent": {} + } + }, + "smithy.protocoltests.rpcv2Cbor#RpcV2CborNestedUnion": { + "type": "union", + "members": { + "stringValue": { + "target": "smithy.api#String" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#RpcV2CborSparseMaps": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborSparseMapsInputOutput" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborSparseMapsInputOutput" + }, + "errors": [ + { + "target": "smithy.framework#ValidationException" + } + ], + "traits": {} + }, + "smithy.protocoltests.rpcv2Cbor#RpcV2CborSparseMapsInputOutput": { + "type": "structure", + "members": { + "sparseStructMap": { + "target": "smithy.protocoltests.rpcv2Cbor#SparseStructMap" + }, + "sparseNumberMap": { + "target": "smithy.protocoltests.rpcv2Cbor#SparseNumberMap" + }, + "sparseBooleanMap": { + "target": "smithy.protocoltests.rpcv2Cbor#SparseBooleanMap" + }, + "sparseStringMap": { + "target": "smithy.protocoltests.shared#SparseStringMap" + }, + "sparseSetMap": { + "target": "smithy.protocoltests.rpcv2Cbor#SparseSetMap" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#RpcV2CborUnion": { + "type": "union", + "members": { + "stringValue": { + "target": "smithy.api#String" + }, + "unionValue": { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborNestedUnion" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#RpcV2CborUnionInputOutput": { + "type": "structure", + "members": { + "contents": { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborUnion" + }, + "otherValue": { + "target": "smithy.api#String" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#RpcV2CborUnions": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborUnionInputOutput" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborUnionInputOutput" + }, + "traits": { + "smithy.api#documentation": "This operation uses unions for inputs and outputs.", + "smithy.api#idempotent": {} + } + }, + "smithy.protocoltests.rpcv2Cbor#RpcV2Protocol": { + "type": "service", + "version": "2020-07-14", + "operations": [ + { + "target": "smithy.protocoltests.rpcv2Cbor#EmptyInputOutput" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#Float16" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#FractionalSeconds" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#GreetingWithErrors" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#NoInputOutput" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#OperationWithDefaults" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#OptionalInputOutput" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#RecursiveShapes" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborDenseMaps" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborLists" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborSparseMaps" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#RpcV2CborUnions" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#SimpleScalarProperties" + }, + { + "target": "smithy.protocoltests.rpcv2Cbor#SparseNullsOperation" + } + ], + "traits": { + "smithy.api#title": "RpcV2 Protocol Service", + "smithy.protocols#rpcv2Cbor": {} + } + }, + "smithy.protocoltests.rpcv2Cbor#SimpleScalarProperties": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Cbor#SimpleScalarStructure" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Cbor#SimpleScalarStructure" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Cbor#SimpleScalarStructure": { + "type": "structure", + "members": { + "trueBooleanValue": { + "target": "smithy.api#Boolean" + }, + "falseBooleanValue": { + "target": "smithy.api#Boolean" + }, + "byteValue": { + "target": "smithy.api#Byte" + }, + "doubleValue": { + "target": "smithy.api#Double" + }, + "floatValue": { + "target": "smithy.api#Float" + }, + "integerValue": { + "target": "smithy.api#Integer" + }, + "longValue": { + "target": "smithy.api#Long" + }, + "shortValue": { + "target": "smithy.api#Short" + }, + "stringValue": { + "target": "smithy.api#String" + }, + "blobValue": { + "target": "smithy.api#Blob" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#SimpleStructure": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#SparseBooleanMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Boolean" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "smithy.protocoltests.rpcv2Cbor#SparseNullsOperation": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Cbor#SparseNullsOperationInputOutput" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Cbor#SparseNullsOperationInputOutput" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Cbor#SparseNullsOperationInputOutput": { + "type": "structure", + "members": { + "sparseStringList": { + "target": "smithy.protocoltests.shared#SparseStringList" + }, + "sparseStringMap": { + "target": "smithy.protocoltests.shared#SparseStringMap" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#SparseNumberMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "smithy.protocoltests.rpcv2Cbor#SparseSetMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.protocoltests.shared#StringSet" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "smithy.protocoltests.rpcv2Cbor#SparseStructMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.protocoltests.shared#GreetingStruct" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "smithy.protocoltests.rpcv2Cbor#StructureList": { + "type": "list", + "member": { + "target": "smithy.protocoltests.rpcv2Cbor#StructureListMember" + } + }, + "smithy.protocoltests.rpcv2Cbor#StructureListMember": { + "type": "structure", + "members": { + "a": { + "target": "smithy.api#String" + }, + "b": { + "target": "smithy.api#String" + } + } + }, + "smithy.protocoltests.rpcv2Cbor#TestEnum": { + "type": "enum", + "members": { + "FOO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FOO" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BAR" + } + }, + "BAZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BAZ" + } + } + } + }, + "smithy.protocoltests.rpcv2Cbor#TestIntEnum": { + "type": "intEnum", + "members": { + "ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 1 + } + }, + "TWO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 2 + } + } + } + }, + "smithy.protocoltests.rpcv2Cbor#TestStringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "smithy.protocoltests.rpcv2Cbor#TestStringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "smithy.protocoltests.shared#BlobList": { + "type": "list", + "member": { + "target": "smithy.api#Blob" + } + }, + "smithy.protocoltests.shared#BooleanList": { + "type": "list", + "member": { + "target": "smithy.api#Boolean" + } + }, + "smithy.protocoltests.shared#DateTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "smithy.protocoltests.shared#FooEnum": { + "type": "enum", + "members": { + "FOO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Foo" + } + }, + "BAZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Baz" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Bar" + } + }, + "ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "1" + } + }, + "ZERO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "0" + } + } + } + }, + "smithy.protocoltests.shared#FooEnumList": { + "type": "list", + "member": { + "target": "smithy.protocoltests.shared#FooEnum" + } + }, + "smithy.protocoltests.shared#GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "target": "smithy.api#String" + } + } + }, + "smithy.protocoltests.shared#IntegerEnum": { + "type": "intEnum", + "members": { + "A": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 1 + } + }, + "B": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 2 + } + }, + "C": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 3 + } + } + } + }, + "smithy.protocoltests.shared#IntegerEnumList": { + "type": "list", + "member": { + "target": "smithy.protocoltests.shared#IntegerEnum" + } + }, + "smithy.protocoltests.shared#IntegerList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + } + }, + "smithy.protocoltests.shared#NestedStringList": { + "type": "list", + "member": { + "target": "smithy.protocoltests.shared#StringList" + }, + "traits": { + "smithy.api#documentation": "A list of lists of strings." + } + }, + "smithy.protocoltests.shared#SparseStringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "smithy.protocoltests.shared#SparseStringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "smithy.protocoltests.shared#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "smithy.protocoltests.shared#StringSet": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "smithy.protocoltests.shared#TimestampList": { + "type": "list", + "member": { + "target": "smithy.api#Timestamp" + } + }, + "smithy.test#AppliesTo": { + "type": "enum", + "members": { + "CLIENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to client implementations.", + "smithy.api#enumValue": "client" + } + }, + "SERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to server implementations.", + "smithy.api#enumValue": "server" + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMessageMixin": { + "type": "structure", + "members": { + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of expected HTTP headers.\n\nHeaders that are not listed in this map are ignored unless they are\nexplicitly forbidden through `forbidHeaders`." + } + }, + "forbidHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must not appear in the serialized\nHTTP request." + } + }, + "requireHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must appear in the serialized\nHTTP message, but no assertion is made on the value.\n\nHeaders listed in `headers` do not need to appear in this list." + } + }, + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected HTTP message body.\n\nIf no request body is defined, then no assertions are made about\nthe body of the message." + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP message members and supporting protocol test members,\nsuitable for both requests and responses.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "method": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected serialized HTTP request method.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request-target of the HTTP request, not including\nthe query string (for example, \"/foo/bar\").", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint provided to the client, not including the path\nor scheme (for example, \"example.com\")." + } + }, + "resolvedHost": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint that the client should send to, not including\nthe path or scheme (for example, \"prefix.example.com\").\n\nThis can differ from the host provided to the client if the `hostPrefix`\nmember of the `endpoint` trait is set, for instance." + } + }, + "queryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of the expected serialized query string parameters.\n\nEach element in the list is a query string key value pair\nthat starts with the query string parameter name optionally\nfollowed by \"=\", optionally followed by the query string\nparameter value. For example, \"foo=bar\", \"foo=\", and \"foo\"\nare all valid values. The query string parameter name and\nthe value MUST appear in the format in which it is expected\nto be sent over the wire; if a key or value needs to be\npercent-encoded, then it MUST appear percent-encoded in this list.\n\nA serialized HTTP request is not in compliance with the protocol\nif any query string parameter defined in `queryParams` is not\ndefined in the request or if the value of a query string parameter\nin the request differs from the expected value.\n\n`queryParams` applies no constraints on additional query parameters." + } + }, + "forbidQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that must not appear in the\nserialized HTTP request.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + }, + "requireQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that MUST appear in the\nserialized request URI, but no assertion is made on the value.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP request members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpRequestMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpRequestTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's\npossible that specific authentication schemes might influence\nthe serialization logic of an HTTP request.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the input parameters used to generated the HTTP request.\n\nThese parameters MUST be compatible with the input of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "code": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Defines the HTTP response code.", + "smithy.api#range": { + "min": 100, + "max": 599 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP response members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpResponseMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpResponseTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The shape ID of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's possible\nthat specific authentication schemes might influence the serialization\nlogic of an HTTP response.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the output parameters deserialized from the HTTP response.\n\nThese parameters MUST be compatible with the output of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nresponse. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + }, + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyStringList": { + "type": "list", + "member": { + "target": "smithy.test#NonEmptyString" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + } + } +} diff --git a/scripts/codegen-output-py/models/rpcv2-json.json b/scripts/codegen-output-py/models/rpcv2-json.json new file mode 100644 index 000000000..0f24d8cd8 --- /dev/null +++ b/scripts/codegen-output-py/models/rpcv2-json.json @@ -0,0 +1,1544 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.glacier" + }, + { + "id": "HttpMethodSemantics", + "namespace": "com.amazonaws.s3" + }, + { + "id": "EnumTrait", + "namespace": "com.amazonaws.s3" + }, + { + "id": "UnreferencedShape", + "namespace": "aws.protocoltests.config", + "reason": "These shapes are intended to be used to validate vendorParams in\nprotocol tests, so they naturally will not be connected to a service.\n" + }, + { + "id": "DeprecatedTrait", + "namespace": "*", + "reason": "Some of the AWS protocols make use of deprecated traits, and some are\nthemselves deprecated traits. As this package is intended to test those\nprotocols, the warnings should be suppressed." + } + ], + "validators": [ + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the AWS protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "aws.protocoltests.json10", + "aws.protocoltests.json", + "aws.protocoltests.query", + "aws.protocoltests.ec2", + "aws.protocoltests.restjson.validation", + "aws.protocoltests.restjson", + "aws.protocoltests.restxml", + "aws.protocoltests.restxml.xmlns", + "com.amazonaws.apigateway", + "com.amazonaws.glacier", + "com.amazonaws.machinelearning", + "com.amazonaws.s3" + ], + "severity": "WARNING" + }, + { + "configuration": { + "selector": "operation :not(< service)" + }, + "id": "UnboundTestOperation", + "message": "This operation in the Smithy protocol tests is not bound to a service.", + "name": "EmitEachSelector", + "namespaces": [ + "smithy.protocoltests.rpcv2Cbor", + "smithy.protocoltests.rpcv2Json" + ], + "severity": "WARNING" + } + ] + }, + "shapes": { + "smithy.framework#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A summary of the validation failure.", + "smithy.api#required": {} + } + }, + "fieldList": { + "target": "smithy.framework#ValidationExceptionFieldList", + "traits": { + "smithy.api#documentation": "A list of specific failures encountered while validating the input.\nA member can appear in this list more than once if it failed to satisfy multiple constraints." + } + } + }, + "traits": { + "smithy.api#documentation": "A standard error for input validation failures.\nThis should be thrown by services when a member of the input structure\nfalls outside of the modeled or documented constraints.", + "smithy.api#error": "client" + } + }, + "smithy.framework#ValidationExceptionField": { + "type": "structure", + "members": { + "path": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.", + "smithy.api#required": {} + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A detailed description of the validation failure.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Describes one specific validation failure for an input member." + } + }, + "smithy.framework#ValidationExceptionFieldList": { + "type": "list", + "member": { + "target": "smithy.framework#ValidationExceptionField" + } + }, + "smithy.protocols#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "A list of String shapes.", + "smithy.api#private": {} + } + }, + "smithy.protocols#rpcv2Json": { + "type": "structure", + "members": { + "http": { + "target": "smithy.protocols#StringList", + "traits": { + "smithy.api#documentation": "Priority ordered list of supported HTTP protocol versions." + } + }, + "eventStreamHttp": { + "target": "smithy.protocols#StringList", + "traits": { + "smithy.api#documentation": "Priority ordered list of supported HTTP protocol versions\nthat are required when using event streams." + } + } + }, + "traits": { + "smithy.api#documentation": "An RPC-based protocol that serializes JSON payloads.", + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel", + "smithy.api#httpError", + "smithy.api#requestCompression" + ] + }, + "smithy.api#trait": { + "selector": "service" + } + } + }, + "smithy.protocoltests.rpcv2Json#BigDecimalOperation": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Json#BigDecimalStructure" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#BigDecimalStructure" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Json#BigDecimalStructure": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#BigDecimal" + } + } + }, + "smithy.protocoltests.rpcv2Json#BigIntegerOperation": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Json#BigIntegerStructure" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#BigIntegerStructure" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Json#BigIntegerStructure": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#BigInteger" + } + } + }, + "smithy.protocoltests.rpcv2Json#ClientOptionalDefaults": { + "type": "structure", + "members": { + "member": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#default": 0 + } + } + } + }, + "smithy.protocoltests.rpcv2Json#ComplexError": { + "type": "structure", + "members": { + "TopLevel": { + "target": "smithy.api#String" + }, + "Nested": { + "target": "smithy.protocoltests.rpcv2Json#ComplexNestedErrorData" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when a request is invalid.", + "smithy.api#error": "client" + } + }, + "smithy.protocoltests.rpcv2Json#ComplexNestedErrorData": { + "type": "structure", + "members": { + "Foo": { + "target": "smithy.api#String" + } + } + }, + "smithy.protocoltests.rpcv2Json#Defaults": { + "type": "structure", + "mixins": [ + { + "target": "smithy.protocoltests.rpcv2Json#DefaultsMixin" + } + ], + "members": {} + }, + "smithy.protocoltests.rpcv2Json#DefaultsMixin": { + "type": "structure", + "members": { + "defaultString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "hi" + } + }, + "defaultBoolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#default": true + } + }, + "defaultList": { + "target": "smithy.protocoltests.rpcv2Json#TestStringList", + "traits": { + "smithy.api#default": [] + } + }, + "defaultTimestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#default": 0 + } + }, + "defaultBlob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#default": "YWJj" + } + }, + "defaultByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#default": 1 + } + }, + "defaultShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#default": 1 + } + }, + "defaultInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 10 + } + }, + "defaultLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#default": 100 + } + }, + "defaultFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#default": 1.0 + } + }, + "defaultDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#default": 1.0 + } + }, + "defaultMap": { + "target": "smithy.protocoltests.rpcv2Json#TestStringMap", + "traits": { + "smithy.api#default": {} + } + }, + "defaultEnum": { + "target": "smithy.protocoltests.rpcv2Json#TestEnum", + "traits": { + "smithy.api#default": "FOO" + } + }, + "defaultIntEnum": { + "target": "smithy.protocoltests.rpcv2Json#TestIntEnum", + "traits": { + "smithy.api#default": 1 + } + }, + "emptyString": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "" + } + }, + "falseBoolean": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#default": false + } + }, + "emptyBlob": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#default": "" + } + }, + "zeroByte": { + "target": "smithy.api#Byte", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroShort": { + "target": "smithy.api#Short", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroInteger": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroLong": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#default": 0 + } + }, + "zeroFloat": { + "target": "smithy.api#Float", + "traits": { + "smithy.api#default": 0.0 + } + }, + "zeroDouble": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#default": 0.0 + } + } + }, + "traits": { + "smithy.api#mixin": {} + } + }, + "smithy.protocoltests.rpcv2Json#DenseBooleanMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Boolean" + } + }, + "smithy.protocoltests.rpcv2Json#DenseNumberMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Integer" + } + }, + "smithy.protocoltests.rpcv2Json#DenseSetMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.protocoltests.shared#StringSet" + } + }, + "smithy.protocoltests.rpcv2Json#DenseStringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "smithy.protocoltests.rpcv2Json#DenseStructMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.protocoltests.shared#GreetingStruct" + } + }, + "smithy.protocoltests.rpcv2Json#EmptyInputOutput": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Json#EmptyStructure" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#EmptyStructure" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Json#EmptyStructure": { + "type": "structure", + "members": {} + }, + "smithy.protocoltests.rpcv2Json#FractionalSeconds": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#FractionalSecondsOutput" + }, + "traits": { + "smithy.api#tags": [ + "client-only" + ] + } + }, + "smithy.protocoltests.rpcv2Json#FractionalSecondsOutput": { + "type": "structure", + "members": { + "datetime": { + "target": "smithy.api#Timestamp" + } + } + }, + "smithy.protocoltests.rpcv2Json#GreetingWithErrors": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#GreetingWithErrorsOutput" + }, + "errors": [ + { + "target": "smithy.protocoltests.rpcv2Json#ComplexError" + }, + { + "target": "smithy.protocoltests.rpcv2Json#InvalidGreeting" + } + ], + "traits": { + "smithy.api#documentation": "This operation has three possible return values:\n\n1. A successful response in the form of GreetingWithErrorsOutput\n2. An InvalidGreeting error.\n3. A ComplexError error.\n\nImplementations must be able to successfully take a response and\nproperly deserialize successful and error responses.", + "smithy.api#idempotent": {} + } + }, + "smithy.protocoltests.rpcv2Json#GreetingWithErrorsOutput": { + "type": "structure", + "members": { + "greeting": { + "target": "smithy.api#String" + } + } + }, + "smithy.protocoltests.rpcv2Json#InvalidGreeting": { + "type": "structure", + "members": { + "Message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "This error is thrown when an invalid greeting value is provided.", + "smithy.api#error": "client" + } + }, + "smithy.protocoltests.rpcv2Json#NoInputOutput": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Json#OperationWithDefaults": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Json#OperationWithDefaultsInput" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#OperationWithDefaultsOutput" + }, + "errors": [ + { + "target": "smithy.framework#ValidationException" + } + ], + "traits": {} + }, + "smithy.protocoltests.rpcv2Json#OperationWithDefaultsInput": { + "type": "structure", + "members": { + "defaults": { + "target": "smithy.protocoltests.rpcv2Json#Defaults" + }, + "clientOptionalDefaults": { + "target": "smithy.protocoltests.rpcv2Json#ClientOptionalDefaults" + }, + "topLevelDefault": { + "target": "smithy.api#String", + "traits": { + "smithy.api#default": "hi" + } + }, + "otherTopLevelDefault": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#default": 0 + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "smithy.protocoltests.rpcv2Json#OperationWithDefaultsOutput": { + "type": "structure", + "mixins": [ + { + "target": "smithy.protocoltests.rpcv2Json#DefaultsMixin" + } + ], + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "smithy.protocoltests.rpcv2Json#OptionalInputOutput": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Json#SimpleStructure" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#SimpleStructure" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Json#RecursiveShapes": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Json#RecursiveShapesInputOutput" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#RecursiveShapesInputOutput" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Json#RecursiveShapesInputOutput": { + "type": "structure", + "members": { + "nested": { + "target": "smithy.protocoltests.rpcv2Json#RecursiveShapesInputOutputNested1" + } + } + }, + "smithy.protocoltests.rpcv2Json#RecursiveShapesInputOutputNested1": { + "type": "structure", + "members": { + "foo": { + "target": "smithy.api#String" + }, + "nested": { + "target": "smithy.protocoltests.rpcv2Json#RecursiveShapesInputOutputNested2" + } + } + }, + "smithy.protocoltests.rpcv2Json#RecursiveShapesInputOutputNested2": { + "type": "structure", + "members": { + "bar": { + "target": "smithy.api#String" + }, + "recursiveMember": { + "target": "smithy.protocoltests.rpcv2Json#RecursiveShapesInputOutputNested1" + } + } + }, + "smithy.protocoltests.rpcv2Json#RpcV2JsonDenseMaps": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Json#RpcV2JsonDenseMapsInputOutput" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#RpcV2JsonDenseMapsInputOutput" + }, + "errors": [ + { + "target": "smithy.framework#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "The example tests basic map serialization." + } + }, + "smithy.protocoltests.rpcv2Json#RpcV2JsonDenseMapsInputOutput": { + "type": "structure", + "members": { + "denseStructMap": { + "target": "smithy.protocoltests.rpcv2Json#DenseStructMap" + }, + "denseNumberMap": { + "target": "smithy.protocoltests.rpcv2Json#DenseNumberMap" + }, + "denseBooleanMap": { + "target": "smithy.protocoltests.rpcv2Json#DenseBooleanMap" + }, + "denseStringMap": { + "target": "smithy.protocoltests.rpcv2Json#DenseStringMap" + }, + "denseSetMap": { + "target": "smithy.protocoltests.rpcv2Json#DenseSetMap" + } + } + }, + "smithy.protocoltests.rpcv2Json#RpcV2JsonListInputOutput": { + "type": "structure", + "members": { + "stringList": { + "target": "smithy.protocoltests.shared#StringList" + }, + "stringSet": { + "target": "smithy.protocoltests.shared#StringSet" + }, + "integerList": { + "target": "smithy.protocoltests.shared#IntegerList" + }, + "booleanList": { + "target": "smithy.protocoltests.shared#BooleanList" + }, + "timestampList": { + "target": "smithy.protocoltests.shared#TimestampList" + }, + "enumList": { + "target": "smithy.protocoltests.shared#FooEnumList" + }, + "intEnumList": { + "target": "smithy.protocoltests.shared#IntegerEnumList" + }, + "nestedStringList": { + "target": "smithy.protocoltests.shared#NestedStringList" + }, + "structureList": { + "target": "smithy.protocoltests.rpcv2Json#StructureList" + }, + "blobList": { + "target": "smithy.protocoltests.shared#BlobList" + } + } + }, + "smithy.protocoltests.rpcv2Json#RpcV2JsonLists": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Json#RpcV2JsonListInputOutput" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#RpcV2JsonListInputOutput" + }, + "errors": [ + { + "target": "smithy.framework#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "This test case serializes JSON lists for the following cases for both\ninput and output:\n\n1. Normal lists.\n2. Normal sets.\n3. Lists of lists.\n4. Lists of structures.", + "smithy.api#idempotent": {} + } + }, + "smithy.protocoltests.rpcv2Json#RpcV2JsonProtocol": { + "type": "service", + "version": "2020-07-14", + "operations": [ + { + "target": "smithy.protocoltests.rpcv2Json#BigDecimalOperation" + }, + { + "target": "smithy.protocoltests.rpcv2Json#BigIntegerOperation" + }, + { + "target": "smithy.protocoltests.rpcv2Json#EmptyInputOutput" + }, + { + "target": "smithy.protocoltests.rpcv2Json#FractionalSeconds" + }, + { + "target": "smithy.protocoltests.rpcv2Json#GreetingWithErrors" + }, + { + "target": "smithy.protocoltests.rpcv2Json#NoInputOutput" + }, + { + "target": "smithy.protocoltests.rpcv2Json#OperationWithDefaults" + }, + { + "target": "smithy.protocoltests.rpcv2Json#OptionalInputOutput" + }, + { + "target": "smithy.protocoltests.rpcv2Json#RecursiveShapes" + }, + { + "target": "smithy.protocoltests.rpcv2Json#RpcV2JsonDenseMaps" + }, + { + "target": "smithy.protocoltests.rpcv2Json#RpcV2JsonLists" + }, + { + "target": "smithy.protocoltests.rpcv2Json#RpcV2JsonSparseMaps" + }, + { + "target": "smithy.protocoltests.rpcv2Json#SimpleScalarProperties" + }, + { + "target": "smithy.protocoltests.rpcv2Json#SparseNullsOperation" + }, + { + "target": "smithy.protocoltests.rpcv2Json#TimestampFormatIgnored" + } + ], + "traits": { + "smithy.api#title": "RpcV2 JSON Protocol Service", + "smithy.protocols#rpcv2Json": {} + } + }, + "smithy.protocoltests.rpcv2Json#RpcV2JsonSparseMaps": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Json#RpcV2JsonSparseMapsInputOutput" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#RpcV2JsonSparseMapsInputOutput" + }, + "errors": [ + { + "target": "smithy.framework#ValidationException" + } + ], + "traits": {} + }, + "smithy.protocoltests.rpcv2Json#RpcV2JsonSparseMapsInputOutput": { + "type": "structure", + "members": { + "sparseStructMap": { + "target": "smithy.protocoltests.rpcv2Json#SparseStructMap" + }, + "sparseNumberMap": { + "target": "smithy.protocoltests.rpcv2Json#SparseNumberMap" + }, + "sparseBooleanMap": { + "target": "smithy.protocoltests.rpcv2Json#SparseBooleanMap" + }, + "sparseStringMap": { + "target": "smithy.protocoltests.shared#SparseStringMap" + }, + "sparseSetMap": { + "target": "smithy.protocoltests.rpcv2Json#SparseSetMap" + } + } + }, + "smithy.protocoltests.rpcv2Json#SimpleScalarProperties": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Json#SimpleScalarStructure" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#SimpleScalarStructure" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Json#SimpleScalarStructure": { + "type": "structure", + "members": { + "trueBooleanValue": { + "target": "smithy.api#Boolean" + }, + "falseBooleanValue": { + "target": "smithy.api#Boolean" + }, + "byteValue": { + "target": "smithy.api#Byte" + }, + "doubleValue": { + "target": "smithy.api#Double" + }, + "floatValue": { + "target": "smithy.api#Float" + }, + "integerValue": { + "target": "smithy.api#Integer" + }, + "longValue": { + "target": "smithy.api#Long" + }, + "shortValue": { + "target": "smithy.api#Short" + }, + "stringValue": { + "target": "smithy.api#String" + }, + "blobValue": { + "target": "smithy.api#Blob" + } + } + }, + "smithy.protocoltests.rpcv2Json#SimpleStructure": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String" + } + } + }, + "smithy.protocoltests.rpcv2Json#SparseBooleanMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Boolean" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "smithy.protocoltests.rpcv2Json#SparseNullsOperation": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Json#SparseNullsOperationInputOutput" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#SparseNullsOperationInputOutput" + }, + "traits": {} + }, + "smithy.protocoltests.rpcv2Json#SparseNullsOperationInputOutput": { + "type": "structure", + "members": { + "sparseStringList": { + "target": "smithy.protocoltests.shared#SparseStringList" + }, + "sparseStringMap": { + "target": "smithy.protocoltests.shared#SparseStringMap" + } + } + }, + "smithy.protocoltests.rpcv2Json#SparseNumberMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "smithy.protocoltests.rpcv2Json#SparseSetMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.protocoltests.shared#StringSet" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "smithy.protocoltests.rpcv2Json#SparseStructMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.protocoltests.shared#GreetingStruct" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "smithy.protocoltests.rpcv2Json#StructureList": { + "type": "list", + "member": { + "target": "smithy.protocoltests.rpcv2Json#StructureListMember" + } + }, + "smithy.protocoltests.rpcv2Json#StructureListMember": { + "type": "structure", + "members": { + "a": { + "target": "smithy.api#String" + }, + "b": { + "target": "smithy.api#String" + } + } + }, + "smithy.protocoltests.rpcv2Json#TestEnum": { + "type": "enum", + "members": { + "FOO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FOO" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BAR" + } + }, + "BAZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BAZ" + } + } + } + }, + "smithy.protocoltests.rpcv2Json#TestIntEnum": { + "type": "intEnum", + "members": { + "ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 1 + } + }, + "TWO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 2 + } + } + } + }, + "smithy.protocoltests.rpcv2Json#TestStringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "smithy.protocoltests.rpcv2Json#TestStringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "smithy.protocoltests.rpcv2Json#TimestampFormatIgnored": { + "type": "operation", + "input": { + "target": "smithy.protocoltests.rpcv2Json#TimestampFormatIgnoredIO" + }, + "output": { + "target": "smithy.protocoltests.rpcv2Json#TimestampFormatIgnoredIO" + }, + "traits": { + "smithy.api#documentation": "This operation tests that the rpcv2Json protocol always uses epoch-seconds\nfor timestamp serialization, regardless of the `timestampFormat` trait.\nMembers targeting `DateTime` (date-time), `HttpDate` (http-date), and\n`EpochSeconds` (epoch-seconds) must all serialize as JSON numbers." + } + }, + "smithy.protocoltests.rpcv2Json#TimestampFormatIgnoredIO": { + "type": "structure", + "members": { + "dateTime": { + "target": "smithy.protocoltests.shared#DateTime" + }, + "httpDate": { + "target": "smithy.protocoltests.shared#HttpDate" + }, + "epochSeconds": { + "target": "smithy.protocoltests.shared#EpochSeconds" + }, + "normal": { + "target": "smithy.api#Timestamp" + } + } + }, + "smithy.protocoltests.shared#BlobList": { + "type": "list", + "member": { + "target": "smithy.api#Blob" + } + }, + "smithy.protocoltests.shared#BooleanList": { + "type": "list", + "member": { + "target": "smithy.api#Boolean" + } + }, + "smithy.protocoltests.shared#DateTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "smithy.protocoltests.shared#EpochSeconds": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "epoch-seconds" + } + }, + "smithy.protocoltests.shared#FooEnum": { + "type": "enum", + "members": { + "FOO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Foo" + } + }, + "BAZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Baz" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Bar" + } + }, + "ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "1" + } + }, + "ZERO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "0" + } + } + } + }, + "smithy.protocoltests.shared#FooEnumList": { + "type": "list", + "member": { + "target": "smithy.protocoltests.shared#FooEnum" + } + }, + "smithy.protocoltests.shared#GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "target": "smithy.api#String" + } + } + }, + "smithy.protocoltests.shared#HttpDate": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "http-date" + } + }, + "smithy.protocoltests.shared#IntegerEnum": { + "type": "intEnum", + "members": { + "A": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 1 + } + }, + "B": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 2 + } + }, + "C": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": 3 + } + } + } + }, + "smithy.protocoltests.shared#IntegerEnumList": { + "type": "list", + "member": { + "target": "smithy.protocoltests.shared#IntegerEnum" + } + }, + "smithy.protocoltests.shared#IntegerList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + } + }, + "smithy.protocoltests.shared#NestedStringList": { + "type": "list", + "member": { + "target": "smithy.protocoltests.shared#StringList" + }, + "traits": { + "smithy.api#documentation": "A list of lists of strings." + } + }, + "smithy.protocoltests.shared#SparseStringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "smithy.protocoltests.shared#SparseStringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#sparse": {} + } + }, + "smithy.protocoltests.shared#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "smithy.protocoltests.shared#StringSet": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#uniqueItems": {} + } + }, + "smithy.protocoltests.shared#TimestampList": { + "type": "list", + "member": { + "target": "smithy.api#Timestamp" + } + }, + "smithy.test#AppliesTo": { + "type": "enum", + "members": { + "CLIENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to client implementations.", + "smithy.api#enumValue": "client" + } + }, + "SERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#documentation": "The test only applies to server implementations.", + "smithy.api#enumValue": "server" + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpMessageMixin": { + "type": "structure", + "members": { + "headers": { + "target": "smithy.test#StringMap", + "traits": { + "smithy.api#documentation": "Defines a map of expected HTTP headers.\n\nHeaders that are not listed in this map are ignored unless they are\nexplicitly forbidden through `forbidHeaders`." + } + }, + "forbidHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must not appear in the serialized\nHTTP request." + } + }, + "requireHeaders": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of header field names that must appear in the serialized\nHTTP message, but no assertion is made on the value.\n\nHeaders listed in `headers` do not need to appear in this list." + } + }, + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected HTTP message body.\n\nIf no request body is defined, then no assertions are made about\nthe body of the message." + } + }, + "bodyMediaType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The media type of the `body`.\n\nThis is used to help test runners to parse and validate the expected\ndata against generated data." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP message members and supporting protocol test members,\nsuitable for both requests and responses.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "method": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expected serialized HTTP request method.", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "uri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request-target of the HTTP request, not including\nthe query string (for example, \"/foo/bar\").", + "smithy.api#length": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint provided to the client, not including the path\nor scheme (for example, \"example.com\")." + } + }, + "resolvedHost": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The host / endpoint that the client should send to, not including\nthe path or scheme (for example, \"prefix.example.com\").\n\nThis can differ from the host provided to the client if the `hostPrefix`\nmember of the `endpoint` trait is set, for instance." + } + }, + "queryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of the expected serialized query string parameters.\n\nEach element in the list is a query string key value pair\nthat starts with the query string parameter name optionally\nfollowed by \"=\", optionally followed by the query string\nparameter value. For example, \"foo=bar\", \"foo=\", and \"foo\"\nare all valid values. The query string parameter name and\nthe value MUST appear in the format in which it is expected\nto be sent over the wire; if a key or value needs to be\npercent-encoded, then it MUST appear percent-encoded in this list.\n\nA serialized HTTP request is not in compliance with the protocol\nif any query string parameter defined in `queryParams` is not\ndefined in the request or if the value of a query string parameter\nin the request differs from the expected value.\n\n`queryParams` applies no constraints on additional query parameters." + } + }, + "forbidQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that must not appear in the\nserialized HTTP request.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + }, + "requireQueryParams": { + "target": "smithy.test#StringList", + "traits": { + "smithy.api#documentation": "A list of query string parameter names that MUST appear in the\nserialized request URI, but no assertion is made on the value.\n\nEach value MUST appear in the format in which it is sent over the\nwire; if a key needs to be percent-encoded, then it MUST appear\npercent-encoded in this list." + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP request members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpRequestTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpRequestMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpRequestTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's\npossible that specific authentication schemes might influence\nthe serialization logic of an HTTP request.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the input parameters used to generated the HTTP request.\n\nThese parameters MUST be compatible with the input of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nrequest. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseMixin": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpMessageMixin" + } + ], + "members": { + "code": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Defines the HTTP response code.", + "smithy.api#range": { + "min": 100, + "max": 599 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A mixin that adds HTTP response members and supporting protocol test members.", + "smithy.api#mixin": {}, + "smithy.api#private": {} + } + }, + "smithy.test#HttpResponseTestCase": { + "type": "structure", + "mixins": [ + { + "target": "smithy.test#HttpResponseMixin" + } + ], + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the test case. This identifier can be used by\nprotocol test implementations to filter out unsupported test\ncases by ID, to generate test case names, etc. The provided `id`\nMUST match Smithy's `identifier` ABNF. No two `httpResponseTests`\ntest cases can share the same ID.", + "smithy.api#pattern": "^[A-Za-z_][A-Za-z0-9_]+$", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The shape ID of the protocol to test.", + "smithy.api#idRef": { + "selector": "[trait|protocolDefinition]", + "failWhenMissing": true + }, + "smithy.api#required": {} + } + }, + "authScheme": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The optional authentication scheme shape ID to assume. It's possible\nthat specific authentication schemes might influence the serialization\nlogic of an HTTP response.", + "smithy.api#idRef": { + "selector": "[trait|authDefinition]", + "failWhenMissing": true + } + } + }, + "params": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines the output parameters deserialized from the HTTP response.\n\nThese parameters MUST be compatible with the output of the operation." + } + }, + "vendorParams": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Defines vendor-specific parameters that are used to influence the\nresponse. For example, some vendors might utilize environment\nvariables, configuration files on disk, or other means to influence\nthe serialization formats used by clients or servers.\n\nIf a `vendorParamsShape` is set, these parameters MUST be compatible\nwith that shape's definition." + } + }, + "vendorParamsShape": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A shape to be used to validate the `vendorParams` member contents.\n\nIf set, the parameters in `vendorParams` MUST be compatible with this\nshape's definition.", + "smithy.api#idRef": { + "failWhenMissing": true + } + } + }, + "documentation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the test and what is being asserted." + } + }, + "tags": { + "target": "smithy.test#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "Applies a list of tags to the test." + } + }, + "appliesTo": { + "target": "smithy.test#AppliesTo", + "traits": { + "smithy.api#documentation": "Indicates that the test case is only to be implemented by \"client\" or\n\"server\" implementations. This property is useful for identifying and\ntesting edge cases of clients and servers that are impossible or\nundesirable to test in *both* client and server implementations." + } + } + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + }, + "smithy.api#private": {} + } + }, + "smithy.test#NonEmptyStringList": { + "type": "list", + "member": { + "target": "smithy.test#NonEmptyString" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + }, + "smithy.test#StringMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + } + } +} diff --git a/scripts/codegen-output-py/projections.json b/scripts/codegen-output-py/projections.json new file mode 100644 index 000000000..8837ca265 --- /dev/null +++ b/scripts/codegen-output-py/projections.json @@ -0,0 +1,114 @@ +{ + "aws-json-1-0": { + "description": "Native Python types for the aws-json-1-0 projection", + "model": "models/aws-json-1-0.json", + "package": "awsjson10", + "service": "aws.protocoltests.json10#JsonRpc10", + "version": "0.0.1" + }, + "aws-json-1-1": { + "description": "Native Python types for the aws-json-1-1 projection", + "model": "models/aws-json-1-1.json", + "package": "awsjson11", + "service": "aws.protocoltests.json#JsonProtocol", + "version": "0.0.1" + }, + "aws-query": { + "description": "Native Python types for the aws-query projection", + "model": "models/aws-query.json", + "package": "awsquery", + "service": "aws.protocoltests.query#AwsQuery", + "version": "0.0.1" + }, + "ec2-query": { + "description": "Native Python types for the ec2-query projection", + "model": "models/ec2-query.json", + "package": "ec2query", + "service": "aws.protocoltests.ec2#AwsEc2", + "version": "0.0.1" + }, + "my-handwritten-json-model": { + "description": "Native Python types for the my-handwritten-json-model projection", + "model": "models/my-handwritten-json-model.json", + "package": "my_handwritten_json_model", + "service": "smithy.python.tests.handwritten.json#MyHandwrittenJsonModel", + "version": "0.0.1" + }, + "my-handwritten-model": { + "description": "Native Python types for the my-handwritten-model projection", + "model": "models/my-handwritten-model.json", + "package": "my_handwritten_model", + "service": "smithy.python.tests.handwritten#MyHandwrittenModel", + "version": "0.0.1" + }, + "non-query-compatible-rpcv2-cbor": { + "description": "Native Python types for the non-query-compatible-rpcv2-cbor projection", + "model": "models/non-query-compatible-rpcv2-cbor.json", + "package": "nonquerycompatiblerpcv2cbor", + "service": "aws.protocoltests.rpcv2cbor#NonQueryCompatibleRpcV2Protocol", + "version": "0.0.1" + }, + "partitioned-types": { + "description": "Native schema and model stub partition stress fixture", + "model": "models/partitioned-types.json", + "package": "partitioned_types", + "service": "example#ExampleService", + "version": "1.0.0" + }, + "query-compatible-aws-json-1-0": { + "description": "Native Python types for the query-compatible-aws-json-1-0 projection", + "model": "models/query-compatible-aws-json-1-0.json", + "package": "querycompatibleawsjson10", + "service": "aws.protocoltests.json10#QueryCompatibleJsonRpc10", + "version": "0.0.1" + }, + "query-compatible-rpcv2-cbor": { + "description": "Native Python types for the query-compatible-rpcv2-cbor projection", + "model": "models/query-compatible-rpcv2-cbor.json", + "package": "querycompatiblerpcv2cbor", + "service": "aws.protocoltests.rpcv2cbor#QueryCompatibleRpcV2Protocol", + "version": "0.0.1" + }, + "rest-json-1": { + "description": "Native Python types for the rest-json-1 projection", + "model": "models/rest-json-1.json", + "package": "restjson", + "service": "aws.protocoltests.restjson#RestJson", + "version": "0.0.1" + }, + "rest-xml": { + "description": "Native Python types for the rest-xml projection", + "model": "models/rest-xml.json", + "package": "restxml", + "service": "aws.protocoltests.restxml#RestXml", + "version": "0.0.1" + }, + "rest-xml-with-namespace": { + "description": "Native Python types for the rest-xml-with-namespace projection", + "model": "models/rest-xml-with-namespace.json", + "package": "restxmlwithnamespace", + "service": "aws.protocoltests.restxml.xmlns#RestXmlWithNamespace", + "version": "0.0.1" + }, + "rpcv2-cbor": { + "description": "Native Python types for the rpcv2-cbor projection", + "model": "models/rpcv2-cbor.json", + "package": "rpcv2cbor", + "service": "smithy.protocoltests.rpcv2Cbor#RpcV2Protocol", + "version": "0.0.1" + }, + "rpcv2-json": { + "description": "Native Python types for the rpcv2-json projection", + "model": "models/rpcv2-json.json", + "package": "rpcv2json", + "service": "smithy.protocoltests.rpcv2Json#RpcV2JsonProtocol", + "version": "0.0.1" + }, + "types": { + "description": "Example Python codegen output", + "model": "model.json", + "package": "example_types", + "service": "example#ExampleService", + "version": "1.0.0" + } +} diff --git a/scripts/codegen-output-py/pyrightconfig.json b/scripts/codegen-output-py/pyrightconfig.json new file mode 100644 index 000000000..fc16a0db0 --- /dev/null +++ b/scripts/codegen-output-py/pyrightconfig.json @@ -0,0 +1,28 @@ +{ + "typeCheckingMode": "strict", + "enableExperimentalFeatures": true, + "include": [ + "../../codegen-output-py", + "generate.py", + "refresh_models.py", + "tests/_typecheck.py" + ], + "extraPaths": [ + "../../codegen-output-py/aws-json-1-0/src", + "../../codegen-output-py/aws-json-1-1/src", + "../../codegen-output-py/aws-query/src", + "../../codegen-output-py/ec2-query/src", + "../../codegen-output-py/my-handwritten-json-model/src", + "../../codegen-output-py/my-handwritten-model/src", + "../../codegen-output-py/non-query-compatible-rpcv2-cbor/src", + "../../codegen-output-py/partitioned-types/src", + "../../codegen-output-py/query-compatible-aws-json-1-0/src", + "../../codegen-output-py/query-compatible-rpcv2-cbor/src", + "../../codegen-output-py/rest-json-1/src", + "../../codegen-output-py/rest-xml/src", + "../../codegen-output-py/rest-xml-with-namespace/src", + "../../codegen-output-py/rpcv2-cbor/src", + "../../codegen-output-py/rpcv2-json/src", + "../../codegen-output-py/types/src" + ] +} diff --git a/scripts/codegen-output-py/refresh_models.py b/scripts/codegen-output-py/refresh_models.py new file mode 100644 index 000000000..d956c9f96 --- /dev/null +++ b/scripts/codegen-output-py/refresh_models.py @@ -0,0 +1,114 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 +"""Refresh checked-in model inputs from a directory of assembled JSON ASTs. + +The input directory contains /model/model.json. This maintenance +command does not assemble Smithy IDL or invoke a build system. +""" + +import argparse +import hashlib +import json +from pathlib import Path +from typing import Any + +_ROOT = Path(__file__).resolve().parents[2] +_INPUTS = Path(__file__).parent +_VECTOR_TRAITS = ("smithy.test#httpRequestTests", "smithy.test#httpResponseTests") + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("models", type=Path, help="Directory of assembled projections.") + args = parser.parse_args() + build = json.loads((_ROOT / "codegen/protocol-test/smithy-build.json").read_text()) + projections: dict[str, Any] = { + "types": { + "model": "model.json", + "service": "example#ExampleService", + "package": "example_types", + "version": "1.0.0", + "description": "Example Python codegen output", + }, + "partitioned-types": { + "model": "models/partitioned-types.json", + "service": "example#ExampleService", + "package": "partitioned_types", + "version": "1.0.0", + "description": "Native schema and model stub partition stress fixture", + }, + } + provenance: dict[str, Any] = {} + destination = _INPUTS / "models" + destination.mkdir(exist_ok=True) + (destination / "partitioned-types.json").write_text( + json.dumps(_partition_model(), indent=2) + "\n" + ) + for name, projection in sorted(build["projections"].items()): + settings = projection["plugins"]["python-client-codegen"] + source = (args.models / name / "model/model.json").read_bytes() + model = json.loads(source) + # Protocol vectors exercise the client artifact; model traits, documentation, + # operation references, and member order remain intact. + _remove_protocol_vectors(model) + content = json.dumps(model, indent=2) + "\n" + (destination / f"{name}.json").write_text(content) + projections[name] = { + "model": f"models/{name}.json", + "service": settings["service"], + "package": settings["module"], + "version": settings["moduleVersion"], + "description": f"Native Python types for the {name} projection", + } + provenance[name] = { + "assembled_sha256": hashlib.sha256(source).hexdigest(), + "fixture_sha256": hashlib.sha256(content.encode()).hexdigest(), + } + for name, data in ( + ("projections.json", projections), + ("models/provenance.json", provenance), + ): + (_INPUTS / name).write_text(json.dumps(data, indent=2, sort_keys=True) + "\n") + + +def _remove_protocol_vectors(model: dict[str, Any]) -> None: + shapes: dict[str, dict[str, Any]] = model["shapes"] + for trait in _VECTOR_TRAITS: + shapes.pop(trait, None) + for shape in shapes.values(): + _remove_vector_traits(shape) + members: dict[str, dict[str, Any]] = shape.get("members", {}) + for member in members.values(): + _remove_vector_traits(member) + for key in ("member", "key", "value"): + if key in shape: + _remove_vector_traits(shape[key]) + + +def _remove_vector_traits(node: dict[str, Any]) -> None: + traits: dict[str, Any] = node.get("traits", {}) + for trait in _VECTOR_TRAITS: + traits.pop(trait, None) + + +def _partition_model() -> dict[str, Any]: + model = json.loads((_INPUTS / "model.json").read_text()) + shapes = model["shapes"] + shapes["example#GetExampleInput"]["members"]["partitioned"] = { + "target": "example#PartitionItem000" + } + # Cross partition references, plus a recursive pair kept in one schema group. + for index in range(260): + next_index = index + 1 if index < 259 else 258 + shapes[f"example#PartitionItem{index:03d}"] = { + "type": "structure", + "members": { + "value": {"target": "smithy.api#String"}, + "next": {"target": f"example#PartitionItem{next_index:03d}"}, + }, + } + return model + + +if __name__ == "__main__": + main() diff --git a/scripts/codegen-output-py/tests/_typecheck.py b/scripts/codegen-output-py/tests/_typecheck.py new file mode 100644 index 000000000..4b4298dbe --- /dev/null +++ b/scripts/codegen-output-py/tests/_typecheck.py @@ -0,0 +1,82 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 +"""Consumer imports checked against the native stubs, including partition facades.""" + +from typing import Literal, assert_type + +from awsjson10.models import FooEnum as Json10Enum +from awsjson11.models import FooEnum as Json11Enum +from awsquery.models import GreetingStruct as QueryGreeting +from ec2query.models import GreetingStruct as EC2Greeting +from example_types.models import ( + Code, + ExampleValue, + ExampleValueEmpty, + GetExampleOutput, + RenamedExample, + Status, + Unit, +) +from my_handwritten_json_model.models import Alpha as JSONEvent +from my_handwritten_model.models import ( + Alpha, + Gamma, + GammaPayload, + TradeEvents, + TradeEventsAlpha, + TradeEventsBeta, +) +from my_handwritten_model.models import ( + Unit as EventUnit, +) +from nonquerycompatiblerpcv2cbor.models import ServiceError as EmptyServiceError +from partitioned_types.models import ( + PartitionItem000, + PartitionItem001, + PartitionItem258, + PartitionItem259, +) +from querycompatibleawsjson10.models import CustomCodeError as JsonCodeError +from querycompatiblerpcv2cbor.models import CustomCodeError as CBORCodeError +from restjson.models import GreetingStruct as RestJsonGreeting +from restxml.models import GreetingStruct as RestXMLGreeting +from restxmlwithnamespace.models import NestedWithNamespace +from rpcv2cbor.models import ( + RecursiveShapesInputOutputNested1, + RecursiveShapesInputOutputNested2, + RpcV2CborListInputOutput, +) +from rpcv2json.models import RpcV2JsonListInputOutput + +example = RenamedExample(name="value", status=Status.ACTIVE, code=Code.OK) +choice: ExampleValue = ExampleValueEmpty(value=Unit()) +output = GetExampleOutput(example=example, value=choice) +assert_type(example.name, str) +assert_type(output.example, RenamedExample | None) + +chain = PartitionItem000(next=PartitionItem001(value="next")) +assert_type(chain.next, PartitionItem001 | None) +assert_type(PartitionItem259().next, PartitionItem258 | None) + +events: TradeEvents = TradeEventsAlpha(value=Alpha(id="event")) +unit_event: TradeEvents = TradeEventsBeta(value=EventUnit()) +assert_type(Gamma(payload=GammaPayload(values=[1, 2])).payload, GammaPayload | None) + +recursive = RecursiveShapesInputOutputNested1( + nested=RecursiveShapesInputOutputNested2(bar="nested") +) +assert_type(recursive.nested, RecursiveShapesInputOutputNested2 | None) +RpcV2CborListInputOutput(integer_list=[1, 2], nested_string_list=[["value"]]) +RpcV2JsonListInputOutput(integer_list=[1, 2], nested_string_list=[["value"]]) +assert_type(JSONEvent(id="event").id, str | None) + +assert_type(Json10Enum("future").value, Literal["Foo", "Baz", "Bar", "1", "0"]) +assert_type(Json11Enum("future").value, Literal["Foo", "Baz", "Bar", "1", "0"]) +QueryGreeting(hi="query") +EC2Greeting(hi="ec2") +RestJsonGreeting(hi="json") +RestXMLGreeting(hi="xml") +NestedWithNamespace() +assert_type(JsonCodeError("error").message, str) +assert_type(CBORCodeError("error").message, str) +assert_type(EmptyServiceError("error").message, str) diff --git a/scripts/codegen-output-py/tests/test_snapshots.py b/scripts/codegen-output-py/tests/test_snapshots.py new file mode 100644 index 000000000..f3a97dc55 --- /dev/null +++ b/scripts/codegen-output-py/tests/test_snapshots.py @@ -0,0 +1,528 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +import hashlib +import importlib +import json +import re +import sys +import tomllib +from collections.abc import Iterator +from contextlib import contextmanager +from dataclasses import fields, is_dataclass +from enum import EnumType +from pathlib import Path +from types import ModuleType +from typing import Any, NamedTuple + +import pytest +from smithy_cbor import CBORCodec +from smithy_core._schema_compact import hydrate +from smithy_core.documents import Document +from smithy_core.schemas import Schema +from smithy_core.shapes import ShapeType +from smithy_json import JSONCodec +from smithy_python.model import OperationShape, Shape, load_model +from smithy_test import verify_models + +_ROOT = Path(__file__).resolve().parents[3] +_INPUTS = _ROOT / "scripts/codegen-output-py" +_PROJECTIONS: dict[str, Any] = json.loads((_INPUTS / "projections.json").read_text()) +_COUNTS = { + # Data schemas and public model exports, including ServiceError. + "aws-json-1-0": (44, 48), + "aws-json-1-1": (53, 41), + "aws-query": (73, 44), + "ec2-query": (56, 35), + "my-handwritten-json-model": (10, 17), + "my-handwritten-model": (20, 33), + "non-query-compatible-rpcv2-cbor": (0, 1), + "partitioned-types": (270, 276), + "query-compatible-aws-json-1-0": (2, 3), + "query-compatible-rpcv2-cbor": (2, 3), + "rest-json-1": (205, 197), + "rest-xml": (144, 124), + "rest-xml-with-namespace": (3, 4), + "rpcv2-cbor": (56, 37), + "rpcv2-json": (57, 31), + "types": (10, 16), +} +_SOURCE_TRAITS = { + "smithy.api#required", + "smithy.api#sensitive", + "smithy.api#default", + "smithy.api#sparse", + "smithy.api#enumValue", + "smithy.api#jsonName", + "smithy.api#timestampFormat", + "smithy.api#mediaType", + "smithy.api#xmlAttribute", + "smithy.api#xmlFlattened", + "smithy.api#xmlName", + "smithy.api#xmlNamespace", + "smithy.api#streaming", + "smithy.api#error", + "smithy.api#httpError", + "smithy.api#httpHeader", + "smithy.api#httpQuery", + "smithy.api#httpLabel", + "smithy.api#httpPayload", + "smithy.api#httpPrefixHeaders", + "smithy.api#httpQueryParams", + "smithy.api#httpResponseCode", + "smithy.api#idempotencyToken", + "smithy.api#eventHeader", + "smithy.api#eventPayload", +} + + +class Projection(NamedTuple): + name: str + package: str + settings: dict[str, Any] + + @property + def output(self) -> Path: + return _ROOT / "codegen-output-py" / self.name + + @property + def model(self) -> dict[str, Any]: + return json.loads((_INPUTS / self.settings["model"]).read_text()) + + +@pytest.fixture(params=sorted(_PROJECTIONS)) +def projection(request: pytest.FixtureRequest) -> Projection: + name: str = request.param + settings = _PROJECTIONS[name] + return Projection(name, settings["package"], settings) + + +@contextmanager +def _import_package( + source: Path, package: str +) -> Iterator[tuple[ModuleType, ModuleType]]: + # Both snapshot trees deliberately use the same package names. Isolate imports + # so a warm Java package cannot satisfy a native import, or vice versa. + saved = { + name: module + for name, module in sys.modules.items() + if name == package or name.startswith(package + ".") + } + for name in saved: + del sys.modules[name] + sys.path.insert(0, str(source)) + try: + models = importlib.import_module(f"{package}.models") + schemas = importlib.import_module(f"{package}._private.schemas") + yield models, schemas + finally: + sys.path.remove(str(source)) + for name in tuple(sys.modules): + if name == package or name.startswith(package + "."): + del sys.modules[name] + sys.modules.update(saved) + + +@pytest.fixture +def generated(projection: Projection) -> Iterator[tuple[ModuleType, ModuleType]]: + with _import_package(projection.output / "src", projection.package) as modules: + yield modules + + +def _schemas_by_id(schemas: ModuleType) -> dict[str, Schema]: + result: dict[str, Schema] = {} + for name in dir(schemas): + if name.isupper() and not name.startswith("_"): + value = getattr(schemas, name) + if isinstance(value, tuple): + schema = hydrate(value) + result[str(schema.id)] = schema + return result + + +def _traits(schema: Schema) -> dict[str, Any]: + return {str(id_): trait.document_value for id_, trait in schema.traits.items()} + + +def _describe(schema: Schema) -> dict[str, Any]: + return { + "type": schema.shape_type, + "traits": _traits(schema), + "members": [ + { + "id": str(member.id), + "type": member.shape_type, + "index": member.expect_member_index(), + "target": str(member.expect_member_target().id), + "traits": _traits(member), + } + for member in schema.members_by_index + ], + } + + +def test_projection_set_matches_java_configuration() -> None: + projections = json.loads( + (_ROOT / "codegen/protocol-test/smithy-build.json").read_text() + )["projections"] + assert set(_PROJECTIONS) == set(projections) | {"types", "partitioned-types"} + for name, projection in projections.items(): + settings = projection["plugins"]["python-client-codegen"] + assert _PROJECTIONS[name]["package"] == settings["module"] + assert _PROJECTIONS[name]["service"] == settings["service"] + assert _PROJECTIONS[name]["version"] == settings["moduleVersion"] + provenance = json.loads((_INPUTS / "models/provenance.json").read_text()) + assert set(provenance) == set(projections) + for name, hashes in provenance.items(): + content = (_INPUTS / _PROJECTIONS[name]["model"]).read_bytes() + assert hashlib.sha256(content).hexdigest() == hashes["fixture_sha256"] + + +def test_artifact_contains_only_supported_files(projection: Projection) -> None: + source = projection.output / "src" / projection.package + manifest = json.loads( + (projection.output / ".smithy-python-manifest.json").read_text() + ) + expected = { + "README.md", + "pyproject.toml", + f"src/{projection.package}/__init__.py", + f"src/{projection.package}/models.py", + f"src/{projection.package}/models.pyi", + f"src/{projection.package}/py.typed", + f"src/{projection.package}/_private/__init__.py", + f"src/{projection.package}/_private/schemas.py", + } + partitions = { + f"src/{projection.package}/_private/{path.name}" + for path in (source / "_private").iterdir() + if re.fullmatch(r"(schemas_\d+\.py|models_\d+\.pyi)", path.name) + } + assert set(manifest["files"]) == expected | partitions + for path, hash_ in manifest["files"].items(): + assert ( + hashlib.sha256((projection.output / path).read_bytes()).hexdigest() == hash_ + ) + metadata = tomllib.loads((projection.output / "pyproject.toml").read_text()) + assert metadata["project"]["name"] == projection.package + assert metadata["project"]["version"] == projection.settings["version"] + assert metadata["project"]["description"] == projection.settings["description"] + assert all( + dependency.startswith("smithy-core") + for dependency in metadata["project"]["dependencies"] + ) + assert (source / "py.typed").read_bytes() == b"" + + +def test_public_models_load_lazily_and_match_stubs( + projection: Projection, generated: tuple[ModuleType, ModuleType] +) -> None: + models, schemas = generated + exports: tuple[str, ...] = models.__all__ + assert exports[0] == "ServiceError" + assert len(exports) == _COUNTS[projection.name][1] + assert len(exports) == len(set(exports)) + for name in exports[1:]: + assert name in dir(models) + assert name not in vars(models) + pyi = projection.output / "src" / projection.package / "models.pyi" + verify_models(models, schemas, pyi_path=str(pyi)) + # Data streams need a transport serializer; a JSON document codec cannot + # represent them. Their serializer/deserializer dispatch is checked separately. + verify_models(models, _document_schemas(schemas), codec=JSONCodec()) + namespace: dict[str, Any] = {} + exec(f"from {projection.package}.models import *", namespace) + for name in exports: + value = getattr(models, name) + assert namespace[name] is value + assert getattr(models, name) is value + if isinstance(value, type): + assert value.__module__ == models.__name__ + with pytest.raises(AttributeError): + getattr(models, "NotAModel") + + +def test_schema_ids_types_traits_and_member_order_match_ast( + projection: Projection, generated: tuple[ModuleType, ModuleType] +) -> None: + _, schemas = generated + native = _schemas_by_id(schemas) + assert len(native) == _COUNTS[projection.name][0] + model = load_model(projection.model) + operations = tuple(model.iter_shapes(OperationShape)) + inputs = {str(operation.input) for operation in operations} + outputs = {str(operation.output) for operation in operations} + for id_, schema in native.items(): + source = model.get_shape(id_) + assert schema.shape_type.name == source.type.name + assert schema.shape_type.name not in ("SERVICE", "OPERATION", "RESOURCE") + _assert_source_traits(schema, source) + if schema.shape_type is ShapeType.STRUCTURE: + assert ("smithy.api#input" in _traits(schema)) == ( + id_ in inputs or source.has_trait("input") + ) + assert ("smithy.api#output" in _traits(schema)) == ( + id_ in outputs or source.has_trait("output") + ) + members = source.members + assert tuple(schema.members) == tuple(members) + assert tuple(m.expect_member_name() for m in schema.members_by_index) == tuple( + members + ) + for index, (name, member_source) in enumerate(members.items()): + member = schema.members[name] + assert str(member.id) == f"{id_}${name}" + assert member.expect_member_index() == index + assert str(member.expect_member_target().id) == str(member_source.target) + _assert_source_traits(member, member_source) + + +def _assert_source_traits(schema: Schema, source: Shape) -> None: + actual = _traits(schema) + for trait_id, value in source.traits.items(): + id_ = str(trait_id) + if id_ in _SOURCE_TRAITS: + assert id_ in actual, (schema.id, id_) + expected = None if value == {} and id_ != "smithy.api#default" else value + assert actual[id_] == expected, (schema.id, id_) + assert "smithy.api#documentation" not in actual + assert "smithy.test#httpRequestTests" not in actual + assert "smithy.test#httpResponseTests" not in actual + + +def _document_schemas(schemas: ModuleType) -> ModuleType: + result = ModuleType(schemas.__name__) + for name in dir(schemas): + if name.isupper() and not name.startswith("_"): + value = getattr(schemas, name) + if isinstance(value, tuple) and not _has_data_stream(hydrate(value)): + setattr(result, name, value) + return result + + +def _has_data_stream(root: Schema) -> bool: + visited: set[str] = set() + pending = [root] + while pending: + schema = pending.pop() + if str(schema.id) in visited: + continue + visited.add(str(schema.id)) + if schema.shape_type is ShapeType.BLOB and "smithy.api#streaming" in _traits( + schema + ): + return True + pending.extend( + member.expect_member_target() for member in schema.members.values() + ) + return False + + +def test_partition_facade_is_lazy_and_preserves_identity( + projection: Projection, generated: tuple[ModuleType, ModuleType] +) -> None: + _, schemas = generated + partitions = sorted( + (projection.output / "src" / projection.package / "_private").glob( + "schemas_*.py" + ) + ) + if not partitions: + assert "_SCHEMA_PARTITIONS" not in vars(schemas) + return + prefix = f"{projection.package}._private.schemas_" + assert not any(name.startswith(prefix) for name in sys.modules) + exports = tuple( + name for name in dir(schemas) if name.isupper() and not name.startswith("_") + ) + assert exports + assert all(name in dir(schemas) and name not in vars(schemas) for name in exports) + first = getattr(schemas, exports[0]) + assert getattr(schemas, exports[0]) is first + assert sum(name.startswith(prefix) for name in sys.modules) == 1 + for name in exports: + value = getattr(schemas, name) + owners = [ + module + for module_name, module in tuple(sys.modules.items()) + if module_name.startswith(prefix) and name in vars(module) + ] + assert len(owners) == 1 + assert getattr(owners[0], name) is value + with pytest.raises(AttributeError): + getattr(schemas, "NOT_A_SCHEMA") + + +def test_common_java_model_and_schema_behavior(projection: Projection) -> None: + if projection.name in ("types", "partitioned-types"): + return + with _import_package(projection.output / "src", projection.package) as ( + models, + schemas, + ): + native = { + id_: _describe(schema) for id_, schema in _schemas_by_id(schemas).items() + } + surface = _model_surface(models) + java_source = _ROOT / "codegen-output" / projection.name / "src" + with _import_package(java_source, projection.package) as (models, schemas): + java = { + id_: _describe(schema) for id_, schema in _schemas_by_id(schemas).items() + } + java_surface = _model_surface(models) + common = native.keys() & java.keys() + # Dedicated client I/O structures have different IDs. Shared types can carry + # input/output markers in native types but not Java's normalized client model. + # AWS query error metadata is provided by Java's AWS integration. + assert common or not native + for id_ in common: + assert _common_metadata(native[id_]) == _common_metadata(java[id_]), id_ + for name in surface.keys() & java_surface.keys(): + assert surface[name] == java_surface[name], name + + +def _common_metadata(description: dict[str, Any]) -> dict[str, Any]: + excluded = { + "smithy.api#input", + "smithy.api#output", + "aws.protocols#awsQueryError", + } + return { + **description, + "traits": { + id_: value + for id_, value in description["traits"].items() + if id_ not in excluded + }, + "members": [ + { + **member, + "traits": { + id_: value + for id_, value in member["traits"].items() + if id_ not in excluded + }, + } + for member in description["members"] + ], + } + + +def _model_surface(models: ModuleType) -> dict[str, Any]: + surface: dict[str, Any] = {} + for name in models.__all__: + value = getattr(models, name) + if isinstance(value, EnumType): + surface[name] = {member.name: member.value for member in value} + elif is_dataclass(value): + surface[name] = tuple(field.name for field in fields(value)) + return surface + + +def test_rpcv2_cbor_models_round_trip_without_a_client() -> None: + with _import_package(_ROOT / "codegen-output-py/rpcv2-cbor/src", "rpcv2cbor") as ( + models, + schemas, + ): + count = verify_models(models, schemas, codec=CBORCodec()) + assert count > 20 + value = models.RecursiveShapesInputOutputNested1( + foo="first", + nested=models.RecursiveShapesInputOutputNested2(bar="second"), + ) + codec = CBORCodec() + assert codec.deserialize(codec.serialize(value), type(value)) == value + + +def test_partitioned_models_resolve_cross_partition_and_recursive_targets() -> None: + with _import_package( + _ROOT / "codegen-output-py/partitioned-types/src", "partitioned_types" + ) as (models, schemas): + private = ( + _ROOT / "codegen-output-py/partitioned-types/src/partitioned_types/_private" + ) + assert len(list(private.glob("models_*.pyi"))) == 2 + assert len(list(private.glob("schemas_*.py"))) == 3 + left = models.PartitionItem000( + value="first", next=models.PartitionItem001(value="second") + ) + assert JSONCodec().deserialize(JSONCodec().serialize(left), type(left)) == left + cycle = hydrate(schemas.PARTITION_ITEM258) + other = cycle.members["next"].expect_member_target() + assert str(other.id) == "example#PartitionItem259" + assert other.members["next"].expect_member_target() is cycle + + +def test_original_types_cover_renames_enums_unions_and_streaming_members() -> None: + with _import_package(_ROOT / "codegen-output-py/types/src", "example_types") as ( + models, + schemas, + ): + assert "RenamedExample" in models.__all__ + assert "Example" not in models.__all__ + assert models.Status.ACTIVE == "active" + assert models.Status("future").value == "future" + assert models.Code.OK == 200 + union = models.ExampleValueEmpty(value=models.Unit()) + assert JSONCodec().serialize(union) == b'{"empty":{}}' + assert models.ExampleValueUnknown(tag="future").tag == "future" + example = models.RenamedExample( + name="sample", + count=3, + tags=["one", "two"], + attributes={"answer": Document(42)}, + choice=models.ExampleValueText(value="selected"), + status=models.Status.ACTIVE, + code=models.Code.OK, + ) + codec = JSONCodec() + body = codec.serialize(example) + assert json.loads(body) == { + "name": "sample", + "count": 3, + "tags": ["one", "two"], + "attributes": {"answer": 42}, + "choice": {"text": "selected"}, + "status": "active", + "code": 200, + } + decoded = codec.deserialize(body, models.RenamedExample) + assert codec.serialize(decoded) == body + assert decoded.status is models.Status.ACTIVE + output = models.GetExampleOutput() + assert not hasattr(output, "events") + assert "events" in hydrate(schemas.GET_EXAMPLE_OUTPUT).members + + +def test_streaming_blob_serde_uses_stream_dispatch() -> None: + with _import_package(_ROOT / "codegen-output-py/rest-json-1/src", "restjson") as ( + models, + schemas, + ): + payload = b"stream" + value = models.StreamingTraitsInputOutput(blob=payload) + + class Serializer: + def write_data_stream(self, schema: Schema, value: Any) -> None: + assert schema.expect_member_name() == "blob" + assert value is payload + self.written = True + + class Deserializer: + def read_struct(self, schema: Schema, consumer: Any) -> None: + consumer(schema.members["blob"], self) + + def read_data_stream(self, schema: Schema) -> bytes: + assert schema.expect_member_name() == "blob" + return payload + + serializer = Serializer() + value.serialize_members(serializer) + assert serializer.written + decoded = models.StreamingTraitsInputOutput.deserialize(Deserializer()) + assert decoded.blob is payload + assert str(hydrate(schemas.STREAMING_TRAITS_INPUT_OUTPUT).id).endswith( + "#StreamingTraitsInputOutput" + )