diff --git a/codegen-output-py/aws-json-1-0-client/.smithy-python-manifest.json b/codegen-output-py/aws-json-1-0-client/.smithy-python-manifest.json new file mode 100644 index 000000000..82fd61f50 --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/.smithy-python-manifest.json @@ -0,0 +1,21 @@ +{ + "files": { + "README.md": "8ce5cf31c8603b8731a66bb56ad203075cdd820f28afc1dc6227195175440b2f", + "pyproject.toml": "87892268a6a7f4f6888d72e07dc2baa91357d8f6533dab3acf08d07581d9bd9a", + "src/awsjson10_client/__init__.py": "ec844bac46e7e3e17f454e045ec19ada1706b015f51118fc1d08f1d6ef760444", + "src/awsjson10_client/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/awsjson10_client/_private/endpoints.py": "7d515fe771678e82ddbe07798d6b7e48c25c6c9bec19cec9318deb0bc5064ead", + "src/awsjson10_client/_private/schemas.py": "0e254d9f031858bb9894d35adbceb708ad3d77db5030ce91ff0c4e150ba04657", + "src/awsjson10_client/aio/__init__.py": "e2072bcfa8185b3654fd315c0b92205140c5d22ddfc4ac50c80bb9089bda8d75", + "src/awsjson10_client/aio/client.py": "1ae4e9910e15f60579ee8b15f7337e90596e27be8932ef9cdeb977f364601370", + "src/awsjson10_client/aio/config.py": "c0f6a8506afd000e8de4697e02faa34280e0a0a4b68366009311739e50ec6c4d", + "src/awsjson10_client/aio/user_agent.py": "8e17f04fa14a0e1721e55beefbfa640c838b53be7c231f020d2ff3ed2f63f20a", + "src/awsjson10_client/client.py": "e6bd7e342676f5f5a71c38c02174b595afbd413ac337c377813a4e2c9bcfd843", + "src/awsjson10_client/config.py": "024eb5f174b588e67ebf9a272930eba6fcc3b1a181d677dade0823b7c2da7773", + "src/awsjson10_client/models.py": "d184b6f8288bd787f23c6f119a0a1259e1a468fb487c3d9c2c710825d390636a", + "src/awsjson10_client/models.pyi": "fc5bc36883b8b0851132826edfa5b51dbf7a2023e94b357dccac383878ff9d02", + "src/awsjson10_client/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/awsjson10_client/user_agent.py": "9cc5406633815f0a196c979e9e362e335772e47f6f56071770c8b59e83f6e199" + }, + "version": 1 +} diff --git a/codegen-output-py/aws-json-1-0-client/README.md b/codegen-output-py/aws-json-1-0-client/README.md new file mode 100644 index 000000000..38ec9cf1f --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/README.md @@ -0,0 +1,5 @@ + + +## awsjson10_client Client Package + +Python client for the aws-json-1-0 projection diff --git a/codegen-output-py/aws-json-1-0-client/pyproject.toml b/codegen-output-py/aws-json-1-0-client/pyproject.toml new file mode 100644 index 000000000..c94e1c6c7 --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/pyproject.toml @@ -0,0 +1,38 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "awsjson10_client" +version = "0.0.1" +description = "Python client for the aws-json-1-0 projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "awsjson10_client"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-aws-core[json]~=0.16.0", + "smithy-core~=0.13.0", + "smithy-http[aiohttp,urllib3]~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/awsjson10_client", +] + +[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-client/src/awsjson10_client/__init__.py b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/__init__.py new file mode 100644 index 000000000..e5dd82690 --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/__init__.py @@ -0,0 +1,30 @@ +from importlib import import_module +from typing import TYPE_CHECKING, Any + +__version__: str = "0.0.1" + +if TYPE_CHECKING: + from .aio.client import AsyncJSONRPC10Client + from .aio.config import AsyncJSONRPC10Config + from .client import JSONRPC10Client + from .config import JSONRPC10Config + +__all__ = [ + "AsyncJSONRPC10Client", + "AsyncJSONRPC10Config", + "JSONRPC10Client", + "JSONRPC10Config", +] + +_EXPORTS = { + "JSONRPC10Client": ".client", + "JSONRPC10Config": ".config", + "AsyncJSONRPC10Client": ".aio.client", + "AsyncJSONRPC10Config": ".aio.config", +} + + +def __getattr__(name: str) -> Any: + if name in _EXPORTS: + return getattr(import_module(_EXPORTS[name], __name__), name) + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") diff --git a/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/_private/__init__.py b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/_private/endpoints.py b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/_private/endpoints.py new file mode 100644 index 000000000..ad3066783 --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/_private/endpoints.py @@ -0,0 +1,27 @@ +from smithy_core.endpoints import EndpointBdd + +# fmt: off +# Tags: ref=0, attr=1, call=2, list=3, map=4, error=5, endpoint=6. +BDD = EndpointBdd( + # (name, type, required, default, builtin, client_context_attribute) + parameters=( + ("endpoint", "string", False, None, "SDK::Endpoint", None), + ), + functions=("isSet",), + conditions=( + ((2, "isSet", (0, "endpoint")), None), # 0: isSet(endpoint) + ), + results=( + None, # 0: no match + (6, (0, "endpoint"), None, ()), # 1 + (5, "(default endpointRuleSet) endpoint is not set - you must configure an endpoint."), # 2 + ), + root=2, + # (condition, high, low); 1 and -1 are terminals, a negative reference is a + # complement edge, and 100_000_000 + k is result k. + nodes=( + -1, 1, -1, + 0, 100_000_001, 100_000_002, + ), +) +# fmt: on diff --git a/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/_private/schemas.py b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/_private/schemas.py new file mode 100644 index 000000000..fb6954aee --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/_private/schemas.py @@ -0,0 +1,1058 @@ +from types import MappingProxyType + +from smithy_core._schema_compact import StaticOperationSchema, StaticSchema + +n0 = "aws.protocoltests.json10" +_s0 = "ClientOptionalDefaults" +_s1 = "member" +_s2 = "smithy.api#clientOptional" +_s3 = "smithy.api#default" +_s4 = "ComplexNestedErrorData" +_s5 = "Foo" +_s6 = "smithy.api#jsonName" +_s7 = "Fooooo" +_s8 = "ComplexError" +_s9 = "smithy.api#error" +_s10 = "client" +_s11 = "TopLevel" +_s12 = "Nested" +_s13 = "ContentTypeParametersInput" +_s14 = "smithy.synthetic#originalShapeId" +_s15 = "aws.protocoltests.json10#ContentTypeParametersInput" +_s16 = "smithy.api#input" +_s17 = "value" +_s18 = "ContentTypeParametersOutput" +_s19 = "aws.protocoltests.json10#ContentTypeParametersOutput" +_s20 = "smithy.api#output" +_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 = "defaultDocumentMap" +_s38 = "defaultDocumentString" +_s39 = "defaultDocumentBoolean" +_s40 = "defaultDocumentList" +_s41 = "defaultNullDocument" +_s42 = "defaultTimestamp" +_s43 = "defaultBlob" +_s44 = "YWJj" +_s45 = "defaultByte" +_s46 = "defaultShort" +_s47 = "defaultInteger" +_s48 = "defaultLong" +_s49 = "defaultFloat" +_s50 = "defaultDouble" +_s51 = "defaultMap" +_s52 = "defaultEnum" +_s53 = "defaultIntEnum" +_s54 = "emptyString" +_s55 = "" +_s56 = "falseBoolean" +_s57 = "emptyBlob" +_s58 = "zeroByte" +_s59 = "zeroShort" +_s60 = "zeroInteger" +_s61 = "zeroLong" +_s62 = "zeroFloat" +_s63 = "zeroDouble" +_s64 = "Farewell" +_s65 = "phrase" +_s66 = "bye" +_s67 = "Dialog" +_s68 = "language" +_s69 = "greeting" +_s70 = "farewell" +_s71 = "DialogList" +_s72 = "DialogMap" +_s73 = "EmptyInputAndEmptyOutputInput" +_s74 = "aws.protocoltests.json10#EmptyInputAndEmptyOutputInput" +_s75 = "EmptyInputAndEmptyOutputOutput" +_s76 = "aws.protocoltests.json10#EmptyInputAndEmptyOutputOutput" +_s77 = "EndpointWithHostLabelOperationInput" +_s78 = "aws.protocoltests.json10#EndpointWithHostLabelOperationInput" +_s79 = "label" +_s80 = "FooError" +_s81 = "server" +_s82 = "GreetingWithErrorsInput" +_s83 = "aws.protocoltests.json10#GreetingWithErrorsInput" +_s84 = "GreetingWithErrorsOutput" +_s85 = "aws.protocoltests.json10#GreetingWithErrorsOutput" +_s86 = "InvalidGreeting" +_s87 = "Message" +n1 = "aws.protocoltests.shared" +_s88 = "FooEnum" +_s89 = "Baz" +_s90 = "Bar" +_s91 = "1" +_s92 = "ZERO" +_s93 = "0" +_s94 = "IntegerEnum" +_s95 = "A" +_s96 = "B" +_s97 = "C" +_s98 = "StringList" +_s99 = "StringMap" +_s100 = "GreetingStruct" +_s101 = "MyUnion" +_s102 = "stringValue" +_s103 = "booleanValue" +_s104 = "numberValue" +_s105 = "blobValue" +_s106 = "timestampValue" +_s107 = "enumValue" +_s108 = "intEnumValue" +_s109 = "listValue" +_s110 = "mapValue" +_s111 = "structureValue" +_s112 = "JsonUnionsInput" +_s113 = "aws.protocoltests.json10#JsonUnionsInput" +_s114 = "contents" +_s115 = "JsonUnionsOutput" +_s116 = "aws.protocoltests.json10#JsonUnionsOutput" +_s117 = "NoInputAndOutputOutput" +_s118 = "aws.protocoltests.json10#NoInputAndOutputOutput" +_s119 = "OperationWithDefaultsInput" +_s120 = "aws.protocoltests.json10#OperationWithDefaultsInput" +_s121 = "defaults" +_s122 = "clientOptionalDefaults" +_s123 = "topLevelDefault" +_s124 = "otherTopLevelDefault" +_s125 = "OperationWithDefaultsOutput" +_s126 = "aws.protocoltests.json10#OperationWithDefaultsOutput" +_s127 = "dialog" +_s128 = "dialogList" +_s129 = "dialogMap" +_s130 = "OperationWithNestedStructureInput" +_s131 = "aws.protocoltests.json10#OperationWithNestedStructureInput" +_s132 = "topLevel" +_s133 = "OperationWithNestedStructureOutput" +_s134 = "aws.protocoltests.json10#OperationWithNestedStructureOutput" +_s135 = "RequiredStringList" +_s136 = "RequiredStringMap" +_s137 = "OperationWithRequiredMembersOutput" +_s138 = "aws.protocoltests.json10#OperationWithRequiredMembersOutput" +_s139 = "requiredString" +_s140 = "requiredBoolean" +_s141 = "requiredList" +_s142 = "requiredTimestamp" +_s143 = "requiredBlob" +_s144 = "requiredByte" +_s145 = "requiredShort" +_s146 = "requiredInteger" +_s147 = "requiredLong" +_s148 = "requiredFloat" +_s149 = "requiredDouble" +_s150 = "requiredMap" +_s151 = "RequiredEnum" +_s152 = "RequiredIntEnum" +_s153 = "OperationWithRequiredMembersWithDefaultsOutput" +_s154 = "aws.protocoltests.json10#OperationWithRequiredMembersWithDefaultsOutput" +_s155 = "smithy.api#required" +_s156 = "YmxvYg==" +_s157 = "requiredEnum" +_s158 = "requiredIntEnum" +_s159 = "PutWithContentEncodingInput" +_s160 = "aws.protocoltests.json10#PutWithContentEncodingInput" +_s161 = "encoding" +_s162 = "smithy.api#httpHeader" +_s163 = "Content-Encoding" +_s164 = "data" +_s165 = "SimpleScalarPropertiesInput" +_s166 = "aws.protocoltests.json10#SimpleScalarPropertiesInput" +_s167 = "floatValue" +_s168 = "doubleValue" +_s169 = "SimpleScalarPropertiesOutput" +_s170 = "aws.protocoltests.json10#SimpleScalarPropertiesOutput" +_s171 = "EndpointOperationInput" +_s172 = "smithy.api#Unit" +_s173 = "EndpointOperationOutput" +_s174 = "EndpointWithHostLabelOperationOutput" +_s175 = "HostWithPathOperationInput" +_s176 = "HostWithPathOperationOutput" +_s177 = "NoInputAndNoOutputInput" +_s178 = "NoInputAndNoOutputOutput" +_s179 = "NoInputAndOutputInput" +_s180 = "OperationWithRequiredMembersInput" +_s181 = "OperationWithRequiredMembersWithDefaultsInput" +_s182 = "PutWithContentEncodingOutput" +_s183 = "QueryIncompatibleOperationInput" +_s184 = "QueryIncompatibleOperationOutput" +_s185 = "ContentTypeParameters" +_s186 = "EmptyInputAndEmptyOutput" +_s187 = "EndpointOperation" +_s188 = "smithy.api#endpoint" +_s189 = "EndpointWithHostLabelOperation" +_s190 = "GreetingWithErrors" +_s191 = "HostWithPathOperation" +_s192 = "JsonUnions" +_s193 = "NoInputAndNoOutput" +_s194 = "NoInputAndOutput" +_s195 = "OperationWithDefaults" +_s196 = "OperationWithNestedStructure" +_s197 = "OperationWithRequiredMembers" +_s198 = "OperationWithRequiredMembersWithDefaults" +_s199 = "PutWithContentEncoding" +_s200 = "smithy.api#requestCompression" +_s201 = "QueryIncompatibleOperation" +_s202 = "SimpleScalarProperties" +_s203 = "JsonRpc10" +_s204 = "aws.api#service" +_s205 = "aws.auth#sigv4" +_s206 = "aws.protocols#awsJson1_0" + +CLIENT_OPTIONAL_DEFAULTS: StaticSchema = ( + 18, + n0, + _s0, + 0, + (_s1,), + ((7, {_s2: None, _s3: 0}),), +) + +COMPLEX_NESTED_ERROR_DATA: StaticSchema = ( + 18, + n0, + _s4, + 0, + (_s5,), + ((3, {_s6: _s7}),), +) + +COMPLEX_ERROR: StaticSchema = ( + 18, + n0, + _s8, + {_s9: _s10}, + (_s11, _s12), + ((3, 0), (COMPLEX_NESTED_ERROR_DATA, 0)), +) + +CONTENT_TYPE_PARAMETERS_INPUT: StaticSchema = ( + 18, + n0, + _s13, + {_s14: _s15, _s16: None}, + (_s17,), + ((7, 0),), +) + +CONTENT_TYPE_PARAMETERS_OUTPUT: StaticSchema = ( + 18, + n0, + _s18, + {_s14: _s19, _s20: None}, +) + +TEST_STRING_LIST: StaticSchema = ( + 16, + n0, + _s21, + 0, + (_s1,), + ((3, 0),), +) + +TEST_STRING_MAP: StaticSchema = ( + 17, + n0, + _s22, + 0, + (_s23, _s17), + ((3, 0), (3, 0)), +) + +TEST_ENUM: StaticSchema = ( + 14, + n0, + _s24, + 0, + (_s25, _s27, _s28), + ((-1, {_s26: _s25}), (-1, {_s26: _s27}), (-1, {_s26: _s28})), +) + +TEST_INT_ENUM: StaticSchema = ( + 15, + n0, + _s29, + 0, + (_s30, _s31), + ((-1, {_s26: 1}), (-1, {_s26: 2})), +) + +DEFAULTS: StaticSchema = ( + 18, + n0, + _s32, + 0, + ( + _s33, + _s35, + _s36, + _s37, + _s38, + _s39, + _s40, + _s41, + _s42, + _s43, + _s45, + _s46, + _s47, + _s48, + _s49, + _s50, + _s51, + _s52, + _s53, + _s54, + _s56, + _s57, + _s58, + _s59, + _s60, + _s61, + _s62, + _s63, + ), + ( + (3, {_s3: _s34}), + (2, {_s3: True}), + (TEST_STRING_LIST, {_s3: ()}), + (13, {_s3: MappingProxyType[str, object]({})}), + (13, {_s3: _s34}), + (13, {_s3: True}), + (13, {_s3: ()}), + (13, {_s3: None}), + (4, {_s3: 0}), + (1, {_s3: _s44}), + (5, {_s3: 1}), + (6, {_s3: 1}), + (7, {_s3: 10}), + (8, {_s3: 100}), + (9, {_s3: 1.0}), + (10, {_s3: 1.0}), + (TEST_STRING_MAP, {_s3: MappingProxyType[str, object]({})}), + (TEST_ENUM, {_s3: _s25}), + (TEST_INT_ENUM, {_s3: 1}), + (3, {_s3: _s55}), + (2, {_s3: False}), + (1, {_s3: _s55}), + (5, {_s3: 0}), + (6, {_s3: 0}), + (7, {_s3: 0}), + (8, {_s3: 0}), + (9, {_s3: 0.0}), + (10, {_s3: 0.0}), + ), +) + +FAREWELL: StaticSchema = ( + 18, + n0, + _s64, + 0, + (_s65,), + ((3, {_s3: _s66}),), +) + +DIALOG: StaticSchema = ( + 18, + n0, + _s67, + 0, + (_s68, _s69, _s70), + ((3, 0), (3, {_s3: _s34}), (FAREWELL, 0)), +) + +DIALOG_LIST: StaticSchema = ( + 16, + n0, + _s71, + 0, + (_s1,), + ((DIALOG, 0),), +) + +DIALOG_MAP: StaticSchema = ( + 17, + n0, + _s72, + 0, + (_s23, _s17), + ((3, 0), (DIALOG, 0)), +) + +EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT: StaticSchema = ( + 18, + n0, + _s73, + {_s14: _s74, _s16: None}, +) + +EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s75, + {_s14: _s76, _s20: None}, +) + +ENDPOINT_WITH_HOST_LABEL_OPERATION_INPUT: StaticSchema = ( + 18, + n0, + _s77, + {_s14: _s78, _s16: None}, + (_s79,), + ((3, 257),), +) + +FOO_ERROR: StaticSchema = ( + 18, + n0, + _s80, + {_s9: _s81}, +) + +GREETING_WITH_ERRORS_INPUT: StaticSchema = ( + 18, + n0, + _s82, + {_s14: _s83, _s16: None}, + (_s69,), + ((3, 0),), +) + +GREETING_WITH_ERRORS_OUTPUT: StaticSchema = ( + 18, + n0, + _s84, + {_s14: _s85, _s20: None}, + (_s69,), + ((3, 0),), +) + +INVALID_GREETING: StaticSchema = ( + 18, + n0, + _s86, + {_s9: _s10}, + (_s87,), + ((3, 0),), +) + +FOO_ENUM: StaticSchema = ( + 14, + n1, + _s88, + 0, + (_s25, _s28, _s27, _s30, _s92), + ( + (-1, {_s26: _s5}), + (-1, {_s26: _s89}), + (-1, {_s26: _s90}), + (-1, {_s26: _s91}), + (-1, {_s26: _s93}), + ), +) + +INTEGER_ENUM: StaticSchema = ( + 15, + n1, + _s94, + 0, + (_s95, _s96, _s97), + ((-1, {_s26: 1}), (-1, {_s26: 2}), (-1, {_s26: 3})), +) + +STRING_LIST: StaticSchema = ( + 16, + n1, + _s98, + 0, + (_s1,), + ((3, 0),), +) + +STRING_MAP: StaticSchema = ( + 17, + n1, + _s99, + 0, + (_s23, _s17), + ((3, 0), (3, 0)), +) + +GREETING_STRUCT: StaticSchema = ( + 18, + n1, + _s100, + 0, + (_s34,), + ((3, 0),), +) + +MY_UNION: StaticSchema = ( + 19, + n0, + _s101, + 0, + (_s102, _s103, _s104, _s105, _s106, _s107, _s108, _s109, _s110, _s111), + ( + (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, + _s112, + {_s14: _s113, _s16: None}, + (_s114,), + ((MY_UNION, 0),), +) + +JSON_UNIONS_OUTPUT: StaticSchema = ( + 18, + n0, + _s115, + {_s14: _s116, _s20: None}, + (_s114,), + ((MY_UNION, 0),), +) + +NO_INPUT_AND_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s117, + {_s14: _s118, _s20: None}, +) + +OPERATION_WITH_DEFAULTS_INPUT: StaticSchema = ( + 18, + n0, + _s119, + {_s14: _s120, _s16: None}, + (_s121, _s122, _s123, _s124), + ((DEFAULTS, 0), (CLIENT_OPTIONAL_DEFAULTS, 0), (3, {_s3: _s34}), (7, {_s3: 0})), +) + +OPERATION_WITH_DEFAULTS_OUTPUT: StaticSchema = ( + 18, + n0, + _s125, + {_s14: _s126, _s20: None}, + ( + _s33, + _s35, + _s36, + _s37, + _s38, + _s39, + _s40, + _s41, + _s42, + _s43, + _s45, + _s46, + _s47, + _s48, + _s49, + _s50, + _s51, + _s52, + _s53, + _s54, + _s56, + _s57, + _s58, + _s59, + _s60, + _s61, + _s62, + _s63, + ), + ( + (3, {_s3: _s34}), + (2, {_s3: True}), + (TEST_STRING_LIST, {_s3: ()}), + (13, {_s3: MappingProxyType[str, object]({})}), + (13, {_s3: _s34}), + (13, {_s3: True}), + (13, {_s3: ()}), + (13, {_s3: None}), + (4, {_s3: 0}), + (1, {_s3: _s44}), + (5, {_s3: 1}), + (6, {_s3: 1}), + (7, {_s3: 10}), + (8, {_s3: 100}), + (9, {_s3: 1.0}), + (10, {_s3: 1.0}), + (TEST_STRING_MAP, {_s3: MappingProxyType[str, object]({})}), + (TEST_ENUM, {_s3: _s25}), + (TEST_INT_ENUM, {_s3: 1}), + (3, {_s3: _s55}), + (2, {_s3: False}), + (1, {_s3: _s55}), + (5, {_s3: 0}), + (6, {_s3: 0}), + (7, {_s3: 0}), + (8, {_s3: 0}), + (9, {_s3: 0.0}), + (10, {_s3: 0.0}), + ), +) + +TOP_LEVEL: StaticSchema = ( + 18, + n0, + _s11, + 0, + (_s127, _s128, _s129), + ( + (DIALOG, 1), + (DIALOG_LIST, {_s3: ()}), + (DIALOG_MAP, {_s3: MappingProxyType[str, object]({})}), + ), +) + +OPERATION_WITH_NESTED_STRUCTURE_INPUT: StaticSchema = ( + 18, + n0, + _s130, + {_s14: _s131, _s16: None}, + (_s132,), + ((TOP_LEVEL, 1),), +) + +OPERATION_WITH_NESTED_STRUCTURE_OUTPUT: StaticSchema = ( + 18, + n0, + _s133, + {_s14: _s134, _s20: None}, + (_s127, _s128, _s129), + ( + (DIALOG, 1), + (DIALOG_LIST, {_s3: ()}), + (DIALOG_MAP, {_s3: MappingProxyType[str, object]({})}), + ), +) + +REQUIRED_STRING_LIST: StaticSchema = ( + 16, + n0, + _s135, + 0, + (_s1,), + ((3, 0),), +) + +REQUIRED_STRING_MAP: StaticSchema = ( + 17, + n0, + _s136, + 0, + (_s23, _s17), + ((3, 0), (3, 0)), +) + +OPERATION_WITH_REQUIRED_MEMBERS_OUTPUT: StaticSchema = ( + 18, + n0, + _s137, + {_s14: _s138, _s20: None}, + ( + _s139, + _s140, + _s141, + _s142, + _s143, + _s144, + _s145, + _s146, + _s147, + _s148, + _s149, + _s150, + ), + ( + (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, + _s151, + 0, + (_s25, _s27, _s28), + ((-1, {_s26: _s25}), (-1, {_s26: _s27}), (-1, {_s26: _s28})), +) + +REQUIRED_INT_ENUM: StaticSchema = ( + 15, + n0, + _s152, + 0, + (_s30, _s31), + ((-1, {_s26: 1}), (-1, {_s26: 2})), +) + +OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS_OUTPUT: StaticSchema = ( + 18, + n0, + _s153, + {_s14: _s154, _s20: None}, + ( + _s139, + _s140, + _s141, + _s142, + _s143, + _s144, + _s145, + _s146, + _s147, + _s148, + _s149, + _s150, + _s157, + _s158, + ), + ( + (3, {_s3: _s34, _s155: None}), + (2, {_s3: True, _s155: None}), + (REQUIRED_STRING_LIST, {_s3: (), _s155: None}), + (4, {_s3: 1, _s155: None}), + (1, {_s3: _s156, _s155: None}), + (5, {_s3: 1, _s155: None}), + (6, {_s3: 1, _s155: None}), + (7, {_s3: 10, _s155: None}), + (8, {_s3: 100, _s155: None}), + (9, {_s3: 1.0, _s155: None}), + (10, {_s3: 1.0, _s155: None}), + (REQUIRED_STRING_MAP, {_s3: MappingProxyType[str, object]({}), _s155: None}), + (REQUIRED_ENUM, {_s3: _s25, _s155: None}), + (REQUIRED_INT_ENUM, {_s3: 1, _s155: None}), + ), +) + +PUT_WITH_CONTENT_ENCODING_INPUT: StaticSchema = ( + 18, + n0, + _s159, + {_s14: _s160, _s16: None}, + (_s161, _s164), + ((3, {_s162: _s163}), (3, 0)), +) + +SIMPLE_SCALAR_PROPERTIES_INPUT: StaticSchema = ( + 18, + n0, + _s165, + {_s14: _s166, _s16: None}, + (_s167, _s168), + ((9, 0), (10, 0)), +) + +SIMPLE_SCALAR_PROPERTIES_OUTPUT: StaticSchema = ( + 18, + n0, + _s169, + {_s14: _s170, _s20: None}, + (_s167, _s168), + ((9, 0), (10, 0)), +) + +ENDPOINT_OPERATION_INPUT: StaticSchema = ( + 18, + n0, + _s171, + {_s14: _s172, _s16: None}, +) + +ENDPOINT_OPERATION_OUTPUT: StaticSchema = ( + 18, + n0, + _s173, + {_s14: _s172, _s20: None}, +) + +ENDPOINT_WITH_HOST_LABEL_OPERATION_OUTPUT: StaticSchema = ( + 18, + n0, + _s174, + {_s14: _s172, _s20: None}, +) + +HOST_WITH_PATH_OPERATION_INPUT: StaticSchema = ( + 18, + n0, + _s175, + {_s14: _s172, _s16: None}, +) + +HOST_WITH_PATH_OPERATION_OUTPUT: StaticSchema = ( + 18, + n0, + _s176, + {_s14: _s172, _s20: None}, +) + +NO_INPUT_AND_NO_OUTPUT_INPUT: StaticSchema = ( + 18, + n0, + _s177, + {_s14: _s172, _s16: None}, +) + +NO_INPUT_AND_NO_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s178, + {_s14: _s172, _s20: None}, +) + +NO_INPUT_AND_OUTPUT_INPUT: StaticSchema = ( + 18, + n0, + _s179, + {_s14: _s172, _s16: None}, +) + +OPERATION_WITH_REQUIRED_MEMBERS_INPUT: StaticSchema = ( + 18, + n0, + _s180, + {_s14: _s172, _s16: None}, +) + +OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS_INPUT: StaticSchema = ( + 18, + n0, + _s181, + {_s14: _s172, _s16: None}, +) + +PUT_WITH_CONTENT_ENCODING_OUTPUT: StaticSchema = ( + 18, + n0, + _s182, + {_s14: _s172, _s20: None}, +) + +QUERY_INCOMPATIBLE_OPERATION_INPUT: StaticSchema = ( + 18, + n0, + _s183, + {_s14: _s172, _s16: None}, +) + +QUERY_INCOMPATIBLE_OPERATION_OUTPUT: StaticSchema = ( + 18, + n0, + _s184, + {_s14: _s172, _s20: None}, +) + +CONTENT_TYPE_PARAMETERS: StaticOperationSchema = ( + 23, + n0, + _s185, + 0, + CONTENT_TYPE_PARAMETERS_INPUT, + CONTENT_TYPE_PARAMETERS_OUTPUT, + (), +) + +EMPTY_INPUT_AND_EMPTY_OUTPUT: StaticOperationSchema = ( + 23, + n0, + _s186, + 0, + EMPTY_INPUT_AND_EMPTY_OUTPUT_INPUT, + EMPTY_INPUT_AND_EMPTY_OUTPUT_OUTPUT, + (), +) + +ENDPOINT_OPERATION: StaticOperationSchema = ( + 23, + n0, + _s187, + {_s188: MappingProxyType({"hostPrefix": "foo."})}, + ENDPOINT_OPERATION_INPUT, + ENDPOINT_OPERATION_OUTPUT, + (), +) + +ENDPOINT_WITH_HOST_LABEL_OPERATION: StaticOperationSchema = ( + 23, + n0, + _s189, + {_s188: MappingProxyType({"hostPrefix": "foo.{label}."})}, + ENDPOINT_WITH_HOST_LABEL_OPERATION_INPUT, + ENDPOINT_WITH_HOST_LABEL_OPERATION_OUTPUT, + (), +) + +GREETING_WITH_ERRORS: StaticOperationSchema = ( + 23, + n0, + _s190, + 0, + GREETING_WITH_ERRORS_INPUT, + GREETING_WITH_ERRORS_OUTPUT, + (COMPLEX_ERROR, FOO_ERROR, INVALID_GREETING), +) + +HOST_WITH_PATH_OPERATION: StaticOperationSchema = ( + 23, + n0, + _s191, + 0, + HOST_WITH_PATH_OPERATION_INPUT, + HOST_WITH_PATH_OPERATION_OUTPUT, + (), +) + +JSON_UNIONS: StaticOperationSchema = ( + 23, + n0, + _s192, + 0, + JSON_UNIONS_INPUT, + JSON_UNIONS_OUTPUT, + (), +) + +NO_INPUT_AND_NO_OUTPUT: StaticOperationSchema = ( + 23, + n0, + _s193, + 0, + NO_INPUT_AND_NO_OUTPUT_INPUT, + NO_INPUT_AND_NO_OUTPUT_OUTPUT, + (), +) + +NO_INPUT_AND_OUTPUT: StaticOperationSchema = ( + 23, + n0, + _s194, + 0, + NO_INPUT_AND_OUTPUT_INPUT, + NO_INPUT_AND_OUTPUT_OUTPUT, + (), +) + +OPERATION_WITH_DEFAULTS: StaticOperationSchema = ( + 23, + n0, + _s195, + 0, + OPERATION_WITH_DEFAULTS_INPUT, + OPERATION_WITH_DEFAULTS_OUTPUT, + (), +) + +OPERATION_WITH_NESTED_STRUCTURE: StaticOperationSchema = ( + 23, + n0, + _s196, + 0, + OPERATION_WITH_NESTED_STRUCTURE_INPUT, + OPERATION_WITH_NESTED_STRUCTURE_OUTPUT, + (), +) + +OPERATION_WITH_REQUIRED_MEMBERS: StaticOperationSchema = ( + 23, + n0, + _s197, + 0, + OPERATION_WITH_REQUIRED_MEMBERS_INPUT, + OPERATION_WITH_REQUIRED_MEMBERS_OUTPUT, + (), +) + +OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS: StaticOperationSchema = ( + 23, + n0, + _s198, + 0, + OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS_INPUT, + OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS_OUTPUT, + (), +) + +PUT_WITH_CONTENT_ENCODING: StaticOperationSchema = ( + 23, + n0, + _s199, + {_s200: MappingProxyType({"encodings": ("gzip",)})}, + PUT_WITH_CONTENT_ENCODING_INPUT, + PUT_WITH_CONTENT_ENCODING_OUTPUT, + (), +) + +QUERY_INCOMPATIBLE_OPERATION: StaticOperationSchema = ( + 23, + n0, + _s201, + 0, + QUERY_INCOMPATIBLE_OPERATION_INPUT, + QUERY_INCOMPATIBLE_OPERATION_OUTPUT, + (), +) + +SIMPLE_SCALAR_PROPERTIES: StaticOperationSchema = ( + 23, + n0, + _s202, + 0, + SIMPLE_SCALAR_PROPERTIES_INPUT, + SIMPLE_SCALAR_PROPERTIES_OUTPUT, + (), +) + +JSON_RPC10: StaticSchema = ( + 21, + n0, + _s203, + { + _s204: MappingProxyType({"sdkId": "JSON RPC 10"}), + _s205: MappingProxyType({"name": "jsonrpc10"}), + _s206: None, + }, +) diff --git a/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/aio/__init__.py b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/aio/__init__.py new file mode 100644 index 000000000..e1e7ca6ab --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/aio/__init__.py @@ -0,0 +1,19 @@ +from importlib import import_module +from typing import TYPE_CHECKING, Any + +if TYPE_CHECKING: + from .client import AsyncJSONRPC10Client + from .config import AsyncJSONRPC10Config + +__all__ = ["AsyncJSONRPC10Client", "AsyncJSONRPC10Config"] + +_EXPORTS = { + "AsyncJSONRPC10Client": ".client", + "AsyncJSONRPC10Config": ".config", +} + + +def __getattr__(name: str) -> Any: + if name in _EXPORTS: + return getattr(import_module(_EXPORTS[name], __name__), name) + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") diff --git a/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/aio/client.py b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/aio/client.py new file mode 100644 index 000000000..0086b0743 --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/aio/client.py @@ -0,0 +1,615 @@ +from __future__ import annotations + +from typing import Unpack, cast, overload + +from smithy_aws_core.aio.identity.chain import AsyncIdentityChain +from smithy_aws_core.config.types import ConfigSource +from smithy_aws_core.identity.components import AWSCredentialsIdentity +from smithy_core.aio.client import AsyncClient +from smithy_http.aio.interfaces import AsyncHTTPClient +from smithy_http.plugins import user_agent_plugin + +from awsjson10_client import models +from awsjson10_client.aio.config import AsyncJSONRPC10Config, Plugin +from awsjson10_client.aio.user_agent import aws_user_agent_plugin + + +class AsyncJSONRPC10Client(AsyncClient[AsyncJSONRPC10Config]): + "Client for JsonRpc10." + + _client_plugins = (aws_user_agent_plugin, user_agent_plugin) + + @overload + async def content_type_parameters( + self, + request: models.ContentTypeParametersInput + | models.ContentTypeParametersInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.ContentTypeParametersOutput: ... + + @overload + async def content_type_parameters( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.ContentTypeParametersInputDict], + ) -> models.ContentTypeParametersOutput: + """ + The example tests how servers must support requests + containing a `Content-Type` header with parameters. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def content_type_parameters( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.ContentTypeParametersOutput: + return await self._invoke( + self._select_input(models.CONTENT_TYPE_PARAMETERS, args, kwargs), + models.CONTENT_TYPE_PARAMETERS, + [], + plugins, + ) + + @overload + async def empty_input_and_empty_output( + self, + request: models.EmptyInputAndEmptyOutputInput + | models.EmptyInputAndEmptyOutputInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.EmptyInputAndEmptyOutputOutput: ... + + @overload + async def empty_input_and_empty_output( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.EmptyInputAndEmptyOutputInputDict], + ) -> models.EmptyInputAndEmptyOutputOutput: + """ + The example tests how requests and responses are serialized when there's + no request or response payload because the operation has an empty input + and empty output structure that reuses the same shape. While this should + be rare, code generators must support this. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def empty_input_and_empty_output( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.EmptyInputAndEmptyOutputOutput: + return await self._invoke( + self._select_input(models.EMPTY_INPUT_AND_EMPTY_OUTPUT, args, kwargs), + models.EMPTY_INPUT_AND_EMPTY_OUTPUT, + [], + plugins, + ) + + @overload + async def endpoint_operation( + self, + request: models.EndpointOperationInput | models.EndpointOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.EndpointOperationOutput: ... + + @overload + async def endpoint_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.EndpointOperationInputDict], + ) -> models.EndpointOperationOutput: + """ + Invokes the EndpointOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def endpoint_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.EndpointOperationOutput: + return await self._invoke( + self._select_input(models.ENDPOINT_OPERATION, args, kwargs), + models.ENDPOINT_OPERATION, + [], + plugins, + ) + + @overload + async def endpoint_with_host_label_operation( + self, + request: models.EndpointWithHostLabelOperationInput + | models.EndpointWithHostLabelOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.EndpointWithHostLabelOperationOutput: ... + + @overload + async def endpoint_with_host_label_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.EndpointWithHostLabelOperationInputDict], + ) -> models.EndpointWithHostLabelOperationOutput: + """ + Invokes the EndpointWithHostLabelOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def endpoint_with_host_label_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.EndpointWithHostLabelOperationOutput: + return await self._invoke( + self._select_input(models.ENDPOINT_WITH_HOST_LABEL_OPERATION, args, kwargs), + models.ENDPOINT_WITH_HOST_LABEL_OPERATION, + [], + plugins, + ) + + @overload + async def greeting_with_errors( + self, + request: models.GreetingWithErrorsInput | models.GreetingWithErrorsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.GreetingWithErrorsOutput: ... + + @overload + async def greeting_with_errors( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.GreetingWithErrorsInputDict], + ) -> models.GreetingWithErrorsOutput: + """ + This operation has three possible return values: + + 1. A successful response in the form of GreetingWithErrorsOutput + 2. An InvalidGreeting error. + 3. A ComplexError error. + + Implementations must be able to successfully take a response and + properly deserialize successful and error responses. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def greeting_with_errors( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.GreetingWithErrorsOutput: + return await self._invoke( + self._select_input(models.GREETING_WITH_ERRORS, args, kwargs), + models.GREETING_WITH_ERRORS, + [], + plugins, + ) + + @overload + async def host_with_path_operation( + self, + request: models.HostWithPathOperationInput + | models.HostWithPathOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.HostWithPathOperationOutput: ... + + @overload + async def host_with_path_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.HostWithPathOperationInputDict], + ) -> models.HostWithPathOperationOutput: + """ + Invokes the HostWithPathOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def host_with_path_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.HostWithPathOperationOutput: + return await self._invoke( + self._select_input(models.HOST_WITH_PATH_OPERATION, args, kwargs), + models.HOST_WITH_PATH_OPERATION, + [], + plugins, + ) + + @overload + async def json_unions( + self, + request: models.JsonUnionsInput | models.JsonUnionsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.JsonUnionsOutput: ... + + @overload + async def json_unions( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.JsonUnionsInputDict], + ) -> models.JsonUnionsOutput: + """ + This operation uses unions for inputs and outputs. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def json_unions( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.JsonUnionsOutput: + return await self._invoke( + self._select_input(models.JSON_UNIONS, args, kwargs), + models.JSON_UNIONS, + [], + plugins, + ) + + @overload + async def no_input_and_no_output( + self, + request: models.NoInputAndNoOutputInput | models.NoInputAndNoOutputInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.NoInputAndNoOutputOutput: ... + + @overload + async def no_input_and_no_output( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.NoInputAndNoOutputInputDict], + ) -> models.NoInputAndNoOutputOutput: + """ + The example tests how requests and responses are serialized when there's + no request or response payload because the operation has no input or + output. + While this should be rare, code generators must support this. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def no_input_and_no_output( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.NoInputAndNoOutputOutput: + return await self._invoke( + self._select_input(models.NO_INPUT_AND_NO_OUTPUT, args, kwargs), + models.NO_INPUT_AND_NO_OUTPUT, + [], + plugins, + ) + + @overload + async def no_input_and_output( + self, + request: models.NoInputAndOutputInput | models.NoInputAndOutputInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.NoInputAndOutputOutput: ... + + @overload + async def no_input_and_output( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.NoInputAndOutputInputDict], + ) -> models.NoInputAndOutputOutput: + """ + The example tests how requests and responses are serialized when there's + no request or response payload because the operation has no input and + the + output is empty. While this should be rare, code generators must support + this. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def no_input_and_output( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.NoInputAndOutputOutput: + return await self._invoke( + self._select_input(models.NO_INPUT_AND_OUTPUT, args, kwargs), + models.NO_INPUT_AND_OUTPUT, + [], + plugins, + ) + + @overload + async def operation_with_defaults( + self, + request: models.OperationWithDefaultsInput + | models.OperationWithDefaultsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.OperationWithDefaultsOutput: ... + + @overload + async def operation_with_defaults( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.OperationWithDefaultsInputDict], + ) -> models.OperationWithDefaultsOutput: + """ + Invokes the OperationWithDefaults operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def operation_with_defaults( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.OperationWithDefaultsOutput: + return await self._invoke( + self._select_input(models.OPERATION_WITH_DEFAULTS, args, kwargs), + models.OPERATION_WITH_DEFAULTS, + [], + plugins, + ) + + @overload + async def operation_with_nested_structure( + self, + request: models.OperationWithNestedStructureInput + | models.OperationWithNestedStructureInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.OperationWithNestedStructureOutput: ... + + @overload + async def operation_with_nested_structure( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.OperationWithNestedStructureInputDict], + ) -> models.OperationWithNestedStructureOutput: + """ + Invokes the OperationWithNestedStructure operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def operation_with_nested_structure( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.OperationWithNestedStructureOutput: + return await self._invoke( + self._select_input(models.OPERATION_WITH_NESTED_STRUCTURE, args, kwargs), + models.OPERATION_WITH_NESTED_STRUCTURE, + [], + plugins, + ) + + @overload + async def operation_with_required_members( + self, + request: models.OperationWithRequiredMembersInput + | models.OperationWithRequiredMembersInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.OperationWithRequiredMembersOutput: ... + + @overload + async def operation_with_required_members( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.OperationWithRequiredMembersInputDict], + ) -> models.OperationWithRequiredMembersOutput: + """ + Invokes the OperationWithRequiredMembers operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def operation_with_required_members( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.OperationWithRequiredMembersOutput: + return await self._invoke( + self._select_input(models.OPERATION_WITH_REQUIRED_MEMBERS, args, kwargs), + models.OPERATION_WITH_REQUIRED_MEMBERS, + [], + plugins, + ) + + @overload + async def operation_with_required_members_with_defaults( + self, + request: models.OperationWithRequiredMembersWithDefaultsInput + | models.OperationWithRequiredMembersWithDefaultsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.OperationWithRequiredMembersWithDefaultsOutput: ... + + @overload + async def operation_with_required_members_with_defaults( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.OperationWithRequiredMembersWithDefaultsInputDict], + ) -> models.OperationWithRequiredMembersWithDefaultsOutput: + """ + Invokes the OperationWithRequiredMembersWithDefaults operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def operation_with_required_members_with_defaults( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.OperationWithRequiredMembersWithDefaultsOutput: + return await self._invoke( + self._select_input( + models.OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS, args, kwargs + ), + models.OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS, + [], + plugins, + ) + + @overload + async def put_with_content_encoding( + self, + request: models.PutWithContentEncodingInput + | models.PutWithContentEncodingInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.PutWithContentEncodingOutput: ... + + @overload + async def put_with_content_encoding( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.PutWithContentEncodingInputDict], + ) -> models.PutWithContentEncodingOutput: + """ + Invokes the PutWithContentEncoding operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def put_with_content_encoding( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.PutWithContentEncodingOutput: + return await self._invoke( + self._select_input(models.PUT_WITH_CONTENT_ENCODING, args, kwargs), + models.PUT_WITH_CONTENT_ENCODING, + [], + plugins, + ) + + @overload + async def query_incompatible_operation( + self, + request: models.QueryIncompatibleOperationInput + | models.QueryIncompatibleOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.QueryIncompatibleOperationOutput: ... + + @overload + async def query_incompatible_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.QueryIncompatibleOperationInputDict], + ) -> models.QueryIncompatibleOperationOutput: + """ + Invokes the QueryIncompatibleOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def query_incompatible_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.QueryIncompatibleOperationOutput: + return await self._invoke( + self._select_input(models.QUERY_INCOMPATIBLE_OPERATION, args, kwargs), + models.QUERY_INCOMPATIBLE_OPERATION, + [], + plugins, + ) + + @overload + async def simple_scalar_properties( + self, + request: models.SimpleScalarPropertiesInput + | models.SimpleScalarPropertiesInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.SimpleScalarPropertiesOutput: ... + + @overload + async def simple_scalar_properties( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.SimpleScalarPropertiesInputDict], + ) -> models.SimpleScalarPropertiesOutput: + """ + Invokes the SimpleScalarProperties operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def simple_scalar_properties( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.SimpleScalarPropertiesOutput: + return await self._invoke( + self._select_input(models.SIMPLE_SCALAR_PROPERTIES, args, kwargs), + models.SIMPLE_SCALAR_PROPERTIES, + [], + plugins, + ) + + async def _new_config(self) -> AsyncJSONRPC10Config: + return await AsyncJSONRPC10Config.resolve() + + async def _post_setup(self, config: AsyncJSONRPC10Config) -> None: + if config.aws_credentials_identity_resolver is None: + config_context = config.resolution_context() + config_file = None + profile_name = None + if config_context is not None: + config_file = await config_context.parsed_profiles() + if config_context.profile_source is ConfigSource.OVERRIDE: + profile_name = config_context.profile_name + config.aws_credentials_identity_resolver = await AsyncIdentityChain.create( + AWSCredentialsIdentity, + config_file=config_file, + profile_name=profile_name, + region_override=config.region, + http_client=cast(AsyncHTTPClient | None, config.transport), + ) diff --git a/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/aio/config.py b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/aio/config.py new file mode 100644 index 000000000..77f9a2bda --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/aio/config.py @@ -0,0 +1,123 @@ +from collections.abc import Callable +from dataclasses import dataclass, field +from typing import Any, ClassVar, Self, Unpack + +from smithy_aws_core.aio.auth.sigv4 import AsyncSigV4AuthScheme +from smithy_aws_core.aio.config.aws_config import ( + AsyncAwsConfig, + AsyncAwsConfigOverrides, +) +from smithy_aws_core.aio.config.filesystem import AsyncFileSystem +from smithy_aws_core.aio.protocols import AsyncAwsJson10ClientProtocol +from smithy_aws_core.config.resolvers import EndpointUriResolver +from smithy_aws_core.config.types import FieldSpec +from smithy_aws_core.endpoints import AWS_RULES_EXTENSION +from smithy_core.aio.interfaces import AsyncEndpointResolver +from smithy_core.aio.interfaces.auth import AsyncAuthScheme +from smithy_core.auth import DefaultAuthResolver +from smithy_core.endpoints import BddEndpointResolver +from smithy_core.interceptors import Interceptor +from smithy_core.interfaces import ( + ClientProtocol, + EndpointResolver, + ProtocolConstructor, + ProtocolSettings, +) +from smithy_core.interfaces.auth import AuthSchemeResolver +from smithy_core.shapes import ShapeID +from smithy_http.aio.aiohttp import AIOHTTPClient + +from awsjson10_client._private.endpoints import BDD +from awsjson10_client._private.schemas import JSON_RPC10 + +_PROTOCOL_SETTINGS = ProtocolSettings( + namespace="aws.protocoltests.json10", + service_target="JsonRpc10", + version="2020-07-14", + service_schema=JSON_RPC10, +) + + +class _AsyncJSONRPC10ConfigOverrides(AsyncAwsConfigOverrides, total=False): + "Explicit field values AsyncJSONRPC10Config.resolve accepts." + + endpoint_resolver: EndpointResolver | AsyncEndpointResolver | None + protocol: ( + ClientProtocol[Any, Any] | ProtocolConstructor[ClientProtocol[Any, Any]] | None + ) + auth_schemes: dict[ShapeID, AsyncAuthScheme[Any, Any, Any, Any]] | None + auth_scheme_resolver: AuthSchemeResolver | None + + +@dataclass(kw_only=True, repr=False, init=False) +class AsyncJSONRPC10Config(AsyncAwsConfig): + "Configuration for AsyncJSONRPC10Client." + + interceptors: list[Interceptor[Any, Any, Any, Any]] = field( + default_factory=list[Interceptor[Any, Any, Any, Any]] + ) + "Hooks called during the execution of a request." + + endpoint_resolver: EndpointResolver | AsyncEndpointResolver | None = None + "Resolves the endpoint of each operation." + + protocol: ClientProtocol[Any, Any] | None = None + "Serializes requests and deserializes responses." + + auth_schemes: dict[ShapeID, AsyncAuthScheme[Any, Any, Any, Any]] | None = None + "Auth schemes by auth scheme ID." + + auth_scheme_resolver: AuthSchemeResolver | None = None + "Determines the auth scheme for each operation." + + _FIELDS: ClassVar[dict[str, FieldSpec]] = { + **AsyncAwsConfig._FIELDS, + "endpoint_uri": FieldSpec( + default=None, resolver=EndpointUriResolver("json_rpc_10").program + ), + "endpoint_resolver": FieldSpec( + default_factory=lambda: BddEndpointResolver( + BDD, extensions=[AWS_RULES_EXTENSION] + ) + ), + "protocol": FieldSpec( + default_factory=lambda: AsyncAwsJson10ClientProtocol(_PROTOCOL_SETTINGS), + converter=lambda p: p(_PROTOCOL_SETTINGS) if isinstance(p, type) else p, + ), + "auth_schemes": FieldSpec( + default_factory=lambda: { + ShapeID("aws.auth#sigv4"): AsyncSigV4AuthScheme(service="jsonrpc10") + } + ), + "auth_scheme_resolver": FieldSpec(default_factory=DefaultAuthResolver), + "transport": FieldSpec(default_factory=lambda: AIOHTTPClient()), + } + + def set_auth_scheme(self, scheme: AsyncAuthScheme[Any, Any, Any, Any]) -> None: + "Set an auth scheme under its scheme ID." + auth_schemes = dict(self.auth_schemes or {}) + auth_schemes[scheme.scheme_id] = scheme + self.auth_schemes = auth_schemes + + @classmethod + async def resolve( # pyright: ignore[reportIncompatibleMethodOverride] + cls, + *, + profile: str | None = None, + fs: AsyncFileSystem | None = None, + config_file_path: str | None = None, + credentials_file_path: str | None = None, + **overrides: Unpack[_AsyncJSONRPC10ConfigOverrides], + ) -> Self: + "Resolve the config from overrides, the environment, and config files." + return await cls._resolve( + profile=profile, + fs=fs, + config_file_path=config_file_path, + credentials_file_path=credentials_file_path, + overrides=overrides, + ) + + +type Plugin = Callable[[AsyncJSONRPC10Config], None] +"A callable that customizes the client configuration." diff --git a/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/aio/user_agent.py b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/aio/user_agent.py new file mode 100644 index 000000000..7a6fa1ef6 --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/aio/user_agent.py @@ -0,0 +1,16 @@ +from smithy_aws_core.interceptors.user_agent import UserAgentInterceptor + +from awsjson10_client import __version__ +from awsjson10_client.aio.config import AsyncJSONRPC10Config + + +def aws_user_agent_plugin(config: AsyncJSONRPC10Config) -> None: + "Send the AWS user agent with every request." + config.interceptors.append( + UserAgentInterceptor( + ua_suffix=config.user_agent_extra, + ua_app_id=config.sdk_ua_app_id, + sdk_version=__version__, + service_id="JSON_RPC_10", + ) + ) diff --git a/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/client.py b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/client.py new file mode 100644 index 000000000..cf4618233 --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/client.py @@ -0,0 +1,615 @@ +from __future__ import annotations + +from typing import Unpack, cast, overload + +from smithy_aws_core.config.types import ConfigSource +from smithy_aws_core.identity.chain.resolver import IdentityChain +from smithy_aws_core.identity.components import AWSCredentialsIdentity +from smithy_core.client import Client +from smithy_http.interfaces import HTTPClient +from smithy_http.plugins import user_agent_plugin + +from awsjson10_client import models +from awsjson10_client.config import JSONRPC10Config, Plugin +from awsjson10_client.user_agent import aws_user_agent_plugin + + +class JSONRPC10Client(Client[JSONRPC10Config]): + "Client for JsonRpc10." + + _client_plugins = (aws_user_agent_plugin, user_agent_plugin) + + @overload + def content_type_parameters( + self, + request: models.ContentTypeParametersInput + | models.ContentTypeParametersInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.ContentTypeParametersOutput: ... + + @overload + def content_type_parameters( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.ContentTypeParametersInputDict], + ) -> models.ContentTypeParametersOutput: + """ + The example tests how servers must support requests + containing a `Content-Type` header with parameters. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def content_type_parameters( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.ContentTypeParametersOutput: + return self._invoke( + self._select_input(models.CONTENT_TYPE_PARAMETERS, args, kwargs), + models.CONTENT_TYPE_PARAMETERS, + [], + plugins, + ) + + @overload + def empty_input_and_empty_output( + self, + request: models.EmptyInputAndEmptyOutputInput + | models.EmptyInputAndEmptyOutputInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.EmptyInputAndEmptyOutputOutput: ... + + @overload + def empty_input_and_empty_output( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.EmptyInputAndEmptyOutputInputDict], + ) -> models.EmptyInputAndEmptyOutputOutput: + """ + The example tests how requests and responses are serialized when there's + no request or response payload because the operation has an empty input + and empty output structure that reuses the same shape. While this should + be rare, code generators must support this. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def empty_input_and_empty_output( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.EmptyInputAndEmptyOutputOutput: + return self._invoke( + self._select_input(models.EMPTY_INPUT_AND_EMPTY_OUTPUT, args, kwargs), + models.EMPTY_INPUT_AND_EMPTY_OUTPUT, + [], + plugins, + ) + + @overload + def endpoint_operation( + self, + request: models.EndpointOperationInput | models.EndpointOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.EndpointOperationOutput: ... + + @overload + def endpoint_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.EndpointOperationInputDict], + ) -> models.EndpointOperationOutput: + """ + Invokes the EndpointOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def endpoint_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.EndpointOperationOutput: + return self._invoke( + self._select_input(models.ENDPOINT_OPERATION, args, kwargs), + models.ENDPOINT_OPERATION, + [], + plugins, + ) + + @overload + def endpoint_with_host_label_operation( + self, + request: models.EndpointWithHostLabelOperationInput + | models.EndpointWithHostLabelOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.EndpointWithHostLabelOperationOutput: ... + + @overload + def endpoint_with_host_label_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.EndpointWithHostLabelOperationInputDict], + ) -> models.EndpointWithHostLabelOperationOutput: + """ + Invokes the EndpointWithHostLabelOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def endpoint_with_host_label_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.EndpointWithHostLabelOperationOutput: + return self._invoke( + self._select_input(models.ENDPOINT_WITH_HOST_LABEL_OPERATION, args, kwargs), + models.ENDPOINT_WITH_HOST_LABEL_OPERATION, + [], + plugins, + ) + + @overload + def greeting_with_errors( + self, + request: models.GreetingWithErrorsInput | models.GreetingWithErrorsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.GreetingWithErrorsOutput: ... + + @overload + def greeting_with_errors( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.GreetingWithErrorsInputDict], + ) -> models.GreetingWithErrorsOutput: + """ + This operation has three possible return values: + + 1. A successful response in the form of GreetingWithErrorsOutput + 2. An InvalidGreeting error. + 3. A ComplexError error. + + Implementations must be able to successfully take a response and + properly deserialize successful and error responses. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def greeting_with_errors( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.GreetingWithErrorsOutput: + return self._invoke( + self._select_input(models.GREETING_WITH_ERRORS, args, kwargs), + models.GREETING_WITH_ERRORS, + [], + plugins, + ) + + @overload + def host_with_path_operation( + self, + request: models.HostWithPathOperationInput + | models.HostWithPathOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.HostWithPathOperationOutput: ... + + @overload + def host_with_path_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.HostWithPathOperationInputDict], + ) -> models.HostWithPathOperationOutput: + """ + Invokes the HostWithPathOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def host_with_path_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.HostWithPathOperationOutput: + return self._invoke( + self._select_input(models.HOST_WITH_PATH_OPERATION, args, kwargs), + models.HOST_WITH_PATH_OPERATION, + [], + plugins, + ) + + @overload + def json_unions( + self, + request: models.JsonUnionsInput | models.JsonUnionsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.JsonUnionsOutput: ... + + @overload + def json_unions( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.JsonUnionsInputDict], + ) -> models.JsonUnionsOutput: + """ + This operation uses unions for inputs and outputs. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def json_unions( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.JsonUnionsOutput: + return self._invoke( + self._select_input(models.JSON_UNIONS, args, kwargs), + models.JSON_UNIONS, + [], + plugins, + ) + + @overload + def no_input_and_no_output( + self, + request: models.NoInputAndNoOutputInput | models.NoInputAndNoOutputInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.NoInputAndNoOutputOutput: ... + + @overload + def no_input_and_no_output( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.NoInputAndNoOutputInputDict], + ) -> models.NoInputAndNoOutputOutput: + """ + The example tests how requests and responses are serialized when there's + no request or response payload because the operation has no input or + output. + While this should be rare, code generators must support this. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def no_input_and_no_output( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.NoInputAndNoOutputOutput: + return self._invoke( + self._select_input(models.NO_INPUT_AND_NO_OUTPUT, args, kwargs), + models.NO_INPUT_AND_NO_OUTPUT, + [], + plugins, + ) + + @overload + def no_input_and_output( + self, + request: models.NoInputAndOutputInput | models.NoInputAndOutputInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.NoInputAndOutputOutput: ... + + @overload + def no_input_and_output( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.NoInputAndOutputInputDict], + ) -> models.NoInputAndOutputOutput: + """ + The example tests how requests and responses are serialized when there's + no request or response payload because the operation has no input and + the + output is empty. While this should be rare, code generators must support + this. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def no_input_and_output( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.NoInputAndOutputOutput: + return self._invoke( + self._select_input(models.NO_INPUT_AND_OUTPUT, args, kwargs), + models.NO_INPUT_AND_OUTPUT, + [], + plugins, + ) + + @overload + def operation_with_defaults( + self, + request: models.OperationWithDefaultsInput + | models.OperationWithDefaultsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.OperationWithDefaultsOutput: ... + + @overload + def operation_with_defaults( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.OperationWithDefaultsInputDict], + ) -> models.OperationWithDefaultsOutput: + """ + Invokes the OperationWithDefaults operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def operation_with_defaults( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.OperationWithDefaultsOutput: + return self._invoke( + self._select_input(models.OPERATION_WITH_DEFAULTS, args, kwargs), + models.OPERATION_WITH_DEFAULTS, + [], + plugins, + ) + + @overload + def operation_with_nested_structure( + self, + request: models.OperationWithNestedStructureInput + | models.OperationWithNestedStructureInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.OperationWithNestedStructureOutput: ... + + @overload + def operation_with_nested_structure( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.OperationWithNestedStructureInputDict], + ) -> models.OperationWithNestedStructureOutput: + """ + Invokes the OperationWithNestedStructure operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def operation_with_nested_structure( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.OperationWithNestedStructureOutput: + return self._invoke( + self._select_input(models.OPERATION_WITH_NESTED_STRUCTURE, args, kwargs), + models.OPERATION_WITH_NESTED_STRUCTURE, + [], + plugins, + ) + + @overload + def operation_with_required_members( + self, + request: models.OperationWithRequiredMembersInput + | models.OperationWithRequiredMembersInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.OperationWithRequiredMembersOutput: ... + + @overload + def operation_with_required_members( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.OperationWithRequiredMembersInputDict], + ) -> models.OperationWithRequiredMembersOutput: + """ + Invokes the OperationWithRequiredMembers operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def operation_with_required_members( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.OperationWithRequiredMembersOutput: + return self._invoke( + self._select_input(models.OPERATION_WITH_REQUIRED_MEMBERS, args, kwargs), + models.OPERATION_WITH_REQUIRED_MEMBERS, + [], + plugins, + ) + + @overload + def operation_with_required_members_with_defaults( + self, + request: models.OperationWithRequiredMembersWithDefaultsInput + | models.OperationWithRequiredMembersWithDefaultsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.OperationWithRequiredMembersWithDefaultsOutput: ... + + @overload + def operation_with_required_members_with_defaults( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.OperationWithRequiredMembersWithDefaultsInputDict], + ) -> models.OperationWithRequiredMembersWithDefaultsOutput: + """ + Invokes the OperationWithRequiredMembersWithDefaults operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def operation_with_required_members_with_defaults( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.OperationWithRequiredMembersWithDefaultsOutput: + return self._invoke( + self._select_input( + models.OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS, args, kwargs + ), + models.OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS, + [], + plugins, + ) + + @overload + def put_with_content_encoding( + self, + request: models.PutWithContentEncodingInput + | models.PutWithContentEncodingInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.PutWithContentEncodingOutput: ... + + @overload + def put_with_content_encoding( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.PutWithContentEncodingInputDict], + ) -> models.PutWithContentEncodingOutput: + """ + Invokes the PutWithContentEncoding operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def put_with_content_encoding( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.PutWithContentEncodingOutput: + return self._invoke( + self._select_input(models.PUT_WITH_CONTENT_ENCODING, args, kwargs), + models.PUT_WITH_CONTENT_ENCODING, + [], + plugins, + ) + + @overload + def query_incompatible_operation( + self, + request: models.QueryIncompatibleOperationInput + | models.QueryIncompatibleOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.QueryIncompatibleOperationOutput: ... + + @overload + def query_incompatible_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.QueryIncompatibleOperationInputDict], + ) -> models.QueryIncompatibleOperationOutput: + """ + Invokes the QueryIncompatibleOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def query_incompatible_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.QueryIncompatibleOperationOutput: + return self._invoke( + self._select_input(models.QUERY_INCOMPATIBLE_OPERATION, args, kwargs), + models.QUERY_INCOMPATIBLE_OPERATION, + [], + plugins, + ) + + @overload + def simple_scalar_properties( + self, + request: models.SimpleScalarPropertiesInput + | models.SimpleScalarPropertiesInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.SimpleScalarPropertiesOutput: ... + + @overload + def simple_scalar_properties( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.SimpleScalarPropertiesInputDict], + ) -> models.SimpleScalarPropertiesOutput: + """ + Invokes the SimpleScalarProperties operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def simple_scalar_properties( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.SimpleScalarPropertiesOutput: + return self._invoke( + self._select_input(models.SIMPLE_SCALAR_PROPERTIES, args, kwargs), + models.SIMPLE_SCALAR_PROPERTIES, + [], + plugins, + ) + + def _new_config(self) -> JSONRPC10Config: + return JSONRPC10Config.resolve() + + def _post_setup(self, config: JSONRPC10Config) -> None: + if config.aws_credentials_identity_resolver is None: + config_context = config.resolution_context() + config_file = None + profile_name = None + if config_context is not None: + config_file = config_context.parsed_profiles() + if config_context.profile_source is ConfigSource.OVERRIDE: + profile_name = config_context.profile_name + config.aws_credentials_identity_resolver = IdentityChain.create( + AWSCredentialsIdentity, + config_file=config_file, + profile_name=profile_name, + region_override=config.region, + http_client=cast(HTTPClient | None, config.transport), + ) diff --git a/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/config.py b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/config.py new file mode 100644 index 000000000..6635409da --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/config.py @@ -0,0 +1,118 @@ +from collections.abc import Callable +from dataclasses import dataclass, field +from typing import Any, ClassVar, Self, Unpack + +from smithy_aws_core.auth.sigv4 import SigV4AuthScheme +from smithy_aws_core.config.aws_config import AwsConfig, AwsConfigOverrides +from smithy_aws_core.config.filesystem import FileSystem +from smithy_aws_core.config.resolvers import EndpointUriResolver +from smithy_aws_core.config.types import FieldSpec +from smithy_aws_core.endpoints import AWS_RULES_EXTENSION +from smithy_aws_core.protocols import AwsJson10ClientProtocol +from smithy_core.auth import DefaultAuthResolver +from smithy_core.endpoints import BddEndpointResolver +from smithy_core.interceptors import Interceptor +from smithy_core.interfaces import ( + ClientProtocol, + EndpointResolver, + ProtocolConstructor, + ProtocolSettings, +) +from smithy_core.interfaces.auth import AuthScheme, AuthSchemeResolver +from smithy_core.shapes import ShapeID +from smithy_http.urllib3 import Urllib3HTTPClient + +from awsjson10_client._private.endpoints import BDD +from awsjson10_client._private.schemas import JSON_RPC10 + +_PROTOCOL_SETTINGS = ProtocolSettings( + namespace="aws.protocoltests.json10", + service_target="JsonRpc10", + version="2020-07-14", + service_schema=JSON_RPC10, +) + + +class _JSONRPC10ConfigOverrides(AwsConfigOverrides, total=False): + "Explicit field values JSONRPC10Config.resolve accepts." + + endpoint_resolver: EndpointResolver | None + protocol: ( + ClientProtocol[Any, Any] | ProtocolConstructor[ClientProtocol[Any, Any]] | None + ) + auth_schemes: dict[ShapeID, AuthScheme[Any, Any, Any, Any]] | None + auth_scheme_resolver: AuthSchemeResolver | None + + +@dataclass(kw_only=True, repr=False, init=False) +class JSONRPC10Config(AwsConfig): + "Configuration for JSONRPC10Client." + + interceptors: list[Interceptor[Any, Any, Any, Any]] = field( + default_factory=list[Interceptor[Any, Any, Any, Any]] + ) + "Hooks called during the execution of a request." + + endpoint_resolver: EndpointResolver | None = None + "Resolves the endpoint of each operation." + + protocol: ClientProtocol[Any, Any] | None = None + "Serializes requests and deserializes responses." + + auth_schemes: dict[ShapeID, AuthScheme[Any, Any, Any, Any]] | None = None + "Auth schemes by auth scheme ID." + + auth_scheme_resolver: AuthSchemeResolver | None = None + "Determines the auth scheme for each operation." + + _FIELDS: ClassVar[dict[str, FieldSpec]] = { + **AwsConfig._FIELDS, + "endpoint_uri": FieldSpec( + default=None, resolver=EndpointUriResolver("json_rpc_10").program + ), + "endpoint_resolver": FieldSpec( + default_factory=lambda: BddEndpointResolver( + BDD, extensions=[AWS_RULES_EXTENSION] + ) + ), + "protocol": FieldSpec( + default_factory=lambda: AwsJson10ClientProtocol(_PROTOCOL_SETTINGS), + converter=lambda p: p(_PROTOCOL_SETTINGS) if isinstance(p, type) else p, + ), + "auth_schemes": FieldSpec( + default_factory=lambda: { + ShapeID("aws.auth#sigv4"): SigV4AuthScheme(service="jsonrpc10") + } + ), + "auth_scheme_resolver": FieldSpec(default_factory=DefaultAuthResolver), + "transport": FieldSpec(default_factory=lambda: Urllib3HTTPClient()), + } + + def set_auth_scheme(self, scheme: AuthScheme[Any, Any, Any, Any]) -> None: + "Set an auth scheme under its scheme ID." + auth_schemes = dict(self.auth_schemes or {}) + auth_schemes[scheme.scheme_id] = scheme + self.auth_schemes = auth_schemes + + @classmethod + def resolve( # pyright: ignore[reportIncompatibleMethodOverride] + cls, + *, + profile: str | None = None, + fs: FileSystem | None = None, + config_file_path: str | None = None, + credentials_file_path: str | None = None, + **overrides: Unpack[_JSONRPC10ConfigOverrides], + ) -> Self: + "Resolve the config from overrides, the environment, and config files." + return cls._resolve( + profile=profile, + fs=fs, + config_file_path=config_file_path, + credentials_file_path=credentials_file_path, + overrides=overrides, + ) + + +type Plugin = Callable[[JSONRPC10Config], None] +"A callable that customizes the client configuration." diff --git a/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/models.py b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/models.py new file mode 100644 index 000000000..b2e58fb68 --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/models.py @@ -0,0 +1,230 @@ +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", + "EndpointOperationInput": "ENDPOINT_OPERATION_INPUT", + "EndpointOperationOutput": "ENDPOINT_OPERATION_OUTPUT", + "EndpointWithHostLabelOperationOutput": "ENDPOINT_WITH_HOST_LABEL_OPERATION_OUTPUT", + "HostWithPathOperationInput": "HOST_WITH_PATH_OPERATION_INPUT", + "HostWithPathOperationOutput": "HOST_WITH_PATH_OPERATION_OUTPUT", + "NoInputAndNoOutputInput": "NO_INPUT_AND_NO_OUTPUT_INPUT", + "NoInputAndNoOutputOutput": "NO_INPUT_AND_NO_OUTPUT_OUTPUT", + "NoInputAndOutputInput": "NO_INPUT_AND_OUTPUT_INPUT", + "OperationWithRequiredMembersInput": "OPERATION_WITH_REQUIRED_MEMBERS_INPUT", + "OperationWithRequiredMembersWithDefaultsInput": "OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS_INPUT", + "PutWithContentEncodingOutput": "PUT_WITH_CONTENT_ENCODING_OUTPUT", + "QueryIncompatibleOperationInput": "QUERY_INCOMPATIBLE_OPERATION_INPUT", + "QueryIncompatibleOperationOutput": "QUERY_INCOMPATIBLE_OPERATION_OUTPUT", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_OPERATIONS: dict[str, tuple[tuple[str, ...], tuple[str, ...]]] = { + "CONTENT_TYPE_PARAMETERS": ( + (), + ("aws.auth#sigv4",), + ), + "EMPTY_INPUT_AND_EMPTY_OUTPUT": ( + (), + ("aws.auth#sigv4",), + ), + "ENDPOINT_OPERATION": ( + (), + ("aws.auth#sigv4",), + ), + "ENDPOINT_WITH_HOST_LABEL_OPERATION": ( + (), + ("aws.auth#sigv4",), + ), + "GREETING_WITH_ERRORS": ( + ( + "aws.protocoltests.json10#ComplexError", + "aws.protocoltests.json10#FooError", + "aws.protocoltests.json10#InvalidGreeting", + ), + ("aws.auth#sigv4",), + ), + "HOST_WITH_PATH_OPERATION": ( + (), + ("aws.auth#sigv4",), + ), + "JSON_UNIONS": ( + (), + ("aws.auth#sigv4",), + ), + "NO_INPUT_AND_NO_OUTPUT": ( + (), + ("aws.auth#sigv4",), + ), + "NO_INPUT_AND_OUTPUT": ( + (), + ("aws.auth#sigv4",), + ), + "OPERATION_WITH_DEFAULTS": ( + (), + ("aws.auth#sigv4",), + ), + "OPERATION_WITH_NESTED_STRUCTURE": ( + (), + ("aws.auth#sigv4",), + ), + "OPERATION_WITH_REQUIRED_MEMBERS": ( + (), + ("aws.auth#sigv4",), + ), + "OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS": ( + (), + ("aws.auth#sigv4",), + ), + "PUT_WITH_CONTENT_ENCODING": ( + (), + ("aws.auth#sigv4",), + ), + "QUERY_INCOMPATIBLE_OPERATION": ( + (), + ("aws.auth#sigv4",), + ), + "SIMPLE_SCALAR_PROPERTIES": ( + (), + ("aws.auth#sigv4",), + ), +} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES, *_OPERATIONS) # 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", + "EndpointOperationInput", + "EndpointOperationOutput", + "EndpointWithHostLabelOperationInput", + "EndpointWithHostLabelOperationOutput", + "Farewell", + "FooEnum", + "FooError", + "GreetingStruct", + "GreetingWithErrorsInput", + "GreetingWithErrorsOutput", + "HostWithPathOperationInput", + "HostWithPathOperationOutput", + "IntegerEnum", + "InvalidGreeting", + "JsonUnionsInput", + "JsonUnionsOutput", + "MyUnion", + "NoInputAndNoOutputInput", + "NoInputAndNoOutputOutput", + "NoInputAndOutputInput", + "NoInputAndOutputOutput", + "OperationWithDefaultsInput", + "OperationWithDefaultsOutput", + "OperationWithNestedStructureInput", + "OperationWithNestedStructureOutput", + "OperationWithRequiredMembersInput", + "OperationWithRequiredMembersOutput", + "OperationWithRequiredMembersWithDefaultsInput", + "OperationWithRequiredMembersWithDefaultsOutput", + "PutWithContentEncodingInput", + "PutWithContentEncodingOutput", + "QueryIncompatibleOperationInput", + "QueryIncompatibleOperationOutput", + "RequiredEnum", + "RequiredIntEnum", + "SimpleScalarPropertiesInput", + "SimpleScalarPropertiesOutput", + "TestEnum", + "TestIntEnum", + "TopLevel", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + if (data := _OPERATIONS.get(name)) is not None: + return globals().setdefault(name, _registry.build_operation(name, *data)) + 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-client/src/awsjson10_client/models.pyi b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/models.pyi new file mode 100644 index 000000000..5dd153d3a --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/models.pyi @@ -0,0 +1,894 @@ +from collections.abc import Mapping, Sequence +from dataclasses import dataclass +from datetime import datetime +from enum import IntEnum, StrEnum +from typing import Required, Self, TypedDict + +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.schemas import APIOperation +from smithy_core.serializers import ShapeSerializer +from smithy_core.types import UnknownEnumMixin + +__all__ = [ + "CONTENT_TYPE_PARAMETERS", + "EMPTY_INPUT_AND_EMPTY_OUTPUT", + "ENDPOINT_OPERATION", + "ENDPOINT_WITH_HOST_LABEL_OPERATION", + "GREETING_WITH_ERRORS", + "HOST_WITH_PATH_OPERATION", + "JSON_UNIONS", + "NO_INPUT_AND_NO_OUTPUT", + "NO_INPUT_AND_OUTPUT", + "OPERATION_WITH_DEFAULTS", + "OPERATION_WITH_NESTED_STRUCTURE", + "OPERATION_WITH_REQUIRED_MEMBERS", + "OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS", + "PUT_WITH_CONTENT_ENCODING", + "QUERY_INCOMPATIBLE_OPERATION", + "SIMPLE_SCALAR_PROPERTIES", + "ClientOptionalDefaults", + "ComplexError", + "ComplexNestedErrorData", + "ContentTypeParametersInput", + "ContentTypeParametersOutput", + "Defaults", + "Dialog", + "EmptyInputAndEmptyOutputInput", + "EmptyInputAndEmptyOutputOutput", + "EndpointOperationInput", + "EndpointOperationOutput", + "EndpointWithHostLabelOperationInput", + "EndpointWithHostLabelOperationOutput", + "Farewell", + "FooEnum", + "FooError", + "GreetingStruct", + "GreetingWithErrorsInput", + "GreetingWithErrorsOutput", + "HostWithPathOperationInput", + "HostWithPathOperationOutput", + "IntegerEnum", + "InvalidGreeting", + "JsonUnionsInput", + "JsonUnionsOutput", + "MyUnion", + "MyUnionBlobValue", + "MyUnionBooleanValue", + "MyUnionEnumValue", + "MyUnionIntEnumValue", + "MyUnionListValue", + "MyUnionMapValue", + "MyUnionNumberValue", + "MyUnionStringValue", + "MyUnionStructureValue", + "MyUnionTimestampValue", + "MyUnionUnknown", + "NoInputAndNoOutputInput", + "NoInputAndNoOutputOutput", + "NoInputAndOutputInput", + "NoInputAndOutputOutput", + "OperationWithDefaultsInput", + "OperationWithDefaultsOutput", + "OperationWithNestedStructureInput", + "OperationWithNestedStructureOutput", + "OperationWithRequiredMembersInput", + "OperationWithRequiredMembersOutput", + "OperationWithRequiredMembersWithDefaultsInput", + "OperationWithRequiredMembersWithDefaultsOutput", + "PutWithContentEncodingInput", + "PutWithContentEncodingOutput", + "QueryIncompatibleOperationInput", + "QueryIncompatibleOperationOutput", + "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 = ... + +class ClientOptionalDefaultsDict(TypedDict, total=False): + "Dictionary form of `ClientOptionalDefaults`." + + 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 = ... + +class ContentTypeParametersInputDict(TypedDict, total=False): + "Dictionary form of `ContentTypeParametersInput`." + + 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 = ... + +class DefaultsDict(TypedDict, total=False): + "Dictionary form of `Defaults`." + + default_string: str | None + default_boolean: bool | None + default_list: Sequence[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: Mapping[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 = ... + +class DialogDict(TypedDict, total=False): + "Dictionary form of `Dialog`." + + language: str | None + greeting: str | None + farewell: Farewell | FarewellDict | None + +@dataclass(kw_only=True) +class EmptyInputAndEmptyOutputInput(_SerdeShape): + "Dataclass for EmptyInputAndEmptyOutputInput structure." + +class EmptyInputAndEmptyOutputInputDict(TypedDict, total=False): + "Dictionary form of `EmptyInputAndEmptyOutputInput`." + +@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 = ... + +class EndpointWithHostLabelOperationInputDict(TypedDict, total=False): + "Dictionary form of `EndpointWithHostLabelOperationInput`." + + label: Required[str] + +@dataclass(kw_only=True) +class Farewell(_SerdeShape): + "Dataclass for Farewell structure." + + phrase: str | None = ... + +class FarewellDict(TypedDict, total=False): + "Dictionary form of `Farewell`." + + 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 = ... + +class GreetingWithErrorsInputDict(TypedDict, total=False): + "Dictionary form of `GreetingWithErrorsInput`." + + 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 = ... + +class JsonUnionsInputDict(TypedDict, total=False): + "Dictionary form of `JsonUnionsInput`." + + contents: MyUnion | MyUnionDict | 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: ... + +class MyUnionStringValueDict(TypedDict): + string_value: str + +class MyUnionBooleanValueDict(TypedDict): + boolean_value: bool + +class MyUnionNumberValueDict(TypedDict): + number_value: int + +class MyUnionBlobValueDict(TypedDict): + blob_value: bytes + +class MyUnionTimestampValueDict(TypedDict): + timestamp_value: datetime + +class MyUnionEnumValueDict(TypedDict): + enum_value: str + +class MyUnionIntEnumValueDict(TypedDict): + int_enum_value: int + +class MyUnionListValueDict(TypedDict): + list_value: Sequence[str] + +class MyUnionMapValueDict(TypedDict): + map_value: Mapping[str, str] + +class MyUnionStructureValueDict(TypedDict): + structure_value: GreetingStruct | GreetingStructDict + +MyUnionDict = ( + MyUnionStringValueDict + | MyUnionBooleanValueDict + | MyUnionNumberValueDict + | MyUnionBlobValueDict + | MyUnionTimestampValueDict + | MyUnionEnumValueDict + | MyUnionIntEnumValueDict + | MyUnionListValueDict + | MyUnionMapValueDict + | MyUnionStructureValueDict +) +"Dictionary form of `MyUnion`, setting exactly one variant." + +@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 = ... + +class OperationWithDefaultsInputDict(TypedDict, total=False): + "Dictionary form of `OperationWithDefaultsInput`." + + defaults: Defaults | DefaultsDict | None + client_optional_defaults: ClientOptionalDefaults | ClientOptionalDefaultsDict | 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 = ... + +class OperationWithNestedStructureInputDict(TypedDict, total=False): + "Dictionary form of `OperationWithNestedStructureInput`." + + top_level: Required[TopLevel | TopLevelDict] + +@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 PutWithContentEncodingInputDict(TypedDict, total=False): + "Dictionary form of `PutWithContentEncodingInput`." + + 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 = ... + +class SimpleScalarPropertiesInputDict(TypedDict, total=False): + "Dictionary form of `SimpleScalarPropertiesInput`." + + 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 TopLevelDict(TypedDict, total=False): + "Dictionary form of `TopLevel`." + + dialog: Required[Dialog | DialogDict] + dialog_list: Sequence[Dialog | DialogDict] | None + dialog_map: Mapping[str, Dialog | DialogDict] | 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 GreetingStructDict(TypedDict, total=False): + "Dictionary form of `GreetingStruct`." + + hi: str | None + +class IntegerEnum(UnknownEnumMixin, IntEnum): + A = 1 + B = 2 + C = 3 + +@dataclass(kw_only=True) +class EndpointOperationInput(_SerdeShape): + "Dataclass for EndpointOperationInput structure." + +class EndpointOperationInputDict(TypedDict, total=False): + "Dictionary form of `EndpointOperationInput`." + +@dataclass(kw_only=True) +class EndpointOperationOutput(_SerdeShape): + "Dataclass for EndpointOperationOutput 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 EndpointWithHostLabelOperationOutput(_SerdeShape): + "Dataclass for EndpointWithHostLabelOperationOutput 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 HostWithPathOperationInput(_SerdeShape): + "Dataclass for HostWithPathOperationInput structure." + +class HostWithPathOperationInputDict(TypedDict, total=False): + "Dictionary form of `HostWithPathOperationInput`." + +@dataclass(kw_only=True) +class HostWithPathOperationOutput(_SerdeShape): + "Dataclass for HostWithPathOperationOutput 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 NoInputAndNoOutputInput(_SerdeShape): + "Dataclass for NoInputAndNoOutputInput structure." + +class NoInputAndNoOutputInputDict(TypedDict, total=False): + "Dictionary form of `NoInputAndNoOutputInput`." + +@dataclass(kw_only=True) +class NoInputAndNoOutputOutput(_SerdeShape): + "Dataclass for NoInputAndNoOutputOutput 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 NoInputAndOutputInput(_SerdeShape): + "Dataclass for NoInputAndOutputInput structure." + +class NoInputAndOutputInputDict(TypedDict, total=False): + "Dictionary form of `NoInputAndOutputInput`." + +@dataclass(kw_only=True) +class OperationWithRequiredMembersInput(_SerdeShape): + "Dataclass for OperationWithRequiredMembersInput structure." + +class OperationWithRequiredMembersInputDict(TypedDict, total=False): + "Dictionary form of `OperationWithRequiredMembersInput`." + +@dataclass(kw_only=True) +class OperationWithRequiredMembersWithDefaultsInput(_SerdeShape): + "Dataclass for OperationWithRequiredMembersWithDefaultsInput structure." + +class OperationWithRequiredMembersWithDefaultsInputDict(TypedDict, total=False): + "Dictionary form of `OperationWithRequiredMembersWithDefaultsInput`." + +@dataclass(kw_only=True) +class PutWithContentEncodingOutput(_SerdeShape): + "Dataclass for PutWithContentEncodingOutput 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 QueryIncompatibleOperationInput(_SerdeShape): + "Dataclass for QueryIncompatibleOperationInput structure." + +class QueryIncompatibleOperationInputDict(TypedDict, total=False): + "Dictionary form of `QueryIncompatibleOperationInput`." + +@dataclass(kw_only=True) +class QueryIncompatibleOperationOutput(_SerdeShape): + "Dataclass for QueryIncompatibleOperationOutput 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. + """ + +CONTENT_TYPE_PARAMETERS: APIOperation[ + ContentTypeParametersInput, ContentTypeParametersOutput +] +EMPTY_INPUT_AND_EMPTY_OUTPUT: APIOperation[ + EmptyInputAndEmptyOutputInput, EmptyInputAndEmptyOutputOutput +] +ENDPOINT_OPERATION: APIOperation[EndpointOperationInput, EndpointOperationOutput] +ENDPOINT_WITH_HOST_LABEL_OPERATION: APIOperation[ + EndpointWithHostLabelOperationInput, EndpointWithHostLabelOperationOutput +] +GREETING_WITH_ERRORS: APIOperation[GreetingWithErrorsInput, GreetingWithErrorsOutput] +HOST_WITH_PATH_OPERATION: APIOperation[ + HostWithPathOperationInput, HostWithPathOperationOutput +] +JSON_UNIONS: APIOperation[JsonUnionsInput, JsonUnionsOutput] +NO_INPUT_AND_NO_OUTPUT: APIOperation[NoInputAndNoOutputInput, NoInputAndNoOutputOutput] +NO_INPUT_AND_OUTPUT: APIOperation[NoInputAndOutputInput, NoInputAndOutputOutput] +OPERATION_WITH_DEFAULTS: APIOperation[ + OperationWithDefaultsInput, OperationWithDefaultsOutput +] +OPERATION_WITH_NESTED_STRUCTURE: APIOperation[ + OperationWithNestedStructureInput, OperationWithNestedStructureOutput +] +OPERATION_WITH_REQUIRED_MEMBERS: APIOperation[ + OperationWithRequiredMembersInput, OperationWithRequiredMembersOutput +] +OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS: APIOperation[ + OperationWithRequiredMembersWithDefaultsInput, + OperationWithRequiredMembersWithDefaultsOutput, +] +PUT_WITH_CONTENT_ENCODING: APIOperation[ + PutWithContentEncodingInput, PutWithContentEncodingOutput +] +QUERY_INCOMPATIBLE_OPERATION: APIOperation[ + QueryIncompatibleOperationInput, QueryIncompatibleOperationOutput +] +SIMPLE_SCALAR_PROPERTIES: APIOperation[ + SimpleScalarPropertiesInput, SimpleScalarPropertiesOutput +] diff --git a/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/py.typed b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/user_agent.py b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/user_agent.py new file mode 100644 index 000000000..87920cdde --- /dev/null +++ b/codegen-output-py/aws-json-1-0-client/src/awsjson10_client/user_agent.py @@ -0,0 +1,16 @@ +from smithy_aws_core.interceptors.user_agent import UserAgentInterceptor + +from awsjson10_client import __version__ +from awsjson10_client.config import JSONRPC10Config + + +def aws_user_agent_plugin(config: JSONRPC10Config) -> None: + "Send the AWS user agent with every request." + config.interceptors.append( + UserAgentInterceptor( + ua_suffix=config.user_agent_extra, + ua_app_id=config.sdk_ua_app_id, + sdk_version=__version__, + service_id="JSON_RPC_10", + ) + ) diff --git a/codegen-output-py/aws-json-1-1-client/.smithy-python-manifest.json b/codegen-output-py/aws-json-1-1-client/.smithy-python-manifest.json new file mode 100644 index 000000000..67874fe98 --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/.smithy-python-manifest.json @@ -0,0 +1,21 @@ +{ + "files": { + "README.md": "50036bf4f4090acd512916a176f756f534fed38d2a4b38639057220d0be24172", + "pyproject.toml": "3105d67e51b3896fdec31d710d1421eb9e48c11ff598d13ed19de23ff4cc30b2", + "src/awsjson11_client/__init__.py": "51aa4811fbe9785c821be45177e9760a38d8b957d35ac1812e3ef85cc6c300ec", + "src/awsjson11_client/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/awsjson11_client/_private/endpoints.py": "7d515fe771678e82ddbe07798d6b7e48c25c6c9bec19cec9318deb0bc5064ead", + "src/awsjson11_client/_private/schemas.py": "39f6fcaed62547b27d149c3a2eb7c591b05d140eb4b63520b5c49ecf30e17c99", + "src/awsjson11_client/aio/__init__.py": "d4cd42353a6f80219be93c41d60c27b752e90e223bf4f37d0162c9456fdb48e5", + "src/awsjson11_client/aio/client.py": "3c7d63086da2b7116bfc51db85bdb593d799c3826ae83caeee3832cde4881063", + "src/awsjson11_client/aio/config.py": "5f170845cae3ea3fa70ae7cf4958f9e7dcb4ef0b82d51b540a8eba5e6f1e230d", + "src/awsjson11_client/aio/user_agent.py": "61bfd1fdbc339bc5b696baee392aa7428d6cd663c950c64d0658e7d188c53762", + "src/awsjson11_client/client.py": "d41809f6631a8587e487ee590e3a1cbf1f22e87a968387ed70b09dc1c1edd3f6", + "src/awsjson11_client/config.py": "d9b26a4f7004249b76ea30b2470bc652f2789e05ad42807fc4184bc49bc55864", + "src/awsjson11_client/models.py": "3e666b01d5b536476b4d0b990b8f39a73bd9479484bc931e08f684fbeae68f73", + "src/awsjson11_client/models.pyi": "a018f0bbb86538b80a7a59a84ebba899a773a18a3a38a905d1a14501a76ae736", + "src/awsjson11_client/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/awsjson11_client/user_agent.py": "3fafc1cefcb0969e6d2b41177a445247455ca6ddf0a7f6bbcfd89511611329b1" + }, + "version": 1 +} diff --git a/codegen-output-py/aws-json-1-1-client/README.md b/codegen-output-py/aws-json-1-1-client/README.md new file mode 100644 index 000000000..a6c27d18c --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/README.md @@ -0,0 +1,5 @@ + + +## awsjson11_client Client Package + +Python client for the aws-json-1-1 projection diff --git a/codegen-output-py/aws-json-1-1-client/pyproject.toml b/codegen-output-py/aws-json-1-1-client/pyproject.toml new file mode 100644 index 000000000..a9a7b4b1d --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/pyproject.toml @@ -0,0 +1,38 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "awsjson11_client" +version = "0.0.1" +description = "Python client for the aws-json-1-1 projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "awsjson11_client"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-aws-core[json]~=0.16.0", + "smithy-core~=0.13.0", + "smithy-http[aiohttp,urllib3]~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/awsjson11_client", +] + +[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-client/src/awsjson11_client/__init__.py b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/__init__.py new file mode 100644 index 000000000..efb46f6a0 --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/__init__.py @@ -0,0 +1,30 @@ +from importlib import import_module +from typing import TYPE_CHECKING, Any + +__version__: str = "0.0.1" + +if TYPE_CHECKING: + from .aio.client import AsyncJsonProtocolClient + from .aio.config import AsyncJsonProtocolConfig + from .client import JsonProtocolClient + from .config import JsonProtocolConfig + +__all__ = [ + "AsyncJsonProtocolClient", + "AsyncJsonProtocolConfig", + "JsonProtocolClient", + "JsonProtocolConfig", +] + +_EXPORTS = { + "JsonProtocolClient": ".client", + "JsonProtocolConfig": ".config", + "AsyncJsonProtocolClient": ".aio.client", + "AsyncJsonProtocolConfig": ".aio.config", +} + + +def __getattr__(name: str) -> Any: + if name in _EXPORTS: + return getattr(import_module(_EXPORTS[name], __name__), name) + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") diff --git a/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/_private/__init__.py b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/_private/endpoints.py b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/_private/endpoints.py new file mode 100644 index 000000000..ad3066783 --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/_private/endpoints.py @@ -0,0 +1,27 @@ +from smithy_core.endpoints import EndpointBdd + +# fmt: off +# Tags: ref=0, attr=1, call=2, list=3, map=4, error=5, endpoint=6. +BDD = EndpointBdd( + # (name, type, required, default, builtin, client_context_attribute) + parameters=( + ("endpoint", "string", False, None, "SDK::Endpoint", None), + ), + functions=("isSet",), + conditions=( + ((2, "isSet", (0, "endpoint")), None), # 0: isSet(endpoint) + ), + results=( + None, # 0: no match + (6, (0, "endpoint"), None, ()), # 1 + (5, "(default endpointRuleSet) endpoint is not set - you must configure an endpoint."), # 2 + ), + root=2, + # (condition, high, low); 1 and -1 are terminals, a negative reference is a + # complement edge, and 100_000_000 + k is result k. + nodes=( + -1, 1, -1, + 0, 100_000_001, 100_000_002, + ), +) +# fmt: on diff --git a/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/_private/schemas.py b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/_private/schemas.py new file mode 100644 index 000000000..ee4c09580 --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/_private/schemas.py @@ -0,0 +1,1248 @@ +from types import MappingProxyType + +from smithy_core._schema_compact import StaticOperationSchema, 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.synthetic#originalShapeId" +_s11 = "aws.protocoltests.json#ContentTypeParametersInput" +_s12 = "smithy.api#input" +_s13 = "value" +_s14 = "ContentTypeParametersOutput" +_s15 = "aws.protocoltests.json#ContentTypeParametersOutput" +_s16 = "smithy.api#output" +n1 = "aws.protocoltests.shared" +_s17 = "DateTime" +_s18 = "smithy.api#timestampFormat" +_s19 = "date-time" +_s20 = "DatetimeOffsetsOutput" +_s21 = "aws.protocoltests.json#DatetimeOffsetsOutput" +_s22 = "datetime" +_s23 = "Document" +_s24 = "EmptyStruct" +_s25 = "JsonValue" +_s26 = "smithy.api#mediaType" +_s27 = "application/json" +_s28 = "ListOfStrings" +_s29 = "member" +_s30 = "ListOfListOfStrings" +_s31 = "MapOfStrings" +_s32 = "key" +_s33 = "ListOfMapsOfStrings" +_s34 = "SimpleStruct" +_s35 = "Value" +_s36 = "ListOfStructs" +_s37 = "MapOfListsOfStrings" +_s38 = "MapOfMapOfStrings" +_s39 = "MapOfStructs" +_s40 = "StructWithJsonName" +_s41 = "RenamedMember" +_s42 = "ErrorWithMembers" +_s43 = "Code" +_s44 = "ComplexData" +_s45 = "IntegerField" +_s46 = "ListField" +_s47 = "MapField" +_s48 = "Message" +_s49 = "StringField" +_s50 = "ErrorWithoutMembers" +_s51 = "server" +_s52 = "FooError" +_s53 = "FractionalSecondsOutput" +_s54 = "aws.protocoltests.json#FractionalSecondsOutput" +_s55 = "GreetingWithErrorsOutput" +_s56 = "aws.protocoltests.json#GreetingWithErrorsOutput" +_s57 = "greeting" +_s58 = "InvalidGreeting" +_s59 = "FooEnum" +_s60 = "FOO" +_s61 = "smithy.api#enumValue" +_s62 = "BAZ" +_s63 = "Baz" +_s64 = "BAR" +_s65 = "Bar" +_s66 = "ONE" +_s67 = "1" +_s68 = "ZERO" +_s69 = "0" +_s70 = "StringList" +_s71 = "StringMap" +_s72 = "GreetingStruct" +_s73 = "hi" +_s74 = "MyUnion" +_s75 = "stringValue" +_s76 = "booleanValue" +_s77 = "numberValue" +_s78 = "blobValue" +_s79 = "timestampValue" +_s80 = "enumValue" +_s81 = "listValue" +_s82 = "mapValue" +_s83 = "structureValue" +_s84 = "OperationWithOptionalInputOutputInput" +_s85 = "aws.protocoltests.json#OperationWithOptionalInputOutputInput" +_s86 = "OperationWithOptionalInputOutputOutput" +_s87 = "aws.protocoltests.json#OperationWithOptionalInputOutputOutput" +_s88 = "PutWithContentEncodingInput" +_s89 = "aws.protocoltests.json#PutWithContentEncodingInput" +_s90 = "encoding" +_s91 = "smithy.api#httpHeader" +_s92 = "Content-Encoding" +_s93 = "data" +_s94 = "FooEnumList" +_s95 = "FooEnumMap" +_s96 = "FooEnumSet" +_s97 = "IntegerEnum" +_s98 = "A" +_s99 = "B" +_s100 = "C" +_s101 = "IntegerEnumList" +_s102 = "IntegerEnumMap" +_s103 = "IntegerEnumSet" +_s104 = "SparseStringList" +_s105 = "SparseStringMap" +_s106 = "DatetimeOffsetsInput" +_s107 = "smithy.api#Unit" +_s108 = "EmptyOperationInput" +_s109 = "EmptyOperationOutput" +_s110 = "EndpointOperationInput" +_s111 = "EndpointOperationOutput" +_s112 = "EndpointWithHostLabelOperationInput" +_s113 = "aws.protocoltests.json#HostLabelInput" +_s114 = "label" +_s115 = "EndpointWithHostLabelOperationOutput" +_s116 = "FractionalSecondsInput" +_s117 = "GreetingWithErrorsInput" +_s118 = "HostWithPathOperationInput" +_s119 = "HostWithPathOperationOutput" +_s120 = "JsonEnumsInput" +_s121 = "aws.protocoltests.json#JsonEnumsInputOutput" +_s122 = "fooEnum1" +_s123 = "fooEnum2" +_s124 = "fooEnum3" +_s125 = "fooEnumList" +_s126 = "fooEnumSet" +_s127 = "fooEnumMap" +_s128 = "JsonEnumsOutput" +_s129 = "JsonIntEnumsInput" +_s130 = "aws.protocoltests.json#JsonIntEnumsInputOutput" +_s131 = "intEnum1" +_s132 = "intEnum2" +_s133 = "intEnum3" +_s134 = "intEnumList" +_s135 = "intEnumSet" +_s136 = "intEnumMap" +_s137 = "JsonIntEnumsOutput" +_s138 = "JsonUnionsInput" +_s139 = "aws.protocoltests.json#UnionInputOutput" +_s140 = "contents" +_s141 = "JsonUnionsOutput" +_s142 = "KitchenSinkOperationInput" +_s143 = "aws.protocoltests.json#KitchenSink" +_s144 = "Blob" +_s145 = "Boolean" +_s146 = "Double" +_s147 = "Float" +_s148 = "HttpdateTimestamp" +_s149 = "http-date" +_s150 = "Integer" +_s151 = "Iso8601Timestamp" +_s152 = "ListOfLists" +_s153 = "Long" +_s154 = "MapOfMaps" +_s155 = "RecursiveList" +_s156 = "RecursiveMap" +_s157 = "RecursiveStruct" +_s158 = "String" +_s159 = "Timestamp" +_s160 = "UnixTimestamp" +_s161 = "epoch-seconds" +_s162 = "KitchenSinkOperationOutput" +_s163 = "NullOperationInput" +_s164 = "aws.protocoltests.json#NullOperationInputOutput" +_s165 = "string" +_s166 = "NullOperationOutput" +_s167 = "PutAndGetInlineDocumentsInput" +_s168 = "aws.protocoltests.json#PutAndGetInlineDocumentsInputOutput" +_s169 = "inlineDocument" +_s170 = "PutAndGetInlineDocumentsOutput" +_s171 = "PutWithContentEncodingOutput" +_s172 = "SimpleScalarPropertiesInput" +_s173 = "aws.protocoltests.json#SimpleScalarPropertiesInputOutput" +_s174 = "floatValue" +_s175 = "doubleValue" +_s176 = "SimpleScalarPropertiesOutput" +_s177 = "SparseNullsOperationInput" +_s178 = "aws.protocoltests.json#SparseNullsOperationInputOutput" +_s179 = "sparseStringList" +_s180 = "sparseStringMap" +_s181 = "SparseNullsOperationOutput" +_s182 = "ContentTypeParameters" +_s183 = "DatetimeOffsets" +_s184 = "EmptyOperation" +_s185 = "EndpointOperation" +_s186 = "smithy.api#endpoint" +_s187 = "EndpointWithHostLabelOperation" +_s188 = "FractionalSeconds" +_s189 = "GreetingWithErrors" +_s190 = "HostWithPathOperation" +_s191 = "JsonEnums" +_s192 = "JsonIntEnums" +_s193 = "JsonUnions" +_s194 = "KitchenSinkOperation" +_s195 = "NullOperation" +_s196 = "OperationWithOptionalInputOutput" +_s197 = "PutAndGetInlineDocuments" +_s198 = "PutWithContentEncoding" +_s199 = "smithy.api#requestCompression" +_s200 = "SimpleScalarProperties" +_s201 = "SparseNullsOperation" +_s202 = "JsonProtocol" +_s203 = "aws.api#service" +_s204 = "aws.auth#sigv4" +_s205 = "aws.protocols#awsJson1_1" +_s206 = "KitchenSink" +_s207 = "ListOfKitchenSinks" +_s208 = "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: _s11, _s12: None}, + (_s13,), + ((7, 0),), +) + +CONTENT_TYPE_PARAMETERS_OUTPUT: StaticSchema = ( + 18, + n0, + _s14, + {_s10: _s15, _s16: None}, +) + +DATE_TIME: StaticSchema = ( + 4, + n1, + _s17, + {_s18: _s19}, +) + +DATETIME_OFFSETS_OUTPUT: StaticSchema = ( + 18, + n0, + _s20, + {_s10: _s21, _s16: None}, + (_s22,), + ((DATE_TIME, 0),), +) + +DOCUMENT: StaticSchema = ( + 13, + n0, + _s23, + 0, +) + +EMPTY_STRUCT: StaticSchema = ( + 18, + n0, + _s24, + 0, +) + +JSON_VALUE: StaticSchema = ( + 3, + n0, + _s25, + {_s26: _s27}, +) + +LIST_OF_STRINGS: StaticSchema = ( + 16, + n0, + _s28, + 0, + (_s29,), + ((3, 0),), +) + +LIST_OF_LIST_OF_STRINGS: StaticSchema = ( + 16, + n0, + _s30, + 0, + (_s29,), + ((LIST_OF_STRINGS, 0),), +) + +MAP_OF_STRINGS: StaticSchema = ( + 17, + n0, + _s31, + 0, + (_s32, _s13), + ((3, 0), (3, 0)), +) + +LIST_OF_MAPS_OF_STRINGS: StaticSchema = ( + 16, + n0, + _s33, + 0, + (_s29,), + ((MAP_OF_STRINGS, 0),), +) + +SIMPLE_STRUCT: StaticSchema = ( + 18, + n0, + _s34, + 0, + (_s35,), + ((3, 0),), +) + +LIST_OF_STRUCTS: StaticSchema = ( + 16, + n0, + _s36, + 0, + (_s29,), + ((SIMPLE_STRUCT, 0),), +) + +MAP_OF_LISTS_OF_STRINGS: StaticSchema = ( + 17, + n0, + _s37, + 0, + (_s32, _s13), + ((3, 0), (LIST_OF_STRINGS, 0)), +) + +MAP_OF_MAP_OF_STRINGS: StaticSchema = ( + 17, + n0, + _s38, + 0, + (_s32, _s13), + ((3, 0), (MAP_OF_STRINGS, 0)), +) + +MAP_OF_STRUCTS: StaticSchema = ( + 17, + n0, + _s39, + 0, + (_s32, _s13), + ((3, 0), (SIMPLE_STRUCT, 0)), +) + +STRUCT_WITH_JSON_NAME: StaticSchema = ( + 18, + n0, + _s40, + 0, + (_s35,), + ((3, {_s2: _s41}),), +) + +ERROR_WITH_MEMBERS: StaticSchema = ( + 18, + n0, + _s42, + {_s5: _s6}, + (_s43, _s44, _s45, _s46, _s47, _s48, _s49), + ( + (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, + _s50, + {_s5: _s51}, +) + +FOO_ERROR: StaticSchema = ( + 18, + n0, + _s52, + {_s5: _s51}, +) + +FRACTIONAL_SECONDS_OUTPUT: StaticSchema = ( + 18, + n0, + _s53, + {_s10: _s54, _s16: None}, + (_s22,), + ((DATE_TIME, 0),), +) + +GREETING_WITH_ERRORS_OUTPUT: StaticSchema = ( + 18, + n0, + _s55, + {_s10: _s56, _s16: None}, + (_s57,), + ((3, 0),), +) + +INVALID_GREETING: StaticSchema = ( + 18, + n0, + _s58, + {_s5: _s6}, + (_s48,), + ((3, 0),), +) + +FOO_ENUM: StaticSchema = ( + 14, + n1, + _s59, + 0, + (_s60, _s62, _s64, _s66, _s68), + ( + (-1, {_s61: _s1}), + (-1, {_s61: _s63}), + (-1, {_s61: _s65}), + (-1, {_s61: _s67}), + (-1, {_s61: _s69}), + ), +) + +STRING_LIST: StaticSchema = ( + 16, + n1, + _s70, + 0, + (_s29,), + ((3, 0),), +) + +STRING_MAP: StaticSchema = ( + 17, + n1, + _s71, + 0, + (_s32, _s13), + ((3, 0), (3, 0)), +) + +GREETING_STRUCT: StaticSchema = ( + 18, + n1, + _s72, + 0, + (_s73,), + ((3, 0),), +) + +MY_UNION: StaticSchema = ( + 19, + n0, + _s74, + 0, + (_s75, _s76, _s77, _s78, _s79, _s80, _s81, _s82, _s83), + ( + (3, 0), + (2, 0), + (7, 0), + (1, 0), + (4, 0), + (FOO_ENUM, 0), + (STRING_LIST, 0), + (STRING_MAP, 0), + (GREETING_STRUCT, 0), + ), +) + +OPERATION_WITH_OPTIONAL_INPUT_OUTPUT_INPUT: StaticSchema = ( + 18, + n0, + _s84, + {_s10: _s85, _s12: None}, + (_s35,), + ((3, 0),), +) + +OPERATION_WITH_OPTIONAL_INPUT_OUTPUT_OUTPUT: StaticSchema = ( + 18, + n0, + _s86, + {_s10: _s87, _s16: None}, + (_s35,), + ((3, 0),), +) + +PUT_WITH_CONTENT_ENCODING_INPUT: StaticSchema = ( + 18, + n0, + _s88, + {_s10: _s89, _s12: None}, + (_s90, _s93), + ((3, {_s91: _s92}), (3, 0)), +) + +FOO_ENUM_LIST: StaticSchema = ( + 16, + n1, + _s94, + 0, + (_s29,), + ((FOO_ENUM, 0),), +) + +FOO_ENUM_MAP: StaticSchema = ( + 17, + n1, + _s95, + 0, + (_s32, _s13), + ((3, 0), (FOO_ENUM, 0)), +) + +FOO_ENUM_SET: StaticSchema = ( + 16, + n1, + _s96, + 0, + (_s29,), + ((FOO_ENUM, 0),), +) + +INTEGER_ENUM: StaticSchema = ( + 15, + n1, + _s97, + 0, + (_s98, _s99, _s100), + ((-1, {_s61: 1}), (-1, {_s61: 2}), (-1, {_s61: 3})), +) + +INTEGER_ENUM_LIST: StaticSchema = ( + 16, + n1, + _s101, + 0, + (_s29,), + ((INTEGER_ENUM, 0),), +) + +INTEGER_ENUM_MAP: StaticSchema = ( + 17, + n1, + _s102, + 0, + (_s32, _s13), + ((3, 0), (INTEGER_ENUM, 0)), +) + +INTEGER_ENUM_SET: StaticSchema = ( + 16, + n1, + _s103, + 0, + (_s29,), + ((INTEGER_ENUM, 0),), +) + +SPARSE_STRING_LIST: StaticSchema = ( + 16, + n1, + _s104, + 64, + (_s29,), + ((3, 0),), +) + +SPARSE_STRING_MAP: StaticSchema = ( + 17, + n1, + _s105, + 64, + (_s32, _s13), + ((3, 0), (3, 0)), +) + +DATETIME_OFFSETS_INPUT: StaticSchema = ( + 18, + n0, + _s106, + {_s10: _s107, _s12: None}, +) + +EMPTY_OPERATION_INPUT: StaticSchema = ( + 18, + n0, + _s108, + {_s10: _s107, _s12: None}, +) + +EMPTY_OPERATION_OUTPUT: StaticSchema = ( + 18, + n0, + _s109, + {_s10: _s107, _s16: None}, +) + +ENDPOINT_OPERATION_INPUT: StaticSchema = ( + 18, + n0, + _s110, + {_s10: _s107, _s12: None}, +) + +ENDPOINT_OPERATION_OUTPUT: StaticSchema = ( + 18, + n0, + _s111, + {_s10: _s107, _s16: None}, +) + +ENDPOINT_WITH_HOST_LABEL_OPERATION_INPUT: StaticSchema = ( + 18, + n0, + _s112, + {_s10: _s113, _s12: None}, + (_s114,), + ((3, 257),), +) + +ENDPOINT_WITH_HOST_LABEL_OPERATION_OUTPUT: StaticSchema = ( + 18, + n0, + _s115, + {_s10: _s107, _s16: None}, +) + +FRACTIONAL_SECONDS_INPUT: StaticSchema = ( + 18, + n0, + _s116, + {_s10: _s107, _s12: None}, +) + +GREETING_WITH_ERRORS_INPUT: StaticSchema = ( + 18, + n0, + _s117, + {_s10: _s107, _s12: None}, +) + +HOST_WITH_PATH_OPERATION_INPUT: StaticSchema = ( + 18, + n0, + _s118, + {_s10: _s107, _s12: None}, +) + +HOST_WITH_PATH_OPERATION_OUTPUT: StaticSchema = ( + 18, + n0, + _s119, + {_s10: _s107, _s16: None}, +) + +JSON_ENUMS_INPUT: StaticSchema = ( + 18, + n0, + _s120, + {_s10: _s121, _s12: None}, + (_s122, _s123, _s124, _s125, _s126, _s127), + ( + (FOO_ENUM, 0), + (FOO_ENUM, 0), + (FOO_ENUM, 0), + (FOO_ENUM_LIST, 0), + (FOO_ENUM_SET, 0), + (FOO_ENUM_MAP, 0), + ), +) + +JSON_ENUMS_OUTPUT: StaticSchema = ( + 18, + n0, + _s128, + {_s10: _s121, _s16: None}, + (_s122, _s123, _s124, _s125, _s126, _s127), + ( + (FOO_ENUM, 0), + (FOO_ENUM, 0), + (FOO_ENUM, 0), + (FOO_ENUM_LIST, 0), + (FOO_ENUM_SET, 0), + (FOO_ENUM_MAP, 0), + ), +) + +JSON_INT_ENUMS_INPUT: StaticSchema = ( + 18, + n0, + _s129, + {_s10: _s130, _s12: None}, + (_s131, _s132, _s133, _s134, _s135, _s136), + ( + (INTEGER_ENUM, 0), + (INTEGER_ENUM, 0), + (INTEGER_ENUM, 0), + (INTEGER_ENUM_LIST, 0), + (INTEGER_ENUM_SET, 0), + (INTEGER_ENUM_MAP, 0), + ), +) + +JSON_INT_ENUMS_OUTPUT: StaticSchema = ( + 18, + n0, + _s137, + {_s10: _s130, _s16: None}, + (_s131, _s132, _s133, _s134, _s135, _s136), + ( + (INTEGER_ENUM, 0), + (INTEGER_ENUM, 0), + (INTEGER_ENUM, 0), + (INTEGER_ENUM_LIST, 0), + (INTEGER_ENUM_SET, 0), + (INTEGER_ENUM_MAP, 0), + ), +) + +JSON_UNIONS_INPUT: StaticSchema = ( + 18, + n0, + _s138, + {_s10: _s139, _s12: None}, + (_s140,), + ((MY_UNION, 0),), +) + +JSON_UNIONS_OUTPUT: StaticSchema = ( + 18, + n0, + _s141, + {_s10: _s139, _s16: None}, + (_s140,), + ((MY_UNION, 0),), +) + +KITCHEN_SINK_OPERATION_INPUT: StaticSchema = ( + 18, + n0, + _s142, + {_s10: _s143, _s12: None}, + ( + _s144, + _s145, + _s146, + _s24, + _s147, + _s148, + _s150, + _s151, + _s25, + _s152, + _s33, + _s28, + _s36, + _s153, + _s37, + _s154, + _s31, + _s39, + _s155, + _s156, + _s157, + _s34, + _s158, + _s40, + _s159, + _s160, + ), + ( + (1, 0), + (2, 0), + (10, 0), + (EMPTY_STRUCT, 0), + (9, 0), + (4, {_s18: _s149}), + (7, 0), + (4, {_s18: _s19}), + (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, {_s18: _s161}), + ), +) + +KITCHEN_SINK_OPERATION_OUTPUT: StaticSchema = ( + 18, + n0, + _s162, + {_s10: _s143, _s16: None}, + ( + _s144, + _s145, + _s146, + _s24, + _s147, + _s148, + _s150, + _s151, + _s25, + _s152, + _s33, + _s28, + _s36, + _s153, + _s37, + _s154, + _s31, + _s39, + _s155, + _s156, + _s157, + _s34, + _s158, + _s40, + _s159, + _s160, + ), + ( + (1, 0), + (2, 0), + (10, 0), + (EMPTY_STRUCT, 0), + (9, 0), + (4, {_s18: _s149}), + (7, 0), + (4, {_s18: _s19}), + (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, {_s18: _s161}), + ), +) + +NULL_OPERATION_INPUT: StaticSchema = ( + 18, + n0, + _s163, + {_s10: _s164, _s12: None}, + (_s165,), + ((3, 0),), +) + +NULL_OPERATION_OUTPUT: StaticSchema = ( + 18, + n0, + _s166, + {_s10: _s164, _s16: None}, + (_s165,), + ((3, 0),), +) + +PUT_AND_GET_INLINE_DOCUMENTS_INPUT: StaticSchema = ( + 18, + n0, + _s167, + {_s10: _s168, _s12: None}, + (_s169,), + ((DOCUMENT, 0),), +) + +PUT_AND_GET_INLINE_DOCUMENTS_OUTPUT: StaticSchema = ( + 18, + n0, + _s170, + {_s10: _s168, _s16: None}, + (_s169,), + ((DOCUMENT, 0),), +) + +PUT_WITH_CONTENT_ENCODING_OUTPUT: StaticSchema = ( + 18, + n0, + _s171, + {_s10: _s107, _s16: None}, +) + +SIMPLE_SCALAR_PROPERTIES_INPUT: StaticSchema = ( + 18, + n0, + _s172, + {_s10: _s173, _s12: None}, + (_s174, _s175), + ((9, 0), (10, 0)), +) + +SIMPLE_SCALAR_PROPERTIES_OUTPUT: StaticSchema = ( + 18, + n0, + _s176, + {_s10: _s173, _s16: None}, + (_s174, _s175), + ((9, 0), (10, 0)), +) + +SPARSE_NULLS_OPERATION_INPUT: StaticSchema = ( + 18, + n0, + _s177, + {_s10: _s178, _s12: None}, + (_s179, _s180), + ((SPARSE_STRING_LIST, 0), (SPARSE_STRING_MAP, 0)), +) + +SPARSE_NULLS_OPERATION_OUTPUT: StaticSchema = ( + 18, + n0, + _s181, + {_s10: _s178, _s16: None}, + (_s179, _s180), + ((SPARSE_STRING_LIST, 0), (SPARSE_STRING_MAP, 0)), +) + +CONTENT_TYPE_PARAMETERS: StaticOperationSchema = ( + 23, + n0, + _s182, + 0, + CONTENT_TYPE_PARAMETERS_INPUT, + CONTENT_TYPE_PARAMETERS_OUTPUT, + (), +) + +DATETIME_OFFSETS: StaticOperationSchema = ( + 23, + n0, + _s183, + 0, + DATETIME_OFFSETS_INPUT, + DATETIME_OFFSETS_OUTPUT, + (), +) + +EMPTY_OPERATION: StaticOperationSchema = ( + 23, + n0, + _s184, + 0, + EMPTY_OPERATION_INPUT, + EMPTY_OPERATION_OUTPUT, + (), +) + +ENDPOINT_OPERATION: StaticOperationSchema = ( + 23, + n0, + _s185, + {_s186: MappingProxyType({"hostPrefix": "foo."})}, + ENDPOINT_OPERATION_INPUT, + ENDPOINT_OPERATION_OUTPUT, + (), +) + +ENDPOINT_WITH_HOST_LABEL_OPERATION: StaticOperationSchema = ( + 23, + n0, + _s187, + {_s186: MappingProxyType({"hostPrefix": "foo.{label}."})}, + ENDPOINT_WITH_HOST_LABEL_OPERATION_INPUT, + ENDPOINT_WITH_HOST_LABEL_OPERATION_OUTPUT, + (), +) + +FRACTIONAL_SECONDS: StaticOperationSchema = ( + 23, + n0, + _s188, + 0, + FRACTIONAL_SECONDS_INPUT, + FRACTIONAL_SECONDS_OUTPUT, + (), +) + +GREETING_WITH_ERRORS: StaticOperationSchema = ( + 23, + n0, + _s189, + 0, + GREETING_WITH_ERRORS_INPUT, + GREETING_WITH_ERRORS_OUTPUT, + (COMPLEX_ERROR, FOO_ERROR, INVALID_GREETING), +) + +HOST_WITH_PATH_OPERATION: StaticOperationSchema = ( + 23, + n0, + _s190, + 0, + HOST_WITH_PATH_OPERATION_INPUT, + HOST_WITH_PATH_OPERATION_OUTPUT, + (), +) + +JSON_ENUMS: StaticOperationSchema = ( + 23, + n0, + _s191, + 0, + JSON_ENUMS_INPUT, + JSON_ENUMS_OUTPUT, + (), +) + +JSON_INT_ENUMS: StaticOperationSchema = ( + 23, + n0, + _s192, + 0, + JSON_INT_ENUMS_INPUT, + JSON_INT_ENUMS_OUTPUT, + (), +) + +JSON_UNIONS: StaticOperationSchema = ( + 23, + n0, + _s193, + 0, + JSON_UNIONS_INPUT, + JSON_UNIONS_OUTPUT, + (), +) + +KITCHEN_SINK_OPERATION: StaticOperationSchema = ( + 23, + n0, + _s194, + 0, + KITCHEN_SINK_OPERATION_INPUT, + KITCHEN_SINK_OPERATION_OUTPUT, + (ERROR_WITH_MEMBERS, ERROR_WITHOUT_MEMBERS), +) + +NULL_OPERATION: StaticOperationSchema = ( + 23, + n0, + _s195, + 0, + NULL_OPERATION_INPUT, + NULL_OPERATION_OUTPUT, + (), +) + +OPERATION_WITH_OPTIONAL_INPUT_OUTPUT: StaticOperationSchema = ( + 23, + n0, + _s196, + 0, + OPERATION_WITH_OPTIONAL_INPUT_OUTPUT_INPUT, + OPERATION_WITH_OPTIONAL_INPUT_OUTPUT_OUTPUT, + (), +) + +PUT_AND_GET_INLINE_DOCUMENTS: StaticOperationSchema = ( + 23, + n0, + _s197, + 0, + PUT_AND_GET_INLINE_DOCUMENTS_INPUT, + PUT_AND_GET_INLINE_DOCUMENTS_OUTPUT, + (), +) + +PUT_WITH_CONTENT_ENCODING: StaticOperationSchema = ( + 23, + n0, + _s198, + {_s199: MappingProxyType({"encodings": ("gzip",)})}, + PUT_WITH_CONTENT_ENCODING_INPUT, + PUT_WITH_CONTENT_ENCODING_OUTPUT, + (), +) + +SIMPLE_SCALAR_PROPERTIES: StaticOperationSchema = ( + 23, + n0, + _s200, + 0, + SIMPLE_SCALAR_PROPERTIES_INPUT, + SIMPLE_SCALAR_PROPERTIES_OUTPUT, + (), +) + +SPARSE_NULLS_OPERATION: StaticOperationSchema = ( + 23, + n0, + _s201, + 0, + SPARSE_NULLS_OPERATION_INPUT, + SPARSE_NULLS_OPERATION_OUTPUT, + (), +) + +JSON_PROTOCOL: StaticSchema = ( + 21, + n0, + _s202, + { + _s203: MappingProxyType( + { + "sdkId": "Json Protocol", + "arnNamespace": "jsonprotocol", + "cloudFormationName": "JsonProtocol", + "cloudTrailEventSource": "jsonprotocol.amazonaws.com", + } + ), + _s204: MappingProxyType({"name": "jsonprotocol"}), + _s205: None, + }, +) + +KITCHEN_SINK: StaticSchema = ( + 18, + n0, + _s206, + 0, + ( + _s144, + _s145, + _s146, + _s24, + _s147, + _s148, + _s150, + _s151, + _s25, + _s152, + _s33, + _s28, + _s36, + _s153, + _s37, + _s154, + _s31, + _s39, + _s155, + _s156, + _s157, + _s34, + _s158, + _s40, + _s159, + _s160, + ), + ( + (1, 0), + (2, 0), + (10, 0), + (EMPTY_STRUCT, 0), + (9, 0), + (4, {_s18: _s149}), + (7, 0), + (4, {_s18: _s19}), + (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, {_s18: _s161}), + ), +) + +LIST_OF_KITCHEN_SINKS: StaticSchema = ( + 16, + n0, + _s207, + 0, + (_s29,), + ((KITCHEN_SINK, 0),), +) + +MAP_OF_KITCHEN_SINKS: StaticSchema = ( + 17, + n0, + _s208, + 0, + (_s32, _s13), + ((3, 0), (KITCHEN_SINK, 0)), +) diff --git a/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/aio/__init__.py b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/aio/__init__.py new file mode 100644 index 000000000..2d5474e69 --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/aio/__init__.py @@ -0,0 +1,19 @@ +from importlib import import_module +from typing import TYPE_CHECKING, Any + +if TYPE_CHECKING: + from .client import AsyncJsonProtocolClient + from .config import AsyncJsonProtocolConfig + +__all__ = ["AsyncJsonProtocolClient", "AsyncJsonProtocolConfig"] + +_EXPORTS = { + "AsyncJsonProtocolClient": ".client", + "AsyncJsonProtocolConfig": ".config", +} + + +def __getattr__(name: str) -> Any: + if name in _EXPORTS: + return getattr(import_module(_EXPORTS[name], __name__), name) + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") diff --git a/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/aio/client.py b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/aio/client.py new file mode 100644 index 000000000..cbacd9fd5 --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/aio/client.py @@ -0,0 +1,673 @@ +from __future__ import annotations + +from typing import Unpack, cast, overload + +from smithy_aws_core.aio.identity.chain import AsyncIdentityChain +from smithy_aws_core.config.types import ConfigSource +from smithy_aws_core.identity.components import AWSCredentialsIdentity +from smithy_core.aio.client import AsyncClient +from smithy_http.aio.interfaces import AsyncHTTPClient +from smithy_http.plugins import user_agent_plugin + +from awsjson11_client import models +from awsjson11_client.aio.config import AsyncJsonProtocolConfig, Plugin +from awsjson11_client.aio.user_agent import aws_user_agent_plugin + + +class AsyncJsonProtocolClient(AsyncClient[AsyncJsonProtocolConfig]): + "Client for JsonProtocol." + + _client_plugins = (aws_user_agent_plugin, user_agent_plugin) + + @overload + async def content_type_parameters( + self, + request: models.ContentTypeParametersInput + | models.ContentTypeParametersInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.ContentTypeParametersOutput: ... + + @overload + async def content_type_parameters( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.ContentTypeParametersInputDict], + ) -> models.ContentTypeParametersOutput: + """ + The example tests how servers must support requests + containing a `Content-Type` header with parameters. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def content_type_parameters( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.ContentTypeParametersOutput: + return await self._invoke( + self._select_input(models.CONTENT_TYPE_PARAMETERS, args, kwargs), + models.CONTENT_TYPE_PARAMETERS, + [], + plugins, + ) + + @overload + async def datetime_offsets( + self, + request: models.DatetimeOffsetsInput | models.DatetimeOffsetsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.DatetimeOffsetsOutput: ... + + @overload + async def datetime_offsets( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.DatetimeOffsetsInputDict], + ) -> models.DatetimeOffsetsOutput: + """ + Invokes the DatetimeOffsets operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def datetime_offsets( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.DatetimeOffsetsOutput: + return await self._invoke( + self._select_input(models.DATETIME_OFFSETS, args, kwargs), + models.DATETIME_OFFSETS, + [], + plugins, + ) + + @overload + async def empty_operation( + self, + request: models.EmptyOperationInput | models.EmptyOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.EmptyOperationOutput: ... + + @overload + async def empty_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.EmptyOperationInputDict], + ) -> models.EmptyOperationOutput: + """ + Invokes the EmptyOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def empty_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.EmptyOperationOutput: + return await self._invoke( + self._select_input(models.EMPTY_OPERATION, args, kwargs), + models.EMPTY_OPERATION, + [], + plugins, + ) + + @overload + async def endpoint_operation( + self, + request: models.EndpointOperationInput | models.EndpointOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.EndpointOperationOutput: ... + + @overload + async def endpoint_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.EndpointOperationInputDict], + ) -> models.EndpointOperationOutput: + """ + Invokes the EndpointOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def endpoint_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.EndpointOperationOutput: + return await self._invoke( + self._select_input(models.ENDPOINT_OPERATION, args, kwargs), + models.ENDPOINT_OPERATION, + [], + plugins, + ) + + @overload + async def endpoint_with_host_label_operation( + self, + request: models.EndpointWithHostLabelOperationInput + | models.EndpointWithHostLabelOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.EndpointWithHostLabelOperationOutput: ... + + @overload + async def endpoint_with_host_label_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.EndpointWithHostLabelOperationInputDict], + ) -> models.EndpointWithHostLabelOperationOutput: + """ + Invokes the EndpointWithHostLabelOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def endpoint_with_host_label_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.EndpointWithHostLabelOperationOutput: + return await self._invoke( + self._select_input(models.ENDPOINT_WITH_HOST_LABEL_OPERATION, args, kwargs), + models.ENDPOINT_WITH_HOST_LABEL_OPERATION, + [], + plugins, + ) + + @overload + async def fractional_seconds( + self, + request: models.FractionalSecondsInput | models.FractionalSecondsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.FractionalSecondsOutput: ... + + @overload + async def fractional_seconds( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.FractionalSecondsInputDict], + ) -> models.FractionalSecondsOutput: + """ + Invokes the FractionalSeconds operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def fractional_seconds( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.FractionalSecondsOutput: + return await self._invoke( + self._select_input(models.FRACTIONAL_SECONDS, args, kwargs), + models.FRACTIONAL_SECONDS, + [], + plugins, + ) + + @overload + async def greeting_with_errors( + self, + request: models.GreetingWithErrorsInput | models.GreetingWithErrorsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.GreetingWithErrorsOutput: ... + + @overload + async def greeting_with_errors( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.GreetingWithErrorsInputDict], + ) -> models.GreetingWithErrorsOutput: + """ + This operation has three possible return values: + + 1. A successful response in the form of GreetingWithErrorsOutput + 2. An InvalidGreeting error. + 3. A ComplexError error. + + Implementations must be able to successfully take a response and + properly deserialize successful and error responses. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def greeting_with_errors( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.GreetingWithErrorsOutput: + return await self._invoke( + self._select_input(models.GREETING_WITH_ERRORS, args, kwargs), + models.GREETING_WITH_ERRORS, + [], + plugins, + ) + + @overload + async def host_with_path_operation( + self, + request: models.HostWithPathOperationInput + | models.HostWithPathOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.HostWithPathOperationOutput: ... + + @overload + async def host_with_path_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.HostWithPathOperationInputDict], + ) -> models.HostWithPathOperationOutput: + """ + Invokes the HostWithPathOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def host_with_path_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.HostWithPathOperationOutput: + return await self._invoke( + self._select_input(models.HOST_WITH_PATH_OPERATION, args, kwargs), + models.HOST_WITH_PATH_OPERATION, + [], + plugins, + ) + + @overload + async def json_enums( + self, + request: models.JsonEnumsInput | models.JsonEnumsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.JsonEnumsOutput: ... + + @overload + async def json_enums( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.JsonEnumsInputDict], + ) -> models.JsonEnumsOutput: + """ + This example serializes enums as top level properties, in lists, sets, + and maps. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def json_enums( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.JsonEnumsOutput: + return await self._invoke( + self._select_input(models.JSON_ENUMS, args, kwargs), + models.JSON_ENUMS, + [], + plugins, + ) + + @overload + async def json_int_enums( + self, + request: models.JsonIntEnumsInput | models.JsonIntEnumsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.JsonIntEnumsOutput: ... + + @overload + async def json_int_enums( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.JsonIntEnumsInputDict], + ) -> models.JsonIntEnumsOutput: + """ + This example serializes intEnums as top level properties, in lists, + sets, and maps. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def json_int_enums( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.JsonIntEnumsOutput: + return await self._invoke( + self._select_input(models.JSON_INT_ENUMS, args, kwargs), + models.JSON_INT_ENUMS, + [], + plugins, + ) + + @overload + async def json_unions( + self, + request: models.JsonUnionsInput | models.JsonUnionsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.JsonUnionsOutput: ... + + @overload + async def json_unions( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.JsonUnionsInputDict], + ) -> models.JsonUnionsOutput: + """ + This operation uses unions for inputs and outputs. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def json_unions( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.JsonUnionsOutput: + return await self._invoke( + self._select_input(models.JSON_UNIONS, args, kwargs), + models.JSON_UNIONS, + [], + plugins, + ) + + @overload + async def kitchen_sink_operation( + self, + request: models.KitchenSinkOperationInput + | models.KitchenSinkOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.KitchenSinkOperationOutput: ... + + @overload + async def kitchen_sink_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.KitchenSinkOperationInputDict], + ) -> models.KitchenSinkOperationOutput: + """ + Invokes the KitchenSinkOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def kitchen_sink_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.KitchenSinkOperationOutput: + return await self._invoke( + self._select_input(models.KITCHEN_SINK_OPERATION, args, kwargs), + models.KITCHEN_SINK_OPERATION, + [], + plugins, + ) + + @overload + async def null_operation( + self, + request: models.NullOperationInput | models.NullOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.NullOperationOutput: ... + + @overload + async def null_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.NullOperationInputDict], + ) -> models.NullOperationOutput: + """ + Invokes the NullOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def null_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.NullOperationOutput: + return await self._invoke( + self._select_input(models.NULL_OPERATION, args, kwargs), + models.NULL_OPERATION, + [], + plugins, + ) + + @overload + async def operation_with_optional_input_output( + self, + request: models.OperationWithOptionalInputOutputInput + | models.OperationWithOptionalInputOutputInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.OperationWithOptionalInputOutputOutput: ... + + @overload + async def operation_with_optional_input_output( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.OperationWithOptionalInputOutputInputDict], + ) -> models.OperationWithOptionalInputOutputOutput: + """ + Invokes the OperationWithOptionalInputOutput operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def operation_with_optional_input_output( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.OperationWithOptionalInputOutputOutput: + return await self._invoke( + self._select_input( + models.OPERATION_WITH_OPTIONAL_INPUT_OUTPUT, args, kwargs + ), + models.OPERATION_WITH_OPTIONAL_INPUT_OUTPUT, + [], + plugins, + ) + + @overload + async def put_and_get_inline_documents( + self, + request: models.PutAndGetInlineDocumentsInput + | models.PutAndGetInlineDocumentsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.PutAndGetInlineDocumentsOutput: ... + + @overload + async def put_and_get_inline_documents( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.PutAndGetInlineDocumentsInputDict], + ) -> models.PutAndGetInlineDocumentsOutput: + """ + This example serializes an inline document as part of the payload. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def put_and_get_inline_documents( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.PutAndGetInlineDocumentsOutput: + return await self._invoke( + self._select_input(models.PUT_AND_GET_INLINE_DOCUMENTS, args, kwargs), + models.PUT_AND_GET_INLINE_DOCUMENTS, + [], + plugins, + ) + + @overload + async def put_with_content_encoding( + self, + request: models.PutWithContentEncodingInput + | models.PutWithContentEncodingInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.PutWithContentEncodingOutput: ... + + @overload + async def put_with_content_encoding( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.PutWithContentEncodingInputDict], + ) -> models.PutWithContentEncodingOutput: + """ + Invokes the PutWithContentEncoding operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def put_with_content_encoding( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.PutWithContentEncodingOutput: + return await self._invoke( + self._select_input(models.PUT_WITH_CONTENT_ENCODING, args, kwargs), + models.PUT_WITH_CONTENT_ENCODING, + [], + plugins, + ) + + @overload + async def simple_scalar_properties( + self, + request: models.SimpleScalarPropertiesInput + | models.SimpleScalarPropertiesInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.SimpleScalarPropertiesOutput: ... + + @overload + async def simple_scalar_properties( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.SimpleScalarPropertiesInputDict], + ) -> models.SimpleScalarPropertiesOutput: + """ + Invokes the SimpleScalarProperties operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def simple_scalar_properties( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.SimpleScalarPropertiesOutput: + return await self._invoke( + self._select_input(models.SIMPLE_SCALAR_PROPERTIES, args, kwargs), + models.SIMPLE_SCALAR_PROPERTIES, + [], + plugins, + ) + + @overload + async def sparse_nulls_operation( + self, + request: models.SparseNullsOperationInput + | models.SparseNullsOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.SparseNullsOperationOutput: ... + + @overload + async def sparse_nulls_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.SparseNullsOperationInputDict], + ) -> models.SparseNullsOperationOutput: + """ + Invokes the SparseNullsOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def sparse_nulls_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.SparseNullsOperationOutput: + return await self._invoke( + self._select_input(models.SPARSE_NULLS_OPERATION, args, kwargs), + models.SPARSE_NULLS_OPERATION, + [], + plugins, + ) + + async def _new_config(self) -> AsyncJsonProtocolConfig: + return await AsyncJsonProtocolConfig.resolve() + + async def _post_setup(self, config: AsyncJsonProtocolConfig) -> None: + if config.aws_credentials_identity_resolver is None: + config_context = config.resolution_context() + config_file = None + profile_name = None + if config_context is not None: + config_file = await config_context.parsed_profiles() + if config_context.profile_source is ConfigSource.OVERRIDE: + profile_name = config_context.profile_name + config.aws_credentials_identity_resolver = await AsyncIdentityChain.create( + AWSCredentialsIdentity, + config_file=config_file, + profile_name=profile_name, + region_override=config.region, + http_client=cast(AsyncHTTPClient | None, config.transport), + ) diff --git a/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/aio/config.py b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/aio/config.py new file mode 100644 index 000000000..b957b1b48 --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/aio/config.py @@ -0,0 +1,123 @@ +from collections.abc import Callable +from dataclasses import dataclass, field +from typing import Any, ClassVar, Self, Unpack + +from smithy_aws_core.aio.auth.sigv4 import AsyncSigV4AuthScheme +from smithy_aws_core.aio.config.aws_config import ( + AsyncAwsConfig, + AsyncAwsConfigOverrides, +) +from smithy_aws_core.aio.config.filesystem import AsyncFileSystem +from smithy_aws_core.aio.protocols import AsyncAwsJson11ClientProtocol +from smithy_aws_core.config.resolvers import EndpointUriResolver +from smithy_aws_core.config.types import FieldSpec +from smithy_aws_core.endpoints import AWS_RULES_EXTENSION +from smithy_core.aio.interfaces import AsyncEndpointResolver +from smithy_core.aio.interfaces.auth import AsyncAuthScheme +from smithy_core.auth import DefaultAuthResolver +from smithy_core.endpoints import BddEndpointResolver +from smithy_core.interceptors import Interceptor +from smithy_core.interfaces import ( + ClientProtocol, + EndpointResolver, + ProtocolConstructor, + ProtocolSettings, +) +from smithy_core.interfaces.auth import AuthSchemeResolver +from smithy_core.shapes import ShapeID +from smithy_http.aio.aiohttp import AIOHTTPClient + +from awsjson11_client._private.endpoints import BDD +from awsjson11_client._private.schemas import JSON_PROTOCOL + +_PROTOCOL_SETTINGS = ProtocolSettings( + namespace="aws.protocoltests.json", + service_target="JsonProtocol", + version="2018-01-01", + service_schema=JSON_PROTOCOL, +) + + +class _AsyncJsonProtocolConfigOverrides(AsyncAwsConfigOverrides, total=False): + "Explicit field values AsyncJsonProtocolConfig.resolve accepts." + + endpoint_resolver: EndpointResolver | AsyncEndpointResolver | None + protocol: ( + ClientProtocol[Any, Any] | ProtocolConstructor[ClientProtocol[Any, Any]] | None + ) + auth_schemes: dict[ShapeID, AsyncAuthScheme[Any, Any, Any, Any]] | None + auth_scheme_resolver: AuthSchemeResolver | None + + +@dataclass(kw_only=True, repr=False, init=False) +class AsyncJsonProtocolConfig(AsyncAwsConfig): + "Configuration for AsyncJsonProtocolClient." + + interceptors: list[Interceptor[Any, Any, Any, Any]] = field( + default_factory=list[Interceptor[Any, Any, Any, Any]] + ) + "Hooks called during the execution of a request." + + endpoint_resolver: EndpointResolver | AsyncEndpointResolver | None = None + "Resolves the endpoint of each operation." + + protocol: ClientProtocol[Any, Any] | None = None + "Serializes requests and deserializes responses." + + auth_schemes: dict[ShapeID, AsyncAuthScheme[Any, Any, Any, Any]] | None = None + "Auth schemes by auth scheme ID." + + auth_scheme_resolver: AuthSchemeResolver | None = None + "Determines the auth scheme for each operation." + + _FIELDS: ClassVar[dict[str, FieldSpec]] = { + **AsyncAwsConfig._FIELDS, + "endpoint_uri": FieldSpec( + default=None, resolver=EndpointUriResolver("json_protocol").program + ), + "endpoint_resolver": FieldSpec( + default_factory=lambda: BddEndpointResolver( + BDD, extensions=[AWS_RULES_EXTENSION] + ) + ), + "protocol": FieldSpec( + default_factory=lambda: AsyncAwsJson11ClientProtocol(_PROTOCOL_SETTINGS), + converter=lambda p: p(_PROTOCOL_SETTINGS) if isinstance(p, type) else p, + ), + "auth_schemes": FieldSpec( + default_factory=lambda: { + ShapeID("aws.auth#sigv4"): AsyncSigV4AuthScheme(service="jsonprotocol") + } + ), + "auth_scheme_resolver": FieldSpec(default_factory=DefaultAuthResolver), + "transport": FieldSpec(default_factory=lambda: AIOHTTPClient()), + } + + def set_auth_scheme(self, scheme: AsyncAuthScheme[Any, Any, Any, Any]) -> None: + "Set an auth scheme under its scheme ID." + auth_schemes = dict(self.auth_schemes or {}) + auth_schemes[scheme.scheme_id] = scheme + self.auth_schemes = auth_schemes + + @classmethod + async def resolve( # pyright: ignore[reportIncompatibleMethodOverride] + cls, + *, + profile: str | None = None, + fs: AsyncFileSystem | None = None, + config_file_path: str | None = None, + credentials_file_path: str | None = None, + **overrides: Unpack[_AsyncJsonProtocolConfigOverrides], + ) -> Self: + "Resolve the config from overrides, the environment, and config files." + return await cls._resolve( + profile=profile, + fs=fs, + config_file_path=config_file_path, + credentials_file_path=credentials_file_path, + overrides=overrides, + ) + + +type Plugin = Callable[[AsyncJsonProtocolConfig], None] +"A callable that customizes the client configuration." diff --git a/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/aio/user_agent.py b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/aio/user_agent.py new file mode 100644 index 000000000..0ce69c8cf --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/aio/user_agent.py @@ -0,0 +1,16 @@ +from smithy_aws_core.interceptors.user_agent import UserAgentInterceptor + +from awsjson11_client import __version__ +from awsjson11_client.aio.config import AsyncJsonProtocolConfig + + +def aws_user_agent_plugin(config: AsyncJsonProtocolConfig) -> None: + "Send the AWS user agent with every request." + config.interceptors.append( + UserAgentInterceptor( + ua_suffix=config.user_agent_extra, + ua_app_id=config.sdk_ua_app_id, + sdk_version=__version__, + service_id="Json_Protocol", + ) + ) diff --git a/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/client.py b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/client.py new file mode 100644 index 000000000..db5c7d975 --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/client.py @@ -0,0 +1,673 @@ +from __future__ import annotations + +from typing import Unpack, cast, overload + +from smithy_aws_core.config.types import ConfigSource +from smithy_aws_core.identity.chain.resolver import IdentityChain +from smithy_aws_core.identity.components import AWSCredentialsIdentity +from smithy_core.client import Client +from smithy_http.interfaces import HTTPClient +from smithy_http.plugins import user_agent_plugin + +from awsjson11_client import models +from awsjson11_client.config import JsonProtocolConfig, Plugin +from awsjson11_client.user_agent import aws_user_agent_plugin + + +class JsonProtocolClient(Client[JsonProtocolConfig]): + "Client for JsonProtocol." + + _client_plugins = (aws_user_agent_plugin, user_agent_plugin) + + @overload + def content_type_parameters( + self, + request: models.ContentTypeParametersInput + | models.ContentTypeParametersInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.ContentTypeParametersOutput: ... + + @overload + def content_type_parameters( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.ContentTypeParametersInputDict], + ) -> models.ContentTypeParametersOutput: + """ + The example tests how servers must support requests + containing a `Content-Type` header with parameters. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def content_type_parameters( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.ContentTypeParametersOutput: + return self._invoke( + self._select_input(models.CONTENT_TYPE_PARAMETERS, args, kwargs), + models.CONTENT_TYPE_PARAMETERS, + [], + plugins, + ) + + @overload + def datetime_offsets( + self, + request: models.DatetimeOffsetsInput | models.DatetimeOffsetsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.DatetimeOffsetsOutput: ... + + @overload + def datetime_offsets( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.DatetimeOffsetsInputDict], + ) -> models.DatetimeOffsetsOutput: + """ + Invokes the DatetimeOffsets operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def datetime_offsets( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.DatetimeOffsetsOutput: + return self._invoke( + self._select_input(models.DATETIME_OFFSETS, args, kwargs), + models.DATETIME_OFFSETS, + [], + plugins, + ) + + @overload + def empty_operation( + self, + request: models.EmptyOperationInput | models.EmptyOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.EmptyOperationOutput: ... + + @overload + def empty_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.EmptyOperationInputDict], + ) -> models.EmptyOperationOutput: + """ + Invokes the EmptyOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def empty_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.EmptyOperationOutput: + return self._invoke( + self._select_input(models.EMPTY_OPERATION, args, kwargs), + models.EMPTY_OPERATION, + [], + plugins, + ) + + @overload + def endpoint_operation( + self, + request: models.EndpointOperationInput | models.EndpointOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.EndpointOperationOutput: ... + + @overload + def endpoint_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.EndpointOperationInputDict], + ) -> models.EndpointOperationOutput: + """ + Invokes the EndpointOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def endpoint_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.EndpointOperationOutput: + return self._invoke( + self._select_input(models.ENDPOINT_OPERATION, args, kwargs), + models.ENDPOINT_OPERATION, + [], + plugins, + ) + + @overload + def endpoint_with_host_label_operation( + self, + request: models.EndpointWithHostLabelOperationInput + | models.EndpointWithHostLabelOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.EndpointWithHostLabelOperationOutput: ... + + @overload + def endpoint_with_host_label_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.EndpointWithHostLabelOperationInputDict], + ) -> models.EndpointWithHostLabelOperationOutput: + """ + Invokes the EndpointWithHostLabelOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def endpoint_with_host_label_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.EndpointWithHostLabelOperationOutput: + return self._invoke( + self._select_input(models.ENDPOINT_WITH_HOST_LABEL_OPERATION, args, kwargs), + models.ENDPOINT_WITH_HOST_LABEL_OPERATION, + [], + plugins, + ) + + @overload + def fractional_seconds( + self, + request: models.FractionalSecondsInput | models.FractionalSecondsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.FractionalSecondsOutput: ... + + @overload + def fractional_seconds( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.FractionalSecondsInputDict], + ) -> models.FractionalSecondsOutput: + """ + Invokes the FractionalSeconds operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def fractional_seconds( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.FractionalSecondsOutput: + return self._invoke( + self._select_input(models.FRACTIONAL_SECONDS, args, kwargs), + models.FRACTIONAL_SECONDS, + [], + plugins, + ) + + @overload + def greeting_with_errors( + self, + request: models.GreetingWithErrorsInput | models.GreetingWithErrorsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.GreetingWithErrorsOutput: ... + + @overload + def greeting_with_errors( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.GreetingWithErrorsInputDict], + ) -> models.GreetingWithErrorsOutput: + """ + This operation has three possible return values: + + 1. A successful response in the form of GreetingWithErrorsOutput + 2. An InvalidGreeting error. + 3. A ComplexError error. + + Implementations must be able to successfully take a response and + properly deserialize successful and error responses. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def greeting_with_errors( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.GreetingWithErrorsOutput: + return self._invoke( + self._select_input(models.GREETING_WITH_ERRORS, args, kwargs), + models.GREETING_WITH_ERRORS, + [], + plugins, + ) + + @overload + def host_with_path_operation( + self, + request: models.HostWithPathOperationInput + | models.HostWithPathOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.HostWithPathOperationOutput: ... + + @overload + def host_with_path_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.HostWithPathOperationInputDict], + ) -> models.HostWithPathOperationOutput: + """ + Invokes the HostWithPathOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def host_with_path_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.HostWithPathOperationOutput: + return self._invoke( + self._select_input(models.HOST_WITH_PATH_OPERATION, args, kwargs), + models.HOST_WITH_PATH_OPERATION, + [], + plugins, + ) + + @overload + def json_enums( + self, + request: models.JsonEnumsInput | models.JsonEnumsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.JsonEnumsOutput: ... + + @overload + def json_enums( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.JsonEnumsInputDict], + ) -> models.JsonEnumsOutput: + """ + This example serializes enums as top level properties, in lists, sets, + and maps. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def json_enums( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.JsonEnumsOutput: + return self._invoke( + self._select_input(models.JSON_ENUMS, args, kwargs), + models.JSON_ENUMS, + [], + plugins, + ) + + @overload + def json_int_enums( + self, + request: models.JsonIntEnumsInput | models.JsonIntEnumsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.JsonIntEnumsOutput: ... + + @overload + def json_int_enums( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.JsonIntEnumsInputDict], + ) -> models.JsonIntEnumsOutput: + """ + This example serializes intEnums as top level properties, in lists, + sets, and maps. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def json_int_enums( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.JsonIntEnumsOutput: + return self._invoke( + self._select_input(models.JSON_INT_ENUMS, args, kwargs), + models.JSON_INT_ENUMS, + [], + plugins, + ) + + @overload + def json_unions( + self, + request: models.JsonUnionsInput | models.JsonUnionsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.JsonUnionsOutput: ... + + @overload + def json_unions( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.JsonUnionsInputDict], + ) -> models.JsonUnionsOutput: + """ + This operation uses unions for inputs and outputs. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def json_unions( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.JsonUnionsOutput: + return self._invoke( + self._select_input(models.JSON_UNIONS, args, kwargs), + models.JSON_UNIONS, + [], + plugins, + ) + + @overload + def kitchen_sink_operation( + self, + request: models.KitchenSinkOperationInput + | models.KitchenSinkOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.KitchenSinkOperationOutput: ... + + @overload + def kitchen_sink_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.KitchenSinkOperationInputDict], + ) -> models.KitchenSinkOperationOutput: + """ + Invokes the KitchenSinkOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def kitchen_sink_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.KitchenSinkOperationOutput: + return self._invoke( + self._select_input(models.KITCHEN_SINK_OPERATION, args, kwargs), + models.KITCHEN_SINK_OPERATION, + [], + plugins, + ) + + @overload + def null_operation( + self, + request: models.NullOperationInput | models.NullOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.NullOperationOutput: ... + + @overload + def null_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.NullOperationInputDict], + ) -> models.NullOperationOutput: + """ + Invokes the NullOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def null_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.NullOperationOutput: + return self._invoke( + self._select_input(models.NULL_OPERATION, args, kwargs), + models.NULL_OPERATION, + [], + plugins, + ) + + @overload + def operation_with_optional_input_output( + self, + request: models.OperationWithOptionalInputOutputInput + | models.OperationWithOptionalInputOutputInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.OperationWithOptionalInputOutputOutput: ... + + @overload + def operation_with_optional_input_output( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.OperationWithOptionalInputOutputInputDict], + ) -> models.OperationWithOptionalInputOutputOutput: + """ + Invokes the OperationWithOptionalInputOutput operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def operation_with_optional_input_output( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.OperationWithOptionalInputOutputOutput: + return self._invoke( + self._select_input( + models.OPERATION_WITH_OPTIONAL_INPUT_OUTPUT, args, kwargs + ), + models.OPERATION_WITH_OPTIONAL_INPUT_OUTPUT, + [], + plugins, + ) + + @overload + def put_and_get_inline_documents( + self, + request: models.PutAndGetInlineDocumentsInput + | models.PutAndGetInlineDocumentsInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.PutAndGetInlineDocumentsOutput: ... + + @overload + def put_and_get_inline_documents( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.PutAndGetInlineDocumentsInputDict], + ) -> models.PutAndGetInlineDocumentsOutput: + """ + This example serializes an inline document as part of the payload. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def put_and_get_inline_documents( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.PutAndGetInlineDocumentsOutput: + return self._invoke( + self._select_input(models.PUT_AND_GET_INLINE_DOCUMENTS, args, kwargs), + models.PUT_AND_GET_INLINE_DOCUMENTS, + [], + plugins, + ) + + @overload + def put_with_content_encoding( + self, + request: models.PutWithContentEncodingInput + | models.PutWithContentEncodingInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.PutWithContentEncodingOutput: ... + + @overload + def put_with_content_encoding( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.PutWithContentEncodingInputDict], + ) -> models.PutWithContentEncodingOutput: + """ + Invokes the PutWithContentEncoding operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def put_with_content_encoding( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.PutWithContentEncodingOutput: + return self._invoke( + self._select_input(models.PUT_WITH_CONTENT_ENCODING, args, kwargs), + models.PUT_WITH_CONTENT_ENCODING, + [], + plugins, + ) + + @overload + def simple_scalar_properties( + self, + request: models.SimpleScalarPropertiesInput + | models.SimpleScalarPropertiesInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.SimpleScalarPropertiesOutput: ... + + @overload + def simple_scalar_properties( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.SimpleScalarPropertiesInputDict], + ) -> models.SimpleScalarPropertiesOutput: + """ + Invokes the SimpleScalarProperties operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def simple_scalar_properties( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.SimpleScalarPropertiesOutput: + return self._invoke( + self._select_input(models.SIMPLE_SCALAR_PROPERTIES, args, kwargs), + models.SIMPLE_SCALAR_PROPERTIES, + [], + plugins, + ) + + @overload + def sparse_nulls_operation( + self, + request: models.SparseNullsOperationInput + | models.SparseNullsOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.SparseNullsOperationOutput: ... + + @overload + def sparse_nulls_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.SparseNullsOperationInputDict], + ) -> models.SparseNullsOperationOutput: + """ + Invokes the SparseNullsOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def sparse_nulls_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.SparseNullsOperationOutput: + return self._invoke( + self._select_input(models.SPARSE_NULLS_OPERATION, args, kwargs), + models.SPARSE_NULLS_OPERATION, + [], + plugins, + ) + + def _new_config(self) -> JsonProtocolConfig: + return JsonProtocolConfig.resolve() + + def _post_setup(self, config: JsonProtocolConfig) -> None: + if config.aws_credentials_identity_resolver is None: + config_context = config.resolution_context() + config_file = None + profile_name = None + if config_context is not None: + config_file = config_context.parsed_profiles() + if config_context.profile_source is ConfigSource.OVERRIDE: + profile_name = config_context.profile_name + config.aws_credentials_identity_resolver = IdentityChain.create( + AWSCredentialsIdentity, + config_file=config_file, + profile_name=profile_name, + region_override=config.region, + http_client=cast(HTTPClient | None, config.transport), + ) diff --git a/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/config.py b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/config.py new file mode 100644 index 000000000..2b531c169 --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/config.py @@ -0,0 +1,118 @@ +from collections.abc import Callable +from dataclasses import dataclass, field +from typing import Any, ClassVar, Self, Unpack + +from smithy_aws_core.auth.sigv4 import SigV4AuthScheme +from smithy_aws_core.config.aws_config import AwsConfig, AwsConfigOverrides +from smithy_aws_core.config.filesystem import FileSystem +from smithy_aws_core.config.resolvers import EndpointUriResolver +from smithy_aws_core.config.types import FieldSpec +from smithy_aws_core.endpoints import AWS_RULES_EXTENSION +from smithy_aws_core.protocols import AwsJson11ClientProtocol +from smithy_core.auth import DefaultAuthResolver +from smithy_core.endpoints import BddEndpointResolver +from smithy_core.interceptors import Interceptor +from smithy_core.interfaces import ( + ClientProtocol, + EndpointResolver, + ProtocolConstructor, + ProtocolSettings, +) +from smithy_core.interfaces.auth import AuthScheme, AuthSchemeResolver +from smithy_core.shapes import ShapeID +from smithy_http.urllib3 import Urllib3HTTPClient + +from awsjson11_client._private.endpoints import BDD +from awsjson11_client._private.schemas import JSON_PROTOCOL + +_PROTOCOL_SETTINGS = ProtocolSettings( + namespace="aws.protocoltests.json", + service_target="JsonProtocol", + version="2018-01-01", + service_schema=JSON_PROTOCOL, +) + + +class _JsonProtocolConfigOverrides(AwsConfigOverrides, total=False): + "Explicit field values JsonProtocolConfig.resolve accepts." + + endpoint_resolver: EndpointResolver | None + protocol: ( + ClientProtocol[Any, Any] | ProtocolConstructor[ClientProtocol[Any, Any]] | None + ) + auth_schemes: dict[ShapeID, AuthScheme[Any, Any, Any, Any]] | None + auth_scheme_resolver: AuthSchemeResolver | None + + +@dataclass(kw_only=True, repr=False, init=False) +class JsonProtocolConfig(AwsConfig): + "Configuration for JsonProtocolClient." + + interceptors: list[Interceptor[Any, Any, Any, Any]] = field( + default_factory=list[Interceptor[Any, Any, Any, Any]] + ) + "Hooks called during the execution of a request." + + endpoint_resolver: EndpointResolver | None = None + "Resolves the endpoint of each operation." + + protocol: ClientProtocol[Any, Any] | None = None + "Serializes requests and deserializes responses." + + auth_schemes: dict[ShapeID, AuthScheme[Any, Any, Any, Any]] | None = None + "Auth schemes by auth scheme ID." + + auth_scheme_resolver: AuthSchemeResolver | None = None + "Determines the auth scheme for each operation." + + _FIELDS: ClassVar[dict[str, FieldSpec]] = { + **AwsConfig._FIELDS, + "endpoint_uri": FieldSpec( + default=None, resolver=EndpointUriResolver("json_protocol").program + ), + "endpoint_resolver": FieldSpec( + default_factory=lambda: BddEndpointResolver( + BDD, extensions=[AWS_RULES_EXTENSION] + ) + ), + "protocol": FieldSpec( + default_factory=lambda: AwsJson11ClientProtocol(_PROTOCOL_SETTINGS), + converter=lambda p: p(_PROTOCOL_SETTINGS) if isinstance(p, type) else p, + ), + "auth_schemes": FieldSpec( + default_factory=lambda: { + ShapeID("aws.auth#sigv4"): SigV4AuthScheme(service="jsonprotocol") + } + ), + "auth_scheme_resolver": FieldSpec(default_factory=DefaultAuthResolver), + "transport": FieldSpec(default_factory=lambda: Urllib3HTTPClient()), + } + + def set_auth_scheme(self, scheme: AuthScheme[Any, Any, Any, Any]) -> None: + "Set an auth scheme under its scheme ID." + auth_schemes = dict(self.auth_schemes or {}) + auth_schemes[scheme.scheme_id] = scheme + self.auth_schemes = auth_schemes + + @classmethod + def resolve( # pyright: ignore[reportIncompatibleMethodOverride] + cls, + *, + profile: str | None = None, + fs: FileSystem | None = None, + config_file_path: str | None = None, + credentials_file_path: str | None = None, + **overrides: Unpack[_JsonProtocolConfigOverrides], + ) -> Self: + "Resolve the config from overrides, the environment, and config files." + return cls._resolve( + profile=profile, + fs=fs, + config_file_path=config_file_path, + credentials_file_path=credentials_file_path, + overrides=overrides, + ) + + +type Plugin = Callable[[JsonProtocolConfig], None] +"A callable that customizes the client configuration." diff --git a/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/models.py b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/models.py new file mode 100644 index 000000000..32848215f --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/models.py @@ -0,0 +1,242 @@ +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", + "InvalidGreeting": "INVALID_GREETING", + "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", + "OperationWithOptionalInputOutputInput": "OPERATION_WITH_OPTIONAL_INPUT_OUTPUT_INPUT", + "OperationWithOptionalInputOutputOutput": "OPERATION_WITH_OPTIONAL_INPUT_OUTPUT_OUTPUT", + "PutWithContentEncodingInput": "PUT_WITH_CONTENT_ENCODING_INPUT", + "SimpleStruct": "SIMPLE_STRUCT", + "StructWithJsonName": "STRUCT_WITH_JSON_NAME", + "FooEnum": "FOO_ENUM", + "GreetingStruct": "GREETING_STRUCT", + "IntegerEnum": "INTEGER_ENUM", + "DatetimeOffsetsInput": "DATETIME_OFFSETS_INPUT", + "EmptyOperationInput": "EMPTY_OPERATION_INPUT", + "EmptyOperationOutput": "EMPTY_OPERATION_OUTPUT", + "EndpointOperationInput": "ENDPOINT_OPERATION_INPUT", + "EndpointOperationOutput": "ENDPOINT_OPERATION_OUTPUT", + "EndpointWithHostLabelOperationInput": "ENDPOINT_WITH_HOST_LABEL_OPERATION_INPUT", + "EndpointWithHostLabelOperationOutput": "ENDPOINT_WITH_HOST_LABEL_OPERATION_OUTPUT", + "FractionalSecondsInput": "FRACTIONAL_SECONDS_INPUT", + "GreetingWithErrorsInput": "GREETING_WITH_ERRORS_INPUT", + "HostWithPathOperationInput": "HOST_WITH_PATH_OPERATION_INPUT", + "HostWithPathOperationOutput": "HOST_WITH_PATH_OPERATION_OUTPUT", + "JsonEnumsInput": "JSON_ENUMS_INPUT", + "JsonEnumsOutput": "JSON_ENUMS_OUTPUT", + "JsonIntEnumsInput": "JSON_INT_ENUMS_INPUT", + "JsonIntEnumsOutput": "JSON_INT_ENUMS_OUTPUT", + "JsonUnionsInput": "JSON_UNIONS_INPUT", + "JsonUnionsOutput": "JSON_UNIONS_OUTPUT", + "KitchenSinkOperationInput": "KITCHEN_SINK_OPERATION_INPUT", + "KitchenSinkOperationOutput": "KITCHEN_SINK_OPERATION_OUTPUT", + "NullOperationInput": "NULL_OPERATION_INPUT", + "NullOperationOutput": "NULL_OPERATION_OUTPUT", + "PutAndGetInlineDocumentsInput": "PUT_AND_GET_INLINE_DOCUMENTS_INPUT", + "PutAndGetInlineDocumentsOutput": "PUT_AND_GET_INLINE_DOCUMENTS_OUTPUT", + "PutWithContentEncodingOutput": "PUT_WITH_CONTENT_ENCODING_OUTPUT", + "SimpleScalarPropertiesInput": "SIMPLE_SCALAR_PROPERTIES_INPUT", + "SimpleScalarPropertiesOutput": "SIMPLE_SCALAR_PROPERTIES_OUTPUT", + "SparseNullsOperationInput": "SPARSE_NULLS_OPERATION_INPUT", + "SparseNullsOperationOutput": "SPARSE_NULLS_OPERATION_OUTPUT", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_OPERATIONS: dict[str, tuple[tuple[str, ...], tuple[str, ...]]] = { + "CONTENT_TYPE_PARAMETERS": ( + (), + ("aws.auth#sigv4",), + ), + "DATETIME_OFFSETS": ( + (), + ("aws.auth#sigv4",), + ), + "EMPTY_OPERATION": ( + (), + ("aws.auth#sigv4",), + ), + "ENDPOINT_OPERATION": ( + (), + ("aws.auth#sigv4",), + ), + "ENDPOINT_WITH_HOST_LABEL_OPERATION": ( + (), + ("aws.auth#sigv4",), + ), + "FRACTIONAL_SECONDS": ( + (), + ("aws.auth#sigv4",), + ), + "GREETING_WITH_ERRORS": ( + ( + "aws.protocoltests.json#ComplexError", + "aws.protocoltests.json#FooError", + "aws.protocoltests.json#InvalidGreeting", + ), + ("aws.auth#sigv4",), + ), + "HOST_WITH_PATH_OPERATION": ( + (), + ("aws.auth#sigv4",), + ), + "JSON_ENUMS": ( + (), + ("aws.auth#sigv4",), + ), + "JSON_INT_ENUMS": ( + (), + ("aws.auth#sigv4",), + ), + "JSON_UNIONS": ( + (), + ("aws.auth#sigv4",), + ), + "KITCHEN_SINK_OPERATION": ( + ( + "aws.protocoltests.json#ErrorWithMembers", + "aws.protocoltests.json#ErrorWithoutMembers", + ), + ("aws.auth#sigv4",), + ), + "NULL_OPERATION": ( + (), + ("aws.auth#sigv4",), + ), + "OPERATION_WITH_OPTIONAL_INPUT_OUTPUT": ( + (), + ("aws.auth#sigv4",), + ), + "PUT_AND_GET_INLINE_DOCUMENTS": ( + (), + ("aws.auth#sigv4",), + ), + "PUT_WITH_CONTENT_ENCODING": ( + (), + ("aws.auth#sigv4",), + ), + "SIMPLE_SCALAR_PROPERTIES": ( + (), + ("aws.auth#sigv4",), + ), + "SPARSE_NULLS_OPERATION": ( + (), + ("aws.auth#sigv4",), + ), +} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES, *_OPERATIONS) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "ComplexError", + "ComplexNestedErrorData", + "ContentTypeParametersInput", + "ContentTypeParametersOutput", + "DatetimeOffsetsInput", + "DatetimeOffsetsOutput", + "EmptyOperationInput", + "EmptyOperationOutput", + "EmptyStruct", + "EndpointOperationInput", + "EndpointOperationOutput", + "EndpointWithHostLabelOperationInput", + "EndpointWithHostLabelOperationOutput", + "ErrorWithMembers", + "ErrorWithoutMembers", + "FooEnum", + "FooError", + "FractionalSecondsInput", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsInput", + "GreetingWithErrorsOutput", + "HostWithPathOperationInput", + "HostWithPathOperationOutput", + "IntegerEnum", + "InvalidGreeting", + "JsonEnumsInput", + "JsonEnumsOutput", + "JsonIntEnumsInput", + "JsonIntEnumsOutput", + "JsonUnionsInput", + "JsonUnionsOutput", + "KitchenSink", + "KitchenSinkOperationInput", + "KitchenSinkOperationOutput", + "MyUnion", + "NullOperationInput", + "NullOperationOutput", + "OperationWithOptionalInputOutputInput", + "OperationWithOptionalInputOutputOutput", + "PutAndGetInlineDocumentsInput", + "PutAndGetInlineDocumentsOutput", + "PutWithContentEncodingInput", + "PutWithContentEncodingOutput", + "SimpleScalarPropertiesInput", + "SimpleScalarPropertiesOutput", + "SimpleStruct", + "SparseNullsOperationInput", + "SparseNullsOperationOutput", + "StructWithJsonName", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + if (data := _OPERATIONS.get(name)) is not None: + return globals().setdefault(name, _registry.build_operation(name, *data)) + 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-client/src/awsjson11_client/models.pyi b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/models.pyi new file mode 100644 index 000000000..ced1d805f --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/models.pyi @@ -0,0 +1,982 @@ +from collections.abc import Mapping, Sequence +from dataclasses import dataclass +from datetime import datetime +from enum import IntEnum, StrEnum +from typing import Required, Self, TypedDict + +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.schemas import APIOperation +from smithy_core.serializers import ShapeSerializer +from smithy_core.types import UnknownEnumMixin + +__all__ = [ + "CONTENT_TYPE_PARAMETERS", + "DATETIME_OFFSETS", + "EMPTY_OPERATION", + "ENDPOINT_OPERATION", + "ENDPOINT_WITH_HOST_LABEL_OPERATION", + "FRACTIONAL_SECONDS", + "GREETING_WITH_ERRORS", + "HOST_WITH_PATH_OPERATION", + "JSON_ENUMS", + "JSON_INT_ENUMS", + "JSON_UNIONS", + "KITCHEN_SINK_OPERATION", + "NULL_OPERATION", + "OPERATION_WITH_OPTIONAL_INPUT_OUTPUT", + "PUT_AND_GET_INLINE_DOCUMENTS", + "PUT_WITH_CONTENT_ENCODING", + "SIMPLE_SCALAR_PROPERTIES", + "SPARSE_NULLS_OPERATION", + "ComplexError", + "ComplexNestedErrorData", + "ContentTypeParametersInput", + "ContentTypeParametersOutput", + "DatetimeOffsetsInput", + "DatetimeOffsetsOutput", + "EmptyOperationInput", + "EmptyOperationOutput", + "EmptyStruct", + "EndpointOperationInput", + "EndpointOperationOutput", + "EndpointWithHostLabelOperationInput", + "EndpointWithHostLabelOperationOutput", + "ErrorWithMembers", + "ErrorWithoutMembers", + "FooEnum", + "FooError", + "FractionalSecondsInput", + "FractionalSecondsOutput", + "GreetingStruct", + "GreetingWithErrorsInput", + "GreetingWithErrorsOutput", + "HostWithPathOperationInput", + "HostWithPathOperationOutput", + "IntegerEnum", + "InvalidGreeting", + "JsonEnumsInput", + "JsonEnumsOutput", + "JsonIntEnumsInput", + "JsonIntEnumsOutput", + "JsonUnionsInput", + "JsonUnionsOutput", + "KitchenSink", + "KitchenSinkOperationInput", + "KitchenSinkOperationOutput", + "MyUnion", + "MyUnionBlobValue", + "MyUnionBooleanValue", + "MyUnionEnumValue", + "MyUnionListValue", + "MyUnionMapValue", + "MyUnionNumberValue", + "MyUnionStringValue", + "MyUnionStructureValue", + "MyUnionTimestampValue", + "MyUnionUnknown", + "NullOperationInput", + "NullOperationOutput", + "OperationWithOptionalInputOutputInput", + "OperationWithOptionalInputOutputOutput", + "PutAndGetInlineDocumentsInput", + "PutAndGetInlineDocumentsOutput", + "PutWithContentEncodingInput", + "PutWithContentEncodingOutput", + "ServiceError", + "SimpleScalarPropertiesInput", + "SimpleScalarPropertiesOutput", + "SimpleStruct", + "SparseNullsOperationInput", + "SparseNullsOperationOutput", + "StructWithJsonName", +] + +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 = ... + +class ContentTypeParametersInputDict(TypedDict, total=False): + "Dictionary form of `ContentTypeParametersInput`." + + 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." + +class EmptyStructDict(TypedDict, total=False): + "Dictionary form of `EmptyStruct`." + +@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 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 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 = ... + +class KitchenSinkDict(TypedDict, total=False): + "Dictionary form of `KitchenSink`." + + blob: bytes | None + boolean: bool | None + double: float | None + empty_struct: EmptyStruct | EmptyStructDict | None + float_: float | None + httpdate_timestamp: datetime | None + integer: int | None + iso8601_timestamp: datetime | None + json_value: str | None + list_of_lists: Sequence[Sequence[str]] | None + list_of_maps_of_strings: Sequence[Mapping[str, str]] | None + list_of_strings: Sequence[str] | None + list_of_structs: Sequence[SimpleStruct | SimpleStructDict] | None + long: int | None + map_of_lists_of_strings: Mapping[str, Sequence[str]] | None + map_of_maps: Mapping[str, Mapping[str, str]] | None + map_of_strings: Mapping[str, str] | None + map_of_structs: Mapping[str, SimpleStruct | SimpleStructDict] | None + recursive_list: Sequence[KitchenSink | KitchenSinkDict] | None + recursive_map: Mapping[str, KitchenSink | KitchenSinkDict] | None + recursive_struct: KitchenSink | KitchenSinkDict | None + simple_struct: SimpleStruct | SimpleStructDict | None + string: str | None + struct_with_json_name: StructWithJsonName | StructWithJsonNameDict | None + timestamp: datetime | None + unix_timestamp: datetime | None + +@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: ... + +class MyUnionStringValueDict(TypedDict): + string_value: str + +class MyUnionBooleanValueDict(TypedDict): + boolean_value: bool + +class MyUnionNumberValueDict(TypedDict): + number_value: int + +class MyUnionBlobValueDict(TypedDict): + blob_value: bytes + +class MyUnionTimestampValueDict(TypedDict): + timestamp_value: datetime + +class MyUnionEnumValueDict(TypedDict): + enum_value: str + +class MyUnionListValueDict(TypedDict): + list_value: Sequence[str] + +class MyUnionMapValueDict(TypedDict): + map_value: Mapping[str, str] + +class MyUnionStructureValueDict(TypedDict): + structure_value: GreetingStruct | GreetingStructDict + +MyUnionDict = ( + MyUnionStringValueDict + | MyUnionBooleanValueDict + | MyUnionNumberValueDict + | MyUnionBlobValueDict + | MyUnionTimestampValueDict + | MyUnionEnumValueDict + | MyUnionListValueDict + | MyUnionMapValueDict + | MyUnionStructureValueDict +) +"Dictionary form of `MyUnion`, setting exactly one variant." + +@dataclass(kw_only=True) +class OperationWithOptionalInputOutputInput(_SerdeShape): + "Dataclass for OperationWithOptionalInputOutputInput structure." + + value: str | None = ... + +class OperationWithOptionalInputOutputInputDict(TypedDict, total=False): + "Dictionary form of `OperationWithOptionalInputOutputInput`." + + 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 PutWithContentEncodingInput(_SerdeShape): + "Dataclass for PutWithContentEncodingInput structure." + + encoding: str | None = ... + data: str | None = ... + +class PutWithContentEncodingInputDict(TypedDict, total=False): + "Dictionary form of `PutWithContentEncodingInput`." + + encoding: str | None + data: str | None + +@dataclass(kw_only=True) +class SimpleStruct(_SerdeShape): + "Dataclass for SimpleStruct structure." + + value: str | None = ... + +class SimpleStructDict(TypedDict, total=False): + "Dictionary form of `SimpleStruct`." + + value: str | None + +@dataclass(kw_only=True) +class StructWithJsonName(_SerdeShape): + "Dataclass for StructWithJsonName structure." + + value: str | None = ... + +class StructWithJsonNameDict(TypedDict, total=False): + "Dictionary form of `StructWithJsonName`." + + value: 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 = ... + +class GreetingStructDict(TypedDict, total=False): + "Dictionary form of `GreetingStruct`." + + hi: str | None + +class IntegerEnum(UnknownEnumMixin, IntEnum): + A = 1 + B = 2 + C = 3 + +@dataclass(kw_only=True) +class DatetimeOffsetsInput(_SerdeShape): + "Dataclass for DatetimeOffsetsInput structure." + +class DatetimeOffsetsInputDict(TypedDict, total=False): + "Dictionary form of `DatetimeOffsetsInput`." + +@dataclass(kw_only=True) +class EmptyOperationInput(_SerdeShape): + "Dataclass for EmptyOperationInput structure." + +class EmptyOperationInputDict(TypedDict, total=False): + "Dictionary form of `EmptyOperationInput`." + +@dataclass(kw_only=True) +class EmptyOperationOutput(_SerdeShape): + "Dataclass for EmptyOperationOutput 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 EndpointOperationInput(_SerdeShape): + "Dataclass for EndpointOperationInput structure." + +class EndpointOperationInputDict(TypedDict, total=False): + "Dictionary form of `EndpointOperationInput`." + +@dataclass(kw_only=True) +class EndpointOperationOutput(_SerdeShape): + "Dataclass for EndpointOperationOutput 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 = ... + +class EndpointWithHostLabelOperationInputDict(TypedDict, total=False): + "Dictionary form of `EndpointWithHostLabelOperationInput`." + + label: Required[str] + +@dataclass(kw_only=True) +class EndpointWithHostLabelOperationOutput(_SerdeShape): + "Dataclass for EndpointWithHostLabelOperationOutput 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 FractionalSecondsInput(_SerdeShape): + "Dataclass for FractionalSecondsInput structure." + +class FractionalSecondsInputDict(TypedDict, total=False): + "Dictionary form of `FractionalSecondsInput`." + +@dataclass(kw_only=True) +class GreetingWithErrorsInput(_SerdeShape): + "Dataclass for GreetingWithErrorsInput structure." + +class GreetingWithErrorsInputDict(TypedDict, total=False): + "Dictionary form of `GreetingWithErrorsInput`." + +@dataclass(kw_only=True) +class HostWithPathOperationInput(_SerdeShape): + "Dataclass for HostWithPathOperationInput structure." + +class HostWithPathOperationInputDict(TypedDict, total=False): + "Dictionary form of `HostWithPathOperationInput`." + +@dataclass(kw_only=True) +class HostWithPathOperationOutput(_SerdeShape): + "Dataclass for HostWithPathOperationOutput 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 JsonEnumsInput(_SerdeShape): + "Dataclass for JsonEnumsInput 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 = ... + +class JsonEnumsInputDict(TypedDict, total=False): + "Dictionary form of `JsonEnumsInput`." + + foo_enum1: str | None + foo_enum2: str | None + foo_enum3: str | None + foo_enum_list: Sequence[str] | None + foo_enum_set: Sequence[str] | None + foo_enum_map: Mapping[str, str] | None + +@dataclass(kw_only=True) +class JsonEnumsOutput(_SerdeShape): + "Dataclass for JsonEnumsOutput 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 JsonIntEnumsInput(_SerdeShape): + "Dataclass for JsonIntEnumsInput 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 = ... + +class JsonIntEnumsInputDict(TypedDict, total=False): + "Dictionary form of `JsonIntEnumsInput`." + + int_enum1: int | None + int_enum2: int | None + int_enum3: int | None + int_enum_list: Sequence[int] | None + int_enum_set: Sequence[int] | None + int_enum_map: Mapping[str, int] | None + +@dataclass(kw_only=True) +class JsonIntEnumsOutput(_SerdeShape): + "Dataclass for JsonIntEnumsOutput 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 JsonUnionsInput(_SerdeShape): + "A shared structure that contains a single union member." + + contents: MyUnion | None = ... + +class JsonUnionsInputDict(TypedDict, total=False): + "Dictionary form of `JsonUnionsInput`." + + contents: MyUnion | MyUnionDict | None + +@dataclass(kw_only=True) +class JsonUnionsOutput(_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(kw_only=True) +class KitchenSinkOperationInput(_SerdeShape): + "Dataclass for KitchenSinkOperationInput 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 = ... + +class KitchenSinkOperationInputDict(TypedDict, total=False): + "Dictionary form of `KitchenSinkOperationInput`." + + blob: bytes | None + boolean: bool | None + double: float | None + empty_struct: EmptyStruct | EmptyStructDict | None + float_: float | None + httpdate_timestamp: datetime | None + integer: int | None + iso8601_timestamp: datetime | None + json_value: str | None + list_of_lists: Sequence[Sequence[str]] | None + list_of_maps_of_strings: Sequence[Mapping[str, str]] | None + list_of_strings: Sequence[str] | None + list_of_structs: Sequence[SimpleStruct | SimpleStructDict] | None + long: int | None + map_of_lists_of_strings: Mapping[str, Sequence[str]] | None + map_of_maps: Mapping[str, Mapping[str, str]] | None + map_of_strings: Mapping[str, str] | None + map_of_structs: Mapping[str, SimpleStruct | SimpleStructDict] | None + recursive_list: Sequence[KitchenSink | KitchenSinkDict] | None + recursive_map: Mapping[str, KitchenSink | KitchenSinkDict] | None + recursive_struct: KitchenSink | KitchenSinkDict | None + simple_struct: SimpleStruct | SimpleStructDict | None + string: str | None + struct_with_json_name: StructWithJsonName | StructWithJsonNameDict | None + timestamp: datetime | None + unix_timestamp: datetime | None + +@dataclass(kw_only=True) +class KitchenSinkOperationOutput(_SerdeShape): + "Dataclass for KitchenSinkOperationOutput 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(kw_only=True) +class NullOperationInput(_SerdeShape): + "Dataclass for NullOperationInput structure." + + string: str | None = ... + +class NullOperationInputDict(TypedDict, total=False): + "Dictionary form of `NullOperationInput`." + + string: str | None + +@dataclass(kw_only=True) +class NullOperationOutput(_SerdeShape): + "Dataclass for NullOperationOutput 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 PutAndGetInlineDocumentsInput(_SerdeShape): + "Dataclass for PutAndGetInlineDocumentsInput structure." + + inline_document: Document | None = ... + +class PutAndGetInlineDocumentsInputDict(TypedDict, total=False): + "Dictionary form of `PutAndGetInlineDocumentsInput`." + + inline_document: Document | None + +@dataclass(kw_only=True) +class PutAndGetInlineDocumentsOutput(_SerdeShape): + "Dataclass for PutAndGetInlineDocumentsOutput 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 PutWithContentEncodingOutput(_SerdeShape): + "Dataclass for PutWithContentEncodingOutput 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 SimpleScalarPropertiesInput(_SerdeShape): + "Dataclass for SimpleScalarPropertiesInput structure." + + float_value: float | None = ... + double_value: float | None = ... + +class SimpleScalarPropertiesInputDict(TypedDict, total=False): + "Dictionary form of `SimpleScalarPropertiesInput`." + + 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. + """ + +@dataclass(kw_only=True) +class SparseNullsOperationInput(_SerdeShape): + "Dataclass for SparseNullsOperationInput structure." + + sparse_string_list: list[str | None] | None = ... + sparse_string_map: dict[str, str | None] | None = ... + +class SparseNullsOperationInputDict(TypedDict, total=False): + "Dictionary form of `SparseNullsOperationInput`." + + sparse_string_list: Sequence[str | None] | None + sparse_string_map: Mapping[str, str | None] | None + +@dataclass(kw_only=True) +class SparseNullsOperationOutput(_SerdeShape): + "Dataclass for SparseNullsOperationOutput 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. + """ + +CONTENT_TYPE_PARAMETERS: APIOperation[ + ContentTypeParametersInput, ContentTypeParametersOutput +] +DATETIME_OFFSETS: APIOperation[DatetimeOffsetsInput, DatetimeOffsetsOutput] +EMPTY_OPERATION: APIOperation[EmptyOperationInput, EmptyOperationOutput] +ENDPOINT_OPERATION: APIOperation[EndpointOperationInput, EndpointOperationOutput] +ENDPOINT_WITH_HOST_LABEL_OPERATION: APIOperation[ + EndpointWithHostLabelOperationInput, EndpointWithHostLabelOperationOutput +] +FRACTIONAL_SECONDS: APIOperation[FractionalSecondsInput, FractionalSecondsOutput] +GREETING_WITH_ERRORS: APIOperation[GreetingWithErrorsInput, GreetingWithErrorsOutput] +HOST_WITH_PATH_OPERATION: APIOperation[ + HostWithPathOperationInput, HostWithPathOperationOutput +] +JSON_ENUMS: APIOperation[JsonEnumsInput, JsonEnumsOutput] +JSON_INT_ENUMS: APIOperation[JsonIntEnumsInput, JsonIntEnumsOutput] +JSON_UNIONS: APIOperation[JsonUnionsInput, JsonUnionsOutput] +KITCHEN_SINK_OPERATION: APIOperation[ + KitchenSinkOperationInput, KitchenSinkOperationOutput +] +NULL_OPERATION: APIOperation[NullOperationInput, NullOperationOutput] +OPERATION_WITH_OPTIONAL_INPUT_OUTPUT: APIOperation[ + OperationWithOptionalInputOutputInput, OperationWithOptionalInputOutputOutput +] +PUT_AND_GET_INLINE_DOCUMENTS: APIOperation[ + PutAndGetInlineDocumentsInput, PutAndGetInlineDocumentsOutput +] +PUT_WITH_CONTENT_ENCODING: APIOperation[ + PutWithContentEncodingInput, PutWithContentEncodingOutput +] +SIMPLE_SCALAR_PROPERTIES: APIOperation[ + SimpleScalarPropertiesInput, SimpleScalarPropertiesOutput +] +SPARSE_NULLS_OPERATION: APIOperation[ + SparseNullsOperationInput, SparseNullsOperationOutput +] diff --git a/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/py.typed b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/user_agent.py b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/user_agent.py new file mode 100644 index 000000000..e51722efe --- /dev/null +++ b/codegen-output-py/aws-json-1-1-client/src/awsjson11_client/user_agent.py @@ -0,0 +1,16 @@ +from smithy_aws_core.interceptors.user_agent import UserAgentInterceptor + +from awsjson11_client import __version__ +from awsjson11_client.config import JsonProtocolConfig + + +def aws_user_agent_plugin(config: JsonProtocolConfig) -> None: + "Send the AWS user agent with every request." + config.interceptors.append( + UserAgentInterceptor( + ua_suffix=config.user_agent_extra, + ua_app_id=config.sdk_ua_app_id, + sdk_version=__version__, + service_id="Json_Protocol", + ) + ) diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/.smithy-python-manifest.json b/codegen-output-py/query-compatible-aws-json-1-0-client/.smithy-python-manifest.json new file mode 100644 index 000000000..5eaf7a56b --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/.smithy-python-manifest.json @@ -0,0 +1,21 @@ +{ + "files": { + "README.md": "13c6e54a48c48f6a024e981c140de0b6899c86e19a4961c5b5bbfbca5d0ba6b7", + "pyproject.toml": "bacc62bc6d525ddbee7edda4b886b87ec116c42509ffaac11d0302956ea482a6", + "src/querycompatible_awsjson10_client/__init__.py": "aff5fd6054c35b4aadbf376bca648883901c2581a005c5f5bdafb5c0b41214e2", + "src/querycompatible_awsjson10_client/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/querycompatible_awsjson10_client/_private/endpoints.py": "7d515fe771678e82ddbe07798d6b7e48c25c6c9bec19cec9318deb0bc5064ead", + "src/querycompatible_awsjson10_client/_private/schemas.py": "cc88f0e7ad5c190d8c8dfeef89c45c73bfffd54e6710bec6e693ba8753f37f55", + "src/querycompatible_awsjson10_client/aio/__init__.py": "c147a9d60c2a26446fffc16eb7c4452299b7ec7c8de0cb55207a8f5e0189893e", + "src/querycompatible_awsjson10_client/aio/client.py": "a901f0976d7071bc02e3f73812ad89178b828bfa332bb2fd83b5852d64dc4664", + "src/querycompatible_awsjson10_client/aio/config.py": "c50946907f8489db780b579c2d1d4815a827b649c754745d61da765eec34523c", + "src/querycompatible_awsjson10_client/aio/user_agent.py": "3f53ccc91866f16bc80ea835a16fef5593be909ec62938f10d7b433494b8671a", + "src/querycompatible_awsjson10_client/client.py": "e99bc0002072f720baced05fdf598793406d8ec3a730b81fb954895f60864fce", + "src/querycompatible_awsjson10_client/config.py": "fbafbc4431b0c279f45561193b035ab09f9521913fcfa4076a5db52ec3f4f4ca", + "src/querycompatible_awsjson10_client/models.py": "143e8b8644ac97c317c07d9a31f7975364cb3c952601a640755a4568e31e2d3d", + "src/querycompatible_awsjson10_client/models.pyi": "16a51e56007a1bbb95969fc2aa0ecb3044196c2c4d4234420d01e7e06844d9ac", + "src/querycompatible_awsjson10_client/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/querycompatible_awsjson10_client/user_agent.py": "ef216309a4d581ecb0034a953c559af28ba29ea046e842a0dbea2a0209569565" + }, + "version": 1 +} diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/README.md b/codegen-output-py/query-compatible-aws-json-1-0-client/README.md new file mode 100644 index 000000000..41fa03076 --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/README.md @@ -0,0 +1,5 @@ + + +## querycompatible_awsjson10_client Client Package + +Python client for the query-compatible-aws-json-1-0 projection diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/pyproject.toml b/codegen-output-py/query-compatible-aws-json-1-0-client/pyproject.toml new file mode 100644 index 000000000..b6f3f4ccf --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/pyproject.toml @@ -0,0 +1,38 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[project] +name = "querycompatible_awsjson10_client" +version = "0.0.1" +description = "Python client for the query-compatible-aws-json-1-0 projection" +readme = "README.md" +requires-python = ">=3.12" +keywords = ["smithy", "querycompatible_awsjson10_client"] +license = {text = "Apache-2.0"} +dependencies = [ + "smithy-aws-core[json]~=0.16.0", + "smithy-core~=0.13.0", + "smithy-http[aiohttp,urllib3]~=0.10.0", +] + +[build-system] +requires = [ + "hatchling", +] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = [ + "src/querycompatible_awsjson10_client", +] + +[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-client/src/querycompatible_awsjson10_client/__init__.py b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/__init__.py new file mode 100644 index 000000000..0baab6de6 --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/__init__.py @@ -0,0 +1,30 @@ +from importlib import import_module +from typing import TYPE_CHECKING, Any + +__version__: str = "0.0.1" + +if TYPE_CHECKING: + from .aio.client import AsyncQueryCompatibleJSONRPC10Client + from .aio.config import AsyncQueryCompatibleJSONRPC10Config + from .client import QueryCompatibleJSONRPC10Client + from .config import QueryCompatibleJSONRPC10Config + +__all__ = [ + "AsyncQueryCompatibleJSONRPC10Client", + "AsyncQueryCompatibleJSONRPC10Config", + "QueryCompatibleJSONRPC10Client", + "QueryCompatibleJSONRPC10Config", +] + +_EXPORTS = { + "QueryCompatibleJSONRPC10Client": ".client", + "QueryCompatibleJSONRPC10Config": ".config", + "AsyncQueryCompatibleJSONRPC10Client": ".aio.client", + "AsyncQueryCompatibleJSONRPC10Config": ".aio.config", +} + + +def __getattr__(name: str) -> Any: + if name in _EXPORTS: + return getattr(import_module(_EXPORTS[name], __name__), name) + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/_private/__init__.py b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/_private/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/_private/endpoints.py b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/_private/endpoints.py new file mode 100644 index 000000000..ad3066783 --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/_private/endpoints.py @@ -0,0 +1,27 @@ +from smithy_core.endpoints import EndpointBdd + +# fmt: off +# Tags: ref=0, attr=1, call=2, list=3, map=4, error=5, endpoint=6. +BDD = EndpointBdd( + # (name, type, required, default, builtin, client_context_attribute) + parameters=( + ("endpoint", "string", False, None, "SDK::Endpoint", None), + ), + functions=("isSet",), + conditions=( + ((2, "isSet", (0, "endpoint")), None), # 0: isSet(endpoint) + ), + results=( + None, # 0: no match + (6, (0, "endpoint"), None, ()), # 1 + (5, "(default endpointRuleSet) endpoint is not set - you must configure an endpoint."), # 2 + ), + root=2, + # (condition, high, low); 1 and -1 are terminals, a negative reference is a + # complement edge, and 100_000_000 + k is result k. + nodes=( + -1, 1, -1, + 0, 100_000_001, 100_000_002, + ), +) +# fmt: on diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/_private/schemas.py b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/_private/schemas.py new file mode 100644 index 000000000..0f1a1df81 --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/_private/schemas.py @@ -0,0 +1,77 @@ +from types import MappingProxyType + +from smithy_core._schema_compact import StaticOperationSchema, StaticSchema + +n0 = "aws.protocoltests.json10" +_s0 = "CustomCodeError" +_s1 = "aws.protocols#awsQueryError" +_s2 = "smithy.api#error" +_s3 = "client" +_s4 = "message" +_s5 = "NoCustomCodeError" +_s6 = "QueryCompatibleOperationInput" +_s7 = "smithy.synthetic#originalShapeId" +_s8 = "smithy.api#Unit" +_s9 = "smithy.api#input" +_s10 = "QueryCompatibleOperationOutput" +_s11 = "smithy.api#output" +_s12 = "QueryCompatibleOperation" +_s13 = "QueryCompatibleJsonRpc10" +_s14 = "aws.api#service" +_s15 = "aws.auth#sigv4" +_s16 = "aws.protocols#awsJson1_0" +_s17 = "aws.protocols#awsQueryCompatible" + +CUSTOM_CODE_ERROR: StaticSchema = ( + 18, + n0, + _s0, + {_s1: MappingProxyType({"code": "Customized", "httpResponseCode": 402}), _s2: _s3}, + (_s4,), + ((3, 0),), +) + +NO_CUSTOM_CODE_ERROR: StaticSchema = ( + 18, + n0, + _s5, + {_s2: _s3}, + (_s4,), + ((3, 0),), +) + +QUERY_COMPATIBLE_OPERATION_INPUT: StaticSchema = ( + 18, + n0, + _s6, + {_s7: _s8, _s9: None}, +) + +QUERY_COMPATIBLE_OPERATION_OUTPUT: StaticSchema = ( + 18, + n0, + _s10, + {_s7: _s8, _s11: None}, +) + +QUERY_COMPATIBLE_OPERATION: StaticOperationSchema = ( + 23, + n0, + _s12, + 0, + QUERY_COMPATIBLE_OPERATION_INPUT, + QUERY_COMPATIBLE_OPERATION_OUTPUT, + (CUSTOM_CODE_ERROR, NO_CUSTOM_CODE_ERROR), +) + +QUERY_COMPATIBLE_JSON_RPC10: StaticSchema = ( + 21, + n0, + _s13, + { + _s14: MappingProxyType({"sdkId": "Query Compatible JSON RPC 10"}), + _s15: MappingProxyType({"name": "querycompatiblejsonrpc10"}), + _s16: None, + _s17: None, + }, +) diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/aio/__init__.py b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/aio/__init__.py new file mode 100644 index 000000000..01a3ff10b --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/aio/__init__.py @@ -0,0 +1,19 @@ +from importlib import import_module +from typing import TYPE_CHECKING, Any + +if TYPE_CHECKING: + from .client import AsyncQueryCompatibleJSONRPC10Client + from .config import AsyncQueryCompatibleJSONRPC10Config + +__all__ = ["AsyncQueryCompatibleJSONRPC10Client", "AsyncQueryCompatibleJSONRPC10Config"] + +_EXPORTS = { + "AsyncQueryCompatibleJSONRPC10Client": ".client", + "AsyncQueryCompatibleJSONRPC10Config": ".config", +} + + +def __getattr__(name: str) -> Any: + if name in _EXPORTS: + return getattr(import_module(_EXPORTS[name], __name__), name) + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/aio/client.py b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/aio/client.py new file mode 100644 index 000000000..e2bf28cb1 --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/aio/client.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from typing import Unpack, cast, overload + +from smithy_aws_core.aio.identity.chain import AsyncIdentityChain +from smithy_aws_core.config.types import ConfigSource +from smithy_aws_core.identity.components import AWSCredentialsIdentity +from smithy_core.aio.client import AsyncClient +from smithy_http.aio.interfaces import AsyncHTTPClient +from smithy_http.plugins import user_agent_plugin + +from querycompatible_awsjson10_client import models +from querycompatible_awsjson10_client.aio.config import ( + AsyncQueryCompatibleJSONRPC10Config, + Plugin, +) +from querycompatible_awsjson10_client.aio.user_agent import aws_user_agent_plugin + + +class AsyncQueryCompatibleJSONRPC10Client( + AsyncClient[AsyncQueryCompatibleJSONRPC10Config] +): + "Client for QueryCompatibleJsonRpc10." + + _client_plugins = (aws_user_agent_plugin, user_agent_plugin) + + @overload + async def query_compatible_operation( + self, + request: models.QueryCompatibleOperationInput + | models.QueryCompatibleOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.QueryCompatibleOperationOutput: ... + + @overload + async def query_compatible_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.QueryCompatibleOperationInputDict], + ) -> models.QueryCompatibleOperationOutput: + """ + Invokes the QueryCompatibleOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + async def query_compatible_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.QueryCompatibleOperationOutput: + return await self._invoke( + self._select_input(models.QUERY_COMPATIBLE_OPERATION, args, kwargs), + models.QUERY_COMPATIBLE_OPERATION, + [], + plugins, + ) + + async def _new_config(self) -> AsyncQueryCompatibleJSONRPC10Config: + return await AsyncQueryCompatibleJSONRPC10Config.resolve() + + async def _post_setup(self, config: AsyncQueryCompatibleJSONRPC10Config) -> None: + if config.aws_credentials_identity_resolver is None: + config_context = config.resolution_context() + config_file = None + profile_name = None + if config_context is not None: + config_file = await config_context.parsed_profiles() + if config_context.profile_source is ConfigSource.OVERRIDE: + profile_name = config_context.profile_name + config.aws_credentials_identity_resolver = await AsyncIdentityChain.create( + AWSCredentialsIdentity, + config_file=config_file, + profile_name=profile_name, + region_override=config.region, + http_client=cast(AsyncHTTPClient | None, config.transport), + ) diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/aio/config.py b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/aio/config.py new file mode 100644 index 000000000..de7d3160b --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/aio/config.py @@ -0,0 +1,130 @@ +from collections.abc import Callable +from dataclasses import dataclass, field +from typing import Any, ClassVar, Self, Unpack + +from smithy_aws_core.aio.auth.sigv4 import AsyncSigV4AuthScheme +from smithy_aws_core.aio.config.aws_config import ( + AsyncAwsConfig, + AsyncAwsConfigOverrides, +) +from smithy_aws_core.aio.config.filesystem import AsyncFileSystem +from smithy_aws_core.aio.protocols import AsyncAwsJson10ClientProtocol +from smithy_aws_core.config.resolvers import EndpointUriResolver +from smithy_aws_core.config.types import FieldSpec +from smithy_aws_core.endpoints import AWS_RULES_EXTENSION +from smithy_core.aio.interfaces import AsyncEndpointResolver +from smithy_core.aio.interfaces.auth import AsyncAuthScheme +from smithy_core.auth import DefaultAuthResolver +from smithy_core.endpoints import BddEndpointResolver +from smithy_core.interceptors import Interceptor +from smithy_core.interfaces import ( + ClientProtocol, + EndpointResolver, + ProtocolConstructor, + ProtocolSettings, +) +from smithy_core.interfaces.auth import AuthSchemeResolver +from smithy_core.shapes import ShapeID +from smithy_http.aio.aiohttp import AIOHTTPClient + +from querycompatible_awsjson10_client._private.endpoints import BDD +from querycompatible_awsjson10_client._private.schemas import ( + QUERY_COMPATIBLE_JSON_RPC10, +) + +_PROTOCOL_SETTINGS = ProtocolSettings( + namespace="aws.protocoltests.json10", + service_target="QueryCompatibleJsonRpc10", + version="2020-07-14", + service_schema=QUERY_COMPATIBLE_JSON_RPC10, +) + + +class _AsyncQueryCompatibleJSONRPC10ConfigOverrides( + AsyncAwsConfigOverrides, total=False +): + "Explicit field values AsyncQueryCompatibleJSONRPC10Config.resolve accepts." + + endpoint_resolver: EndpointResolver | AsyncEndpointResolver | None + protocol: ( + ClientProtocol[Any, Any] | ProtocolConstructor[ClientProtocol[Any, Any]] | None + ) + auth_schemes: dict[ShapeID, AsyncAuthScheme[Any, Any, Any, Any]] | None + auth_scheme_resolver: AuthSchemeResolver | None + + +@dataclass(kw_only=True, repr=False, init=False) +class AsyncQueryCompatibleJSONRPC10Config(AsyncAwsConfig): + "Configuration for AsyncQueryCompatibleJSONRPC10Client." + + interceptors: list[Interceptor[Any, Any, Any, Any]] = field( + default_factory=list[Interceptor[Any, Any, Any, Any]] + ) + "Hooks called during the execution of a request." + + endpoint_resolver: EndpointResolver | AsyncEndpointResolver | None = None + "Resolves the endpoint of each operation." + + protocol: ClientProtocol[Any, Any] | None = None + "Serializes requests and deserializes responses." + + auth_schemes: dict[ShapeID, AsyncAuthScheme[Any, Any, Any, Any]] | None = None + "Auth schemes by auth scheme ID." + + auth_scheme_resolver: AuthSchemeResolver | None = None + "Determines the auth scheme for each operation." + + _FIELDS: ClassVar[dict[str, FieldSpec]] = { + **AsyncAwsConfig._FIELDS, + "endpoint_uri": FieldSpec( + default=None, + resolver=EndpointUriResolver("query_compatible_json_rpc_10").program, + ), + "endpoint_resolver": FieldSpec( + default_factory=lambda: BddEndpointResolver( + BDD, extensions=[AWS_RULES_EXTENSION] + ) + ), + "protocol": FieldSpec( + default_factory=lambda: AsyncAwsJson10ClientProtocol(_PROTOCOL_SETTINGS), + converter=lambda p: p(_PROTOCOL_SETTINGS) if isinstance(p, type) else p, + ), + "auth_schemes": FieldSpec( + default_factory=lambda: { + ShapeID("aws.auth#sigv4"): AsyncSigV4AuthScheme( + service="querycompatiblejsonrpc10" + ) + } + ), + "auth_scheme_resolver": FieldSpec(default_factory=DefaultAuthResolver), + "transport": FieldSpec(default_factory=lambda: AIOHTTPClient()), + } + + def set_auth_scheme(self, scheme: AsyncAuthScheme[Any, Any, Any, Any]) -> None: + "Set an auth scheme under its scheme ID." + auth_schemes = dict(self.auth_schemes or {}) + auth_schemes[scheme.scheme_id] = scheme + self.auth_schemes = auth_schemes + + @classmethod + async def resolve( # pyright: ignore[reportIncompatibleMethodOverride] + cls, + *, + profile: str | None = None, + fs: AsyncFileSystem | None = None, + config_file_path: str | None = None, + credentials_file_path: str | None = None, + **overrides: Unpack[_AsyncQueryCompatibleJSONRPC10ConfigOverrides], + ) -> Self: + "Resolve the config from overrides, the environment, and config files." + return await cls._resolve( + profile=profile, + fs=fs, + config_file_path=config_file_path, + credentials_file_path=credentials_file_path, + overrides=overrides, + ) + + +type Plugin = Callable[[AsyncQueryCompatibleJSONRPC10Config], None] +"A callable that customizes the client configuration." diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/aio/user_agent.py b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/aio/user_agent.py new file mode 100644 index 000000000..a04e2c3c1 --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/aio/user_agent.py @@ -0,0 +1,18 @@ +from smithy_aws_core.interceptors.user_agent import UserAgentInterceptor + +from querycompatible_awsjson10_client import __version__ +from querycompatible_awsjson10_client.aio.config import ( + AsyncQueryCompatibleJSONRPC10Config, +) + + +def aws_user_agent_plugin(config: AsyncQueryCompatibleJSONRPC10Config) -> None: + "Send the AWS user agent with every request." + config.interceptors.append( + UserAgentInterceptor( + ua_suffix=config.user_agent_extra, + ua_app_id=config.sdk_ua_app_id, + sdk_version=__version__, + service_id="Query_Compatible_JSON_RPC_10", + ) + ) diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/client.py b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/client.py new file mode 100644 index 000000000..15679131c --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/client.py @@ -0,0 +1,78 @@ +from __future__ import annotations + +from typing import Unpack, cast, overload + +from smithy_aws_core.config.types import ConfigSource +from smithy_aws_core.identity.chain.resolver import IdentityChain +from smithy_aws_core.identity.components import AWSCredentialsIdentity +from smithy_core.client import Client +from smithy_http.interfaces import HTTPClient +from smithy_http.plugins import user_agent_plugin + +from querycompatible_awsjson10_client import models +from querycompatible_awsjson10_client.config import ( + Plugin, + QueryCompatibleJSONRPC10Config, +) +from querycompatible_awsjson10_client.user_agent import aws_user_agent_plugin + + +class QueryCompatibleJSONRPC10Client(Client[QueryCompatibleJSONRPC10Config]): + "Client for QueryCompatibleJsonRpc10." + + _client_plugins = (aws_user_agent_plugin, user_agent_plugin) + + @overload + def query_compatible_operation( + self, + request: models.QueryCompatibleOperationInput + | models.QueryCompatibleOperationInputDict, + /, + *, + plugins: list[Plugin] | None = None, + ) -> models.QueryCompatibleOperationOutput: ... + + @overload + def query_compatible_operation( + self, + /, + *, + plugins: list[Plugin] | None = None, + **kwargs: Unpack[models.QueryCompatibleOperationInputDict], + ) -> models.QueryCompatibleOperationOutput: + """ + Invokes the QueryCompatibleOperation operation. + + :param plugins: Callables that change the configuration for this call + only. + """ + + def query_compatible_operation( + self, /, *args: object, plugins: list[Plugin] | None = None, **kwargs: object + ) -> models.QueryCompatibleOperationOutput: + return self._invoke( + self._select_input(models.QUERY_COMPATIBLE_OPERATION, args, kwargs), + models.QUERY_COMPATIBLE_OPERATION, + [], + plugins, + ) + + def _new_config(self) -> QueryCompatibleJSONRPC10Config: + return QueryCompatibleJSONRPC10Config.resolve() + + def _post_setup(self, config: QueryCompatibleJSONRPC10Config) -> None: + if config.aws_credentials_identity_resolver is None: + config_context = config.resolution_context() + config_file = None + profile_name = None + if config_context is not None: + config_file = config_context.parsed_profiles() + if config_context.profile_source is ConfigSource.OVERRIDE: + profile_name = config_context.profile_name + config.aws_credentials_identity_resolver = IdentityChain.create( + AWSCredentialsIdentity, + config_file=config_file, + profile_name=profile_name, + region_override=config.region, + http_client=cast(HTTPClient | None, config.transport), + ) diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/config.py b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/config.py new file mode 100644 index 000000000..2e02db498 --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/config.py @@ -0,0 +1,123 @@ +from collections.abc import Callable +from dataclasses import dataclass, field +from typing import Any, ClassVar, Self, Unpack + +from smithy_aws_core.auth.sigv4 import SigV4AuthScheme +from smithy_aws_core.config.aws_config import AwsConfig, AwsConfigOverrides +from smithy_aws_core.config.filesystem import FileSystem +from smithy_aws_core.config.resolvers import EndpointUriResolver +from smithy_aws_core.config.types import FieldSpec +from smithy_aws_core.endpoints import AWS_RULES_EXTENSION +from smithy_aws_core.protocols import AwsJson10ClientProtocol +from smithy_core.auth import DefaultAuthResolver +from smithy_core.endpoints import BddEndpointResolver +from smithy_core.interceptors import Interceptor +from smithy_core.interfaces import ( + ClientProtocol, + EndpointResolver, + ProtocolConstructor, + ProtocolSettings, +) +from smithy_core.interfaces.auth import AuthScheme, AuthSchemeResolver +from smithy_core.shapes import ShapeID +from smithy_http.urllib3 import Urllib3HTTPClient + +from querycompatible_awsjson10_client._private.endpoints import BDD +from querycompatible_awsjson10_client._private.schemas import ( + QUERY_COMPATIBLE_JSON_RPC10, +) + +_PROTOCOL_SETTINGS = ProtocolSettings( + namespace="aws.protocoltests.json10", + service_target="QueryCompatibleJsonRpc10", + version="2020-07-14", + service_schema=QUERY_COMPATIBLE_JSON_RPC10, +) + + +class _QueryCompatibleJSONRPC10ConfigOverrides(AwsConfigOverrides, total=False): + "Explicit field values QueryCompatibleJSONRPC10Config.resolve accepts." + + endpoint_resolver: EndpointResolver | None + protocol: ( + ClientProtocol[Any, Any] | ProtocolConstructor[ClientProtocol[Any, Any]] | None + ) + auth_schemes: dict[ShapeID, AuthScheme[Any, Any, Any, Any]] | None + auth_scheme_resolver: AuthSchemeResolver | None + + +@dataclass(kw_only=True, repr=False, init=False) +class QueryCompatibleJSONRPC10Config(AwsConfig): + "Configuration for QueryCompatibleJSONRPC10Client." + + interceptors: list[Interceptor[Any, Any, Any, Any]] = field( + default_factory=list[Interceptor[Any, Any, Any, Any]] + ) + "Hooks called during the execution of a request." + + endpoint_resolver: EndpointResolver | None = None + "Resolves the endpoint of each operation." + + protocol: ClientProtocol[Any, Any] | None = None + "Serializes requests and deserializes responses." + + auth_schemes: dict[ShapeID, AuthScheme[Any, Any, Any, Any]] | None = None + "Auth schemes by auth scheme ID." + + auth_scheme_resolver: AuthSchemeResolver | None = None + "Determines the auth scheme for each operation." + + _FIELDS: ClassVar[dict[str, FieldSpec]] = { + **AwsConfig._FIELDS, + "endpoint_uri": FieldSpec( + default=None, + resolver=EndpointUriResolver("query_compatible_json_rpc_10").program, + ), + "endpoint_resolver": FieldSpec( + default_factory=lambda: BddEndpointResolver( + BDD, extensions=[AWS_RULES_EXTENSION] + ) + ), + "protocol": FieldSpec( + default_factory=lambda: AwsJson10ClientProtocol(_PROTOCOL_SETTINGS), + converter=lambda p: p(_PROTOCOL_SETTINGS) if isinstance(p, type) else p, + ), + "auth_schemes": FieldSpec( + default_factory=lambda: { + ShapeID("aws.auth#sigv4"): SigV4AuthScheme( + service="querycompatiblejsonrpc10" + ) + } + ), + "auth_scheme_resolver": FieldSpec(default_factory=DefaultAuthResolver), + "transport": FieldSpec(default_factory=lambda: Urllib3HTTPClient()), + } + + def set_auth_scheme(self, scheme: AuthScheme[Any, Any, Any, Any]) -> None: + "Set an auth scheme under its scheme ID." + auth_schemes = dict(self.auth_schemes or {}) + auth_schemes[scheme.scheme_id] = scheme + self.auth_schemes = auth_schemes + + @classmethod + def resolve( # pyright: ignore[reportIncompatibleMethodOverride] + cls, + *, + profile: str | None = None, + fs: FileSystem | None = None, + config_file_path: str | None = None, + credentials_file_path: str | None = None, + **overrides: Unpack[_QueryCompatibleJSONRPC10ConfigOverrides], + ) -> Self: + "Resolve the config from overrides, the environment, and config files." + return cls._resolve( + profile=profile, + fs=fs, + config_file_path=config_file_path, + credentials_file_path=credentials_file_path, + overrides=overrides, + ) + + +type Plugin = Callable[[QueryCompatibleJSONRPC10Config], None] +"A callable that customizes the client configuration." diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/models.py b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/models.py new file mode 100644 index 000000000..168e3bf3e --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/models.py @@ -0,0 +1,68 @@ +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", + "QueryCompatibleOperationInput": "QUERY_COMPATIBLE_OPERATION_INPUT", + "QueryCompatibleOperationOutput": "QUERY_COMPATIBLE_OPERATION_OUTPUT", +} + +_RENAMES: dict[str, str] = {} + +_TARGET_NAMES: dict[str, str] = {} + +_OPERATIONS: dict[str, tuple[tuple[str, ...], tuple[str, ...]]] = { + "QUERY_COMPATIBLE_OPERATION": ( + ( + "aws.protocoltests.json10#CustomCodeError", + "aws.protocoltests.json10#NoCustomCodeError", + ), + ("aws.auth#sigv4",), + ), +} + +_MODEL_NAMES = tuple(_MODEL_INDEX) +__all__ = ("ServiceError", *_MODEL_NAMES, *_OPERATIONS) # pyright: ignore[reportUnsupportedDunderAll] + + +_registry = ModelRegistry( + schemas, + renames=_RENAMES, + index=_MODEL_INDEX, + target_names=_TARGET_NAMES, + shape_names=frozenset( + { + "CustomCodeError", + "NoCustomCodeError", + "QueryCompatibleOperationInput", + "QueryCompatibleOperationOutput", + } + ), + service_error="ServiceError", +) +del schemas, ModelRegistry, ModeledError + + +def __getattr__(name: str): + if (data := _OPERATIONS.get(name)) is not None: + return globals().setdefault(name, _registry.build_operation(name, *data)) + 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-client/src/querycompatible_awsjson10_client/models.pyi b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/models.pyi new file mode 100644 index 000000000..b33b44f1a --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/models.pyi @@ -0,0 +1,81 @@ +from dataclasses import dataclass +from typing import Self, TypedDict + +from smithy_core.deserializers import ShapeDeserializer +from smithy_core.exceptions import ModeledError +from smithy_core.response import ResponseMetadata +from smithy_core.schemas import APIOperation +from smithy_core.serializers import ShapeSerializer + +__all__ = [ + "QUERY_COMPATIBLE_OPERATION", + "CustomCodeError", + "NoCustomCodeError", + "QueryCompatibleOperationInput", + "QueryCompatibleOperationOutput", + "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. + """ + +@dataclass(kw_only=True) +class QueryCompatibleOperationInput(_SerdeShape): + "Dataclass for QueryCompatibleOperationInput structure." + +class QueryCompatibleOperationInputDict(TypedDict, total=False): + "Dictionary form of `QueryCompatibleOperationInput`." + +@dataclass(kw_only=True) +class QueryCompatibleOperationOutput(_SerdeShape): + "Dataclass for QueryCompatibleOperationOutput 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. + """ + +QUERY_COMPATIBLE_OPERATION: APIOperation[ + QueryCompatibleOperationInput, QueryCompatibleOperationOutput +] diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/py.typed b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/user_agent.py b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/user_agent.py new file mode 100644 index 000000000..b585ac734 --- /dev/null +++ b/codegen-output-py/query-compatible-aws-json-1-0-client/src/querycompatible_awsjson10_client/user_agent.py @@ -0,0 +1,16 @@ +from smithy_aws_core.interceptors.user_agent import UserAgentInterceptor + +from querycompatible_awsjson10_client import __version__ +from querycompatible_awsjson10_client.config import QueryCompatibleJSONRPC10Config + + +def aws_user_agent_plugin(config: QueryCompatibleJSONRPC10Config) -> None: + "Send the AWS user agent with every request." + config.interceptors.append( + UserAgentInterceptor( + ua_suffix=config.user_agent_extra, + ua_app_id=config.sdk_ua_app_id, + sdk_version=__version__, + service_id="Query_Compatible_JSON_RPC_10", + ) + ) 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 index 873ab26e1..871ee44f4 100644 --- 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 @@ -4,7 +4,7 @@ "pyproject.toml": "1e2b86bff158358e9ee032707c643205859bbbacf0eed1142b17f4579bc5df7e", "src/querycompatibleawsjson10/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", "src/querycompatibleawsjson10/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "src/querycompatibleawsjson10/_private/schemas.py": "2f50162ef491662b8ce67108211e9e4720c37ba997d4fcdf5c686c7439f1660a", + "src/querycompatibleawsjson10/_private/schemas.py": "013720635254c69d541da362611210ddcd9508a2b67a7cfcfc452c1461b0bd8b", "src/querycompatibleawsjson10/models.py": "d1e4cf7e66b6cc7211088bf97f26733ebe0e5ef9e3bb4a6e299147706fc25f57", "src/querycompatibleawsjson10/models.pyi": "1a81b46fde33b8cf3ea25608e2d26f8369a8338c8a668c2383866945176c61a9", "src/querycompatibleawsjson10/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" 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 index 240964a24..3cfba8309 100644 --- 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 @@ -1,26 +1,29 @@ +from types import MappingProxyType + from smithy_core._schema_compact import StaticSchema n0 = "aws.protocoltests.json10" _s0 = "CustomCodeError" -_s1 = "smithy.api#error" -_s2 = "client" -_s3 = "message" -_s4 = "NoCustomCodeError" +_s1 = "aws.protocols#awsQueryError" +_s2 = "smithy.api#error" +_s3 = "client" +_s4 = "message" +_s5 = "NoCustomCodeError" CUSTOM_CODE_ERROR: StaticSchema = ( 18, n0, _s0, - {_s1: _s2}, - (_s3,), + {_s1: MappingProxyType({"code": "Customized", "httpResponseCode": 402}), _s2: _s3}, + (_s4,), ((3, 0),), ) NO_CUSTOM_CODE_ERROR: StaticSchema = ( 18, n0, - _s4, - {_s1: _s2}, - (_s3,), + _s5, + {_s2: _s3}, + (_s4,), ((3, 0),), ) 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 index 1d7d53b17..8c9e6682d 100644 --- a/codegen-output-py/query-compatible-rpcv2-cbor/.smithy-python-manifest.json +++ b/codegen-output-py/query-compatible-rpcv2-cbor/.smithy-python-manifest.json @@ -4,7 +4,7 @@ "pyproject.toml": "906b14bcfbaa2a0df2c9703db740492f47092d9b6a3494d3fb8f576f2996b8c2", "src/querycompatiblerpcv2cbor/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd", "src/querycompatiblerpcv2cbor/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "src/querycompatiblerpcv2cbor/_private/schemas.py": "8bf49b97ee7af64900c0c5c2ebd4a41d740e2fa0a17c1be3f3d8f25a0d7d997c", + "src/querycompatiblerpcv2cbor/_private/schemas.py": "0e861502208c667082a4d65e87a97cae90bdb577c8ebeb065bb457e0c8824432", "src/querycompatiblerpcv2cbor/models.py": "d1e4cf7e66b6cc7211088bf97f26733ebe0e5ef9e3bb4a6e299147706fc25f57", "src/querycompatiblerpcv2cbor/models.pyi": "1a81b46fde33b8cf3ea25608e2d26f8369a8338c8a668c2383866945176c61a9", "src/querycompatiblerpcv2cbor/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" 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 index c6371058d..d247d8e25 100644 --- 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 @@ -1,26 +1,29 @@ +from types import MappingProxyType + from smithy_core._schema_compact import StaticSchema n0 = "aws.protocoltests.rpcv2cbor" _s0 = "CustomCodeError" -_s1 = "smithy.api#error" -_s2 = "client" -_s3 = "message" -_s4 = "NoCustomCodeError" +_s1 = "aws.protocols#awsQueryError" +_s2 = "smithy.api#error" +_s3 = "client" +_s4 = "message" +_s5 = "NoCustomCodeError" CUSTOM_CODE_ERROR: StaticSchema = ( 18, n0, _s0, - {_s1: _s2}, - (_s3,), + {_s1: MappingProxyType({"code": "Customized", "httpResponseCode": 402}), _s2: _s3}, + (_s4,), ((3, 0),), ) NO_CUSTOM_CODE_ERROR: StaticSchema = ( 18, n0, - _s4, - {_s1: _s2}, - (_s3,), + _s5, + {_s2: _s3}, + (_s4,), ((3, 0),), ) diff --git a/designs/codegen/client.md b/designs/codegen/client.md index 461f30436..7566e85c9 100644 --- a/designs/codegen/client.md +++ b/designs/codegen/client.md @@ -172,7 +172,8 @@ those definitions out. A protocol registry maps modeled protocol IDs to protocol contributions. A contribution provides sync/async protocol and transport references and their dependencies. RPCv2 CBOR and RPCv2 JSON are built in. The CLI uses -`smithy_python.aws.AWS_PROTOCOLS`, which adds AWS restJson1. Tests can inject a +`smithy_python.aws.AWS_PROTOCOLS`, which adds AWS restJson1, awsJson1_0 and +awsJson1_1. Tests can inject a registry. The plan keeps the registry's protocol traits in the service schema, even when the model omits their definitions. @@ -188,8 +189,12 @@ The contributions use these runtime protocols: | `smithy.protocols#rpcv2Cbor` | `RpcV2CborClientProtocol` | `AsyncRpcV2CborClientProtocol` | `smithy-http[cbor]` | | `smithy.protocols#rpcv2Json` | `RpcV2JsonClientProtocol` | `AsyncRpcV2JsonClientProtocol` | `smithy-http[json]` | | `aws.protocols#restJson1` | `RestJsonClientProtocol` | `AsyncRestJsonClientProtocol` | `smithy-aws-core[json]` | +| `aws.protocols#awsJson1_0` | `AwsJson10ClientProtocol` | `AsyncAwsJson10ClientProtocol` | `smithy-aws-core[json]` | +| `aws.protocols#awsJson1_1` | `AwsJson11ClientProtocol` | `AsyncAwsJson11ClientProtocol` | `smithy-aws-core[json]` | -The restJson1 protocols come from `smithy-aws-core`, as in the Java generator. +The AWS protocols come from `smithy-aws-core`, as in the Java generator. Schemas +keep `aws.protocols#awsQueryCompatible` and `awsQueryError`, which the runtime +reads for query compatibility. All also use: * `ProtocolSettings` with the service namespace, target, version, and schema. diff --git a/designs/codegen/snapshots.md b/designs/codegen/snapshots.md index 450d55a12..382aeaef4 100644 --- a/designs/codegen/snapshots.md +++ b/designs/codegen/snapshots.md @@ -62,6 +62,9 @@ projections, generated with the public `client` command. | Projection | Import package | Operations | Protocol vectors | | --- | --- | ---: | ---: | +| `aws-json-1-0-client` | `awsjson10_client` | 16 | 67 | +| `aws-json-1-1-client` | `awsjson11_client` | 18 | 118 | +| `query-compatible-aws-json-1-0-client` | `querycompatible_awsjson10_client` | 1 | 3 | | `rest-json-1-client` | `restjson_client` | 103 | 236 | | `rpcv2-cbor-client` | `rpcv2cbor_client` | 14 | 72 | | `rpcv2-json-client` | `rpcv2json_client` | 15 | 73 | diff --git a/packages/smithy-python/.changes/next-release/smithy-python-feature-2ed4eeb7d440401cb6cc04b30f1d0800.json b/packages/smithy-python/.changes/next-release/smithy-python-feature-2ed4eeb7d440401cb6cc04b30f1d0800.json new file mode 100644 index 000000000..cc6c56790 --- /dev/null +++ b/packages/smithy-python/.changes/next-release/smithy-python-feature-2ed4eeb7d440401cb6cc04b30f1d0800.json @@ -0,0 +1,4 @@ +{ + "type": "feature", + "description": "Added `aws.protocols#awsJson1_0` and `aws.protocols#awsJson1_1` support to generated clients, using the `smithy-aws-core` JSON RPC protocols." +} \ No newline at end of file diff --git a/packages/smithy-python/src/smithy_python/aws/__init__.py b/packages/smithy-python/src/smithy_python/aws/__init__.py index 0a7124e31..653f1a2f2 100644 --- a/packages/smithy-python/src/smithy_python/aws/__init__.py +++ b/packages/smithy-python/src/smithy_python/aws/__init__.py @@ -7,7 +7,8 @@ send the AWS user agent. A service with the ``aws.auth#sigv4`` trait also gets SigV4 auth and the default AWS credentials chain. AWS services, and services whose rules use AWS functions or built-ins, resolve endpoints with the AWS rules extension. -Clients may also use the AWS protocols, such as ``aws.protocols#restJson1``. +Clients may also use the AWS protocols ``aws.protocols#restJson1``, +``awsJson1_0`` and ``awsJson1_1``. """ from __future__ import annotations @@ -17,11 +18,13 @@ from ._config import AwsConfigIntegration from ._dependencies import SMITHY_AWS_CORE from ._endpoints import AwsEndpointsIntegration -from ._protocols import AWS_PROTOCOLS, REST_JSON +from ._protocols import AWS_JSON_10, AWS_JSON_11, AWS_PROTOCOLS, REST_JSON from ._sigv4 import AwsSigV4Integration __all__ = [ "AWS_INTEGRATIONS", + "AWS_JSON_10", + "AWS_JSON_11", "AWS_PROTOCOLS", "REST_JSON", "SMITHY_AWS_CORE", diff --git a/packages/smithy-python/src/smithy_python/aws/_protocols.py b/packages/smithy-python/src/smithy_python/aws/_protocols.py index 62f984bfe..81456b5ce 100644 --- a/packages/smithy-python/src/smithy_python/aws/_protocols.py +++ b/packages/smithy-python/src/smithy_python/aws/_protocols.py @@ -39,7 +39,31 @@ def _aws(name: str, module: str, extra: str) -> TypeReference: ) """The ``aws.protocols#restJson1`` contribution.""" +AWS_JSON_10: Final = ProtocolContribution( + protocol_id=_model.ShapeId("aws.protocols", "awsJson1_0"), + protocol=_aws("AwsJson10ClientProtocol", "protocols", "json"), + async_protocol=_aws("AsyncAwsJson10ClientProtocol", "aio.protocols", "json"), + transport=RPCV2_CBOR.transport, + async_transport=RPCV2_CBOR.async_transport, +) +"""The ``aws.protocols#awsJson1_0`` contribution.""" + +AWS_JSON_11: Final = ProtocolContribution( + protocol_id=_model.ShapeId("aws.protocols", "awsJson1_1"), + protocol=_aws("AwsJson11ClientProtocol", "protocols", "json"), + async_protocol=_aws("AsyncAwsJson11ClientProtocol", "aio.protocols", "json"), + transport=RPCV2_CBOR.transport, + async_transport=RPCV2_CBOR.async_transport, +) +"""The ``aws.protocols#awsJson1_1`` contribution.""" + AWS_PROTOCOLS: Final[Mapping[_model.ShapeId, ProtocolContribution]] = MappingProxyType( - {**DEFAULT_PROTOCOLS, REST_JSON.protocol_id: REST_JSON} + { + **DEFAULT_PROTOCOLS, + **{ + contribution.protocol_id: contribution + for contribution in (REST_JSON, AWS_JSON_10, AWS_JSON_11) + }, + } ) """The core protocols and the AWS protocols.""" diff --git a/packages/smithy-python/src/smithy_python/schemas.py b/packages/smithy-python/src/smithy_python/schemas.py index fb97fc516..456f8695e 100644 --- a/packages/smithy-python/src/smithy_python/schemas.py +++ b/packages/smithy-python/src/smithy_python/schemas.py @@ -348,6 +348,9 @@ def _shape_id(value: str) -> _model.ShapeId: "smithy.api#httpQueryParams", "smithy.api#httpResponseCode", "smithy.api#hostLabel", + # awsJson1_0 and rpcv2 read these at runtime for query compatibility. + "aws.protocols#awsQueryCompatible", + "aws.protocols#awsQueryError", ), ) ) diff --git a/packages/smithy-python/tests/unit/test_client_generation.py b/packages/smithy-python/tests/unit/test_client_generation.py index 999c621e8..1277e177d 100644 --- a/packages/smithy-python/tests/unit/test_client_generation.py +++ b/packages/smithy-python/tests/unit/test_client_generation.py @@ -706,6 +706,44 @@ def test_rest_json_services_use_the_aws_core_protocol(tmp_path: Path) -> None: ) +@pytest.mark.parametrize( + ("trait", "protocol"), + [ + ("awsJson1_0", "AwsJson10ClientProtocol"), + ("awsJson1_1", "AwsJson11ClientProtocol"), + ], +) +def test_aws_json_services_use_the_aws_core_protocol( + tmp_path: Path, trait: str, protocol: str +) -> None: + shapes = _shapes() + shapes["example#Greeter"]["traits"] = { + f"aws.protocols#{trait}": {}, + "aws.protocols#awsQueryCompatible": {}, + } + model = load_model({"smithy": "2.0", "shapes": shapes}) + settings = ClientSettings("greeter_aws_json", "1.0.0", None) + generator = ClientGenerator( + ClientPlan.from_model(model, settings, protocols=_aws.AWS_PROTOCOLS), + protocols=_aws.AWS_PROTOCOLS, + ) + context = generator.context() + generator.generate(context) + context.files.commit(tmp_path) + source = tmp_path / "src/greeter_aws_json" + assert f"{protocol}(_PROTOCOL_SETTINGS)" in (source / "config.py").read_text() + assert ( + f"Async{protocol}(_PROTOCOL_SETTINGS)" in (source / "aio/config.py").read_text() + ) + assert ( + '"smithy-aws-core[json]~=0.16.0",' in (tmp_path / "pyproject.toml").read_text() + ) + # The runtime reads query compatibility from the service schema. + assert "aws.protocols#awsQueryCompatible" in "".join( + path.read_text() for path in (source / "_private").glob("schemas*.py") + ) + + def test_integrations_apply_only_to_services_they_match(tmp_path: Path) -> None: _aws_generate(tmp_path, "greeter_plain", _shapes()) assert "class Config:" in (tmp_path / "src/greeter_plain/config.py").read_text() diff --git a/scripts/api-snapshot/api-rex.json b/scripts/api-snapshot/api-rex.json index a52249f03..d5ee405dd 100644 --- a/scripts/api-snapshot/api-rex.json +++ b/scripts/api-snapshot/api-rex.json @@ -1329,6 +1329,8 @@ "TimestampFormat": "rex-class" }, "smithy_python.aws": { + "AWS_JSON_10": "rex-ProtocolContribution", + "AWS_JSON_11": "rex-ProtocolContribution", "AwsConfigIntegration": "rex-class", "AwsEndpointsIntegration": "rex-class", "AwsSigV4Integration": "rex-class", diff --git a/scripts/codegen-output-py/client-projections.json b/scripts/codegen-output-py/client-projections.json index 273b3f680..eccaf4d06 100644 --- a/scripts/codegen-output-py/client-projections.json +++ b/scripts/codegen-output-py/client-projections.json @@ -1,4 +1,18 @@ { + "aws-json-1-0-client": { + "description": "Python client for the aws-json-1-0 projection", + "model": "models/aws-json-1-0.json", + "package": "awsjson10_client", + "service": "aws.protocoltests.json10#JsonRpc10", + "version": "0.0.1" + }, + "aws-json-1-1-client": { + "description": "Python client for the aws-json-1-1 projection", + "model": "models/aws-json-1-1.json", + "package": "awsjson11_client", + "service": "aws.protocoltests.json#JsonProtocol", + "version": "0.0.1" + }, "features-client": { "description": "Python client for the client features fixture", "model": "models/features.json", @@ -6,6 +20,13 @@ "service": "example.features#FieldNotes", "version": "0.0.1" }, + "query-compatible-aws-json-1-0-client": { + "description": "Python client for the query-compatible-aws-json-1-0 projection", + "model": "models/query-compatible-aws-json-1-0.json", + "package": "querycompatible_awsjson10_client", + "service": "aws.protocoltests.json10#QueryCompatibleJsonRpc10", + "version": "0.0.1" + }, "rest-json-1-client": { "description": "Python client for the rest-json-1 projection", "model": "models/rest-json-1.json", diff --git a/scripts/codegen-output-py/models/provenance.json b/scripts/codegen-output-py/models/provenance.json index 0f122a0ae..66e5eed68 100644 --- a/scripts/codegen-output-py/models/provenance.json +++ b/scripts/codegen-output-py/models/provenance.json @@ -1,11 +1,13 @@ { "aws-json-1-0": { "assembled_sha256": "0e6eeb8c431cbf5c988d3daba1983bdc8f9c074657bc9a66915218047bf901f7", - "fixture_sha256": "ebfcbdfd4aedefd26bd01e3df4dd0ecca8a7b1e3e768ac7c6a27e9f125250b23" + "fixture_sha256": "ebfcbdfd4aedefd26bd01e3df4dd0ecca8a7b1e3e768ac7c6a27e9f125250b23", + "vectors_sha256": "54696ab8632106cae2abfee333866a87c089a191b2f50c27beeec97a03caf32d" }, "aws-json-1-1": { "assembled_sha256": "a783216226370423619536be3211571a74f24a6d4f15107d364a728ee7fec192", - "fixture_sha256": "580fc43337bf9cc6c68452d63454906590588e3de438cb5ad1f3690b147dc5d3" + "fixture_sha256": "580fc43337bf9cc6c68452d63454906590588e3de438cb5ad1f3690b147dc5d3", + "vectors_sha256": "37eb26b0b80c064414199ceb4d40909e5bd9fe071bade291b44d765a2e057ec2" }, "aws-query": { "assembled_sha256": "62332fc9f42c8d044f0dd59376ed922236b8ac19a6ac1b5c8d08a3856208a726", @@ -29,7 +31,8 @@ }, "query-compatible-aws-json-1-0": { "assembled_sha256": "c7039ea5f648534741a3cbf4bc5b8bb0f2fac94d7c2ef3b287ad449ca11946e8", - "fixture_sha256": "924cb826da264978f570c819d5d2a0fd2571f974241cdb8f7ddb4efe289083cf" + "fixture_sha256": "924cb826da264978f570c819d5d2a0fd2571f974241cdb8f7ddb4efe289083cf", + "vectors_sha256": "88bdd4b600c6d0a4462b9bd95a159b8e6116f8d19627f9def2cddea4f6e493d3" }, "query-compatible-rpcv2-cbor": { "assembled_sha256": "ff18f8a7075b4421c44503ad912d4817022cbc1b0be31f3c6abab86d534fd4fd", diff --git a/scripts/codegen-output-py/models/vectors/aws-json-1-0.json b/scripts/codegen-output-py/models/vectors/aws-json-1-0.json new file mode 100644 index 000000000..415bdfe85 --- /dev/null +++ b/scripts/codegen-output-py/models/vectors/aws-json-1-0.json @@ -0,0 +1,1307 @@ +{ + "aws.protocoltests.json10#ComplexError": { + "responses": [ + { + "body": "{\n \"__type\": \"aws.protocoltests.json10#ComplexError\",\n \"TopLevel\": \"Top level\",\n \"Nested\": {\n \"Foo\": \"bar\"\n }\n}", + "bodyMediaType": "application/json", + "code": 400, + "documentation": "Parses a complex error with no message member", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10ComplexError", + "params": { + "Nested": { + "Foo": "bar" + }, + "TopLevel": "Top level" + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "body": "{\n \"__type\": \"aws.protocoltests.json10#ComplexError\"\n}", + "bodyMediaType": "application/json", + "code": 400, + "documentation": "Parses a complex error with an empty body", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10EmptyComplexError", + "protocol": "aws.protocols#awsJson1_0" + } + ] + }, + "aws.protocoltests.json10#EmptyInputAndEmptyOutput": { + "requests": [ + { + "body": "{}", + "bodyMediaType": "application/json", + "documentation": "Clients must always send an empty object if input is modeled.", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.EmptyInputAndEmptyOutput" + }, + "id": "AwsJson10EmptyInputAndEmptyOutput", + "method": "POST", + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + } + ], + "responses": [ + { + "body": "{}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "A service will always return a JSON object for operations with modeled output.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10EmptyInputAndEmptyOutputSendJsonObject", + "protocol": "aws.protocols#awsJson1_0" + } + ] + }, + "aws.protocoltests.json10#EndpointOperation": { + "requests": [ + { + "body": "{}", + "documentation": "Operations can prepend to the given host if they define the\nendpoint trait.", + "host": "example.com", + "id": "AwsJson10EndpointTrait", + "method": "POST", + "protocol": "aws.protocols#awsJson1_0", + "resolvedHost": "foo.example.com", + "uri": "/" + } + ] + }, + "aws.protocoltests.json10#EndpointWithHostLabelOperation": { + "requests": [ + { + "body": "{\"label\": \"bar\"}", + "bodyMediaType": "application/json", + "documentation": "Operations can prepend to the given host if they define the\nendpoint trait, and can use the host label trait to define\nfurther customization based on user input.", + "host": "example.com", + "id": "AwsJson10EndpointTraitWithHostLabel", + "method": "POST", + "params": { + "label": "bar" + }, + "protocol": "aws.protocols#awsJson1_0", + "resolvedHost": "foo.bar.example.com", + "uri": "/" + } + ] + }, + "aws.protocoltests.json10#FooError": { + "responses": [ + { + "appliesTo": "client", + "code": 500, + "documentation": "Serializes the X-Amzn-ErrorType header. For an example service, see Amazon EKS.", + "headers": { + "X-Amzn-Errortype": "FooError" + }, + "id": "AwsJson10FooErrorUsingXAmznErrorType", + "protocol": "aws.protocols#awsJson1_0" + }, + { + "appliesTo": "client", + "code": 500, + "documentation": "Some X-Amzn-Errortype headers contain URLs. Clients need to split the URL on ':' and take only the first half of the string. For example, 'ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/'\nis to be interpreted as 'ValidationException'.\n\nFor an example service see Amazon Polly.", + "headers": { + "X-Amzn-Errortype": "FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" + }, + "id": "AwsJson10FooErrorUsingXAmznErrorTypeWithUri", + "protocol": "aws.protocols#awsJson1_0" + }, + { + "appliesTo": "client", + "code": 500, + "documentation": "X-Amzn-Errortype might contain a URL and a namespace. Client should extract only the shape name. This is a pathalogical case that might not actually happen in any deployed AWS service.", + "headers": { + "X-Amzn-Errortype": "aws.protocoltests.json10#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" + }, + "id": "AwsJson10FooErrorUsingXAmznErrorTypeWithUriAndNamespace", + "protocol": "aws.protocols#awsJson1_0" + }, + { + "appliesTo": "client", + "body": "{\n \"code\": \"FooError\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "This example uses the 'code' property in the output rather than X-Amzn-Errortype. Some services do this though it's preferable to send the X-Amzn-Errortype. Client implementations must first check for the X-Amzn-Errortype and then check for a top-level 'code' property.\n\nFor example service see Amazon S3 Glacier.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10FooErrorUsingCode", + "protocol": "aws.protocols#awsJson1_0" + }, + { + "appliesTo": "client", + "body": "{\n \"code\": \"aws.protocoltests.json10#FooError\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Some services serialize errors using code, and it might contain a namespace. Clients should just take the last part of the string after '#'.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10FooErrorUsingCodeAndNamespace", + "protocol": "aws.protocols#awsJson1_0" + }, + { + "appliesTo": "client", + "body": "{\n \"code\": \"aws.protocoltests.json10#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Some services serialize errors using code, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before \":\". This is a pathalogical case that might not occur in any deployed AWS service.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10FooErrorUsingCodeUriAndNamespace", + "protocol": "aws.protocols#awsJson1_0" + }, + { + "appliesTo": "client", + "body": "{\n \"__type\": \"FooError\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Some services serialize errors using __type.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10FooErrorWithDunderType", + "protocol": "aws.protocols#awsJson1_0" + }, + { + "appliesTo": "client", + "body": "{\n \"__type\": \"aws.protocoltests.json10#FooError\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Some services serialize errors using __type, and it might contain a namespace. Clients should just take the last part of the string after '#'.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10FooErrorWithDunderTypeAndNamespace", + "protocol": "aws.protocols#awsJson1_0" + }, + { + "appliesTo": "client", + "body": "{\n \"__type\": \"aws.different.namespace#FooError\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Because only the part after '#' is considered, an unrecognized namespace should not make a difference.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10FooErrorWithDunderTypeAndDifferentNamespace", + "protocol": "aws.protocols#awsJson1_0" + }, + { + "appliesTo": "client", + "body": "{\n \"__type\": \"aws.protocoltests.json10#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Some services serialize errors using __type, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before \":\". This is a pathalogical case that might not occur in any deployed AWS service.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10FooErrorWithDunderTypeUriAndNamespace", + "protocol": "aws.protocols#awsJson1_0" + }, + { + "appliesTo": "client", + "body": "{\n \"__type\": \"aws.protocoltests.json10#FooError\",\n \"ErrorDetails\": [\n {\n \"__type\": \"com.amazon.internal#ErrorDetails\",\n \"reason\": \"Some reason\"\n }\n ]\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Some services serialize errors using __type, and if the response includes additional shapes that belong to a different namespace there'll be a nested __type property that must not be considered when determining which error to be surfaced.\n\nFor an example service see Amazon DynamoDB.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10FooErrorWithNestedTypeProperty", + "protocol": "aws.protocols#awsJson1_0" + } + ] + }, + "aws.protocoltests.json10#HostWithPathOperation": { + "requests": [ + { + "appliesTo": "client", + "body": "{}", + "documentation": "Custom endpoints supplied by users can have paths", + "host": "example.com/custom", + "id": "AwsJson10HostWithPath", + "method": "POST", + "protocol": "aws.protocols#awsJson1_0", + "uri": "/custom/" + } + ] + }, + "aws.protocoltests.json10#InvalidGreeting": { + "responses": [ + { + "body": "{\n \"__type\": \"aws.protocoltests.json10#InvalidGreeting\",\n \"Message\": \"Hi\"\n}", + "bodyMediaType": "application/json", + "code": 400, + "documentation": "Parses simple JSON errors", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10InvalidGreetingError", + "params": { + "Message": "Hi" + }, + "protocol": "aws.protocols#awsJson1_0" + } + ] + }, + "aws.protocoltests.json10#JsonUnions": { + "requests": [ + { + "body": "{\n \"contents\": {\n \"stringValue\": \"foo\"\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a string union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.JsonUnions" + }, + "id": "AwsJson10SerializeStringUnionValue", + "method": "POST", + "params": { + "contents": { + "stringValue": "foo" + } + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"booleanValue\": true\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a boolean union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.JsonUnions" + }, + "id": "AwsJson10SerializeBooleanUnionValue", + "method": "POST", + "params": { + "contents": { + "booleanValue": true + } + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"numberValue\": 1\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a number union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.JsonUnions" + }, + "id": "AwsJson10SerializeNumberUnionValue", + "method": "POST", + "params": { + "contents": { + "numberValue": 1 + } + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"blobValue\": \"Zm9v\"\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a blob union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.JsonUnions" + }, + "id": "AwsJson10SerializeBlobUnionValue", + "method": "POST", + "params": { + "contents": { + "blobValue": "foo" + } + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"timestampValue\": 1398796238\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a timestamp union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.JsonUnions" + }, + "id": "AwsJson10SerializeTimestampUnionValue", + "method": "POST", + "params": { + "contents": { + "timestampValue": 1398796238 + } + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"enumValue\": \"Foo\"\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes an enum union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.JsonUnions" + }, + "id": "AwsJson10SerializeEnumUnionValue", + "method": "POST", + "params": { + "contents": { + "enumValue": "Foo" + } + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"intEnumValue\": 1\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes an intEnum union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.JsonUnions" + }, + "id": "AwsJson10SerializeIntEnumUnionValue", + "method": "POST", + "params": { + "contents": { + "intEnumValue": 1 + } + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"listValue\": [\"foo\", \"bar\"]\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a list union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.JsonUnions" + }, + "id": "AwsJson10SerializeListUnionValue", + "method": "POST", + "params": { + "contents": { + "listValue": [ + "foo", + "bar" + ] + } + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"mapValue\": {\n \"foo\": \"bar\",\n \"spam\": \"eggs\"\n }\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a map union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.JsonUnions" + }, + "id": "AwsJson10SerializeMapUnionValue", + "method": "POST", + "params": { + "contents": { + "mapValue": { + "foo": "bar", + "spam": "eggs" + } + } + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"structureValue\": {\n \"hi\": \"hello\"\n }\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a structure union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.JsonUnions" + }, + "id": "AwsJson10SerializeStructureUnionValue", + "method": "POST", + "params": { + "contents": { + "structureValue": { + "hi": "hello" + } + } + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + } + ], + "responses": [ + { + "body": "{\n \"contents\": {\n \"stringValue\": \"foo\"\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a string union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10DeserializeStringUnionValue", + "params": { + "contents": { + "stringValue": "foo" + } + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "body": "{\n \"contents\": {\n \"booleanValue\": true\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a boolean union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10DeserializeBooleanUnionValue", + "params": { + "contents": { + "booleanValue": true + } + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "body": "{\n \"contents\": {\n \"numberValue\": 1\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a number union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10DeserializeNumberUnionValue", + "params": { + "contents": { + "numberValue": 1 + } + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "body": "{\n \"contents\": {\n \"blobValue\": \"Zm9v\"\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a blob union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10DeserializeBlobUnionValue", + "params": { + "contents": { + "blobValue": "foo" + } + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "body": "{\n \"contents\": {\n \"timestampValue\": 1398796238\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a timestamp union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10DeserializeTimestampUnionValue", + "params": { + "contents": { + "timestampValue": 1398796238 + } + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "body": "{\n \"contents\": {\n \"enumValue\": \"Foo\"\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes an enum union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10DeserializeEnumUnionValue", + "params": { + "contents": { + "enumValue": "Foo" + } + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "body": "{\n \"contents\": {\n \"intEnumValue\": 1\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes an intEnum union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10DeserializeIntEnumUnionValue", + "params": { + "contents": { + "intEnumValue": 1 + } + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "body": "{\n \"contents\": {\n \"listValue\": [\"foo\", \"bar\"]\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a list union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10DeserializeListUnionValue", + "params": { + "contents": { + "listValue": [ + "foo", + "bar" + ] + } + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "body": "{\n \"contents\": {\n \"mapValue\": {\n \"foo\": \"bar\",\n \"spam\": \"eggs\"\n }\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a map union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10DeserializeMapUnionValue", + "params": { + "contents": { + "mapValue": { + "foo": "bar", + "spam": "eggs" + } + } + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "body": "{\n \"contents\": {\n \"structureValue\": {\n \"hi\": \"hello\"\n }\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a structure union value", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10DeserializeStructureUnionValue", + "params": { + "contents": { + "structureValue": { + "hi": "hello" + } + } + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "appliesTo": "client", + "body": "{\n \"contents\": {\n \"__type\": \"aws.protocoltests.json10#MyUnion\",\n \"structureValue\": {\n \"hi\": \"hello\"\n }\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Ignores an unrecognized __type property", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10DeserializeIgnoreType", + "params": { + "contents": { + "structureValue": { + "hi": "hello" + } + } + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "appliesTo": "client", + "body": "{\n \"contents\": {\n \"stringValue\": null,\n \"booleanValue\": null,\n \"numberValue\": null,\n \"blobValue\": null,\n \"timestampValue\": null,\n \"enumValue\": null,\n \"intEnumValue\": null,\n \"listValue\": null,\n \"mapValue\": null,\n \"structureValue\": {\n \"hi\": \"hello\"\n }\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Allows for `: null` to be set for all unset fields", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10DeserializeAllowNulls", + "params": { + "contents": { + "structureValue": { + "hi": "hello" + } + } + }, + "protocol": "aws.protocols#awsJson1_0" + } + ] + }, + "aws.protocoltests.json10#NoInputAndNoOutput": { + "requests": [ + { + "body": "{}", + "bodyMediaType": "application/json", + "documentation": "Clients must always send an empty JSON object payload for\noperations with no input (that is, `{}`). While AWS service\nimplementations support requests with no payload or requests\nthat send `{}`, always sending `{}` from the client is\npreferred for forward compatibility in case input is ever\nadded to an operation.", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.NoInputAndNoOutput" + }, + "id": "AwsJson10MustAlwaysSendEmptyJsonPayload", + "method": "POST", + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + } + ], + "responses": [ + { + "appliesTo": "client", + "body": "{}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "When no output is defined, the service is expected to return\nan empty payload, however, client must ignore a JSON payload\nif one is returned. This ensures that if output is added later,\nthen it will not break the client.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10HandlesEmptyOutputShape", + "protocol": "aws.protocols#awsJson1_0" + }, + { + "appliesTo": "client", + "body": "{\n \"foo\": true\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "This client-only test builds on handles_empty_output_shape,\nby including unexpected fields in the JSON. A client\nneeds to ignore JSON output that is empty or that contains\nJSON object data.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10HandlesUnexpectedJsonOutput", + "protocol": "aws.protocols#awsJson1_0" + }, + { + "body": "", + "code": 200, + "documentation": "When no output is defined, the service is expected to return\nan empty payload. Despite the lack of a payload, the service\nis expected to always send a Content-Type header. Clients must\nhandle cases where a service returns a JSON object and where\na service returns no JSON at all.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10ServiceRespondsWithNoPayload", + "protocol": "aws.protocols#awsJson1_0" + } + ] + }, + "aws.protocoltests.json10#NoInputAndOutput": { + "requests": [ + { + "body": "{}", + "bodyMediaType": "application/json", + "documentation": "A client should always send and empty JSON object payload.", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.NoInputAndOutput" + }, + "id": "AwsJson10NoInputAndOutput", + "method": "POST", + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + } + ], + "responses": [ + { + "body": "{}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Empty output always serializes an empty object payload.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10NoInputAndOutput", + "protocol": "aws.protocols#awsJson1_0" + } + ] + }, + "aws.protocoltests.json10#OperationWithDefaults": { + "requests": [ + { + "appliesTo": "client", + "body": "{\n \"defaults\": {\n \"defaultString\": \"hi\",\n \"defaultBoolean\": true,\n \"defaultList\": [],\n \"defaultDocumentMap\": {},\n \"defaultDocumentString\": \"hi\",\n \"defaultDocumentBoolean\": true,\n \"defaultDocumentList\": [],\n \"defaultTimestamp\": 0,\n \"defaultBlob\": \"YWJj\",\n \"defaultByte\": 1,\n \"defaultShort\": 1,\n \"defaultInteger\": 10,\n \"defaultLong\": 100,\n \"defaultFloat\": 1.0,\n \"defaultDouble\": 1.0,\n \"defaultMap\": {},\n \"defaultEnum\": \"FOO\",\n \"defaultIntEnum\": 1,\n \"emptyString\": \"\",\n \"falseBoolean\": false,\n \"emptyBlob\": \"\",\n \"zeroByte\": 0,\n \"zeroShort\": 0,\n \"zeroInteger\": 0,\n \"zeroLong\": 0,\n \"zeroFloat\": 0.0,\n \"zeroDouble\": 0.0\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Client populates default values in input.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10ClientPopulatesDefaultValuesInInput", + "method": "POST", + "params": { + "defaults": {} + }, + "protocol": "aws.protocols#awsJson1_0", + "tags": [ + "defaults" + ], + "uri": "/" + }, + { + "appliesTo": "client", + "body": "{\n}", + "bodyMediaType": "application/json", + "documentation": "Client skips top level default values in input.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10ClientSkipsTopLevelDefaultValuesInInput", + "method": "POST", + "params": {}, + "protocol": "aws.protocols#awsJson1_0", + "tags": [ + "defaults" + ], + "uri": "/" + }, + { + "appliesTo": "client", + "body": "{\n \"defaults\": {\n \"defaultString\": \"bye\",\n \"defaultBoolean\": true,\n \"defaultList\": [\"a\"],\n \"defaultDocumentMap\": {\"name\": \"Jack\"},\n \"defaultDocumentString\": \"bye\",\n \"defaultDocumentBoolean\": true,\n \"defaultDocumentList\": [\"b\"],\n \"defaultNullDocument\": \"notNull\",\n \"defaultTimestamp\": 1,\n \"defaultBlob\": \"aGk=\",\n \"defaultByte\": 2,\n \"defaultShort\": 2,\n \"defaultInteger\": 20,\n \"defaultLong\": 200,\n \"defaultFloat\": 2.0,\n \"defaultDouble\": 2.0,\n \"defaultMap\": {\"name\": \"Jack\"},\n \"defaultEnum\": \"BAR\",\n \"defaultIntEnum\": 2,\n \"emptyString\": \"foo\",\n \"falseBoolean\": true,\n \"emptyBlob\": \"aGk=\",\n \"zeroByte\": 1,\n \"zeroShort\": 1,\n \"zeroInteger\": 1,\n \"zeroLong\": 1,\n \"zeroFloat\": 1.0,\n \"zeroDouble\": 1.0\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Client uses explicitly provided member values over defaults", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10ClientUsesExplicitlyProvidedMemberValuesOverDefaults", + "method": "POST", + "params": { + "defaults": { + "defaultBlob": "hi", + "defaultBoolean": true, + "defaultByte": 2, + "defaultDocumentBoolean": true, + "defaultDocumentList": [ + "b" + ], + "defaultDocumentMap": { + "name": "Jack" + }, + "defaultDocumentString": "bye", + "defaultDouble": 2.0, + "defaultEnum": "BAR", + "defaultFloat": 2.0, + "defaultIntEnum": 2, + "defaultInteger": 20, + "defaultList": [ + "a" + ], + "defaultLong": 200, + "defaultMap": { + "name": "Jack" + }, + "defaultNullDocument": "notNull", + "defaultShort": 2, + "defaultString": "bye", + "defaultTimestamp": 1, + "emptyBlob": "hi", + "emptyString": "foo", + "falseBoolean": true, + "zeroByte": 1, + "zeroDouble": 1.0, + "zeroFloat": 1.0, + "zeroInteger": 1, + "zeroLong": 1, + "zeroShort": 1 + } + }, + "protocol": "aws.protocols#awsJson1_0", + "tags": [ + "defaults" + ], + "uri": "/" + }, + { + "appliesTo": "client", + "body": "{\n \"topLevelDefault\": \"hi\",\n \"otherTopLevelDefault\": 0\n}", + "bodyMediaType": "application/json", + "documentation": "Any time a value is provided for a member in the top level of input, it is used, regardless of if its the default.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10ClientUsesExplicitlyProvidedValuesInTopLevel", + "method": "POST", + "params": { + "otherTopLevelDefault": 0, + "topLevelDefault": "hi" + }, + "protocol": "aws.protocols#awsJson1_0", + "tags": [ + "defaults" + ], + "uri": "/" + }, + { + "appliesTo": "client", + "body": "{\n \"clientOptionalDefaults\": {}\n}", + "bodyMediaType": "application/json", + "documentation": "Typically, non top-level members would have defaults filled in, but if they have the clientOptional trait, the defaults should be ignored.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10ClientIgnoresNonTopLevelDefaultsOnMembersWithClientOptional", + "method": "POST", + "params": { + "clientOptionalDefaults": {} + }, + "protocol": "aws.protocols#awsJson1_0", + "tags": [ + "defaults" + ], + "uri": "/" + } + ], + "responses": [ + { + "appliesTo": "client", + "body": "{}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Client populates default values when missing in response.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10ClientPopulatesDefaultsValuesWhenMissingInResponse", + "params": { + "defaultBlob": "abc", + "defaultBoolean": true, + "defaultByte": 1, + "defaultDocumentBoolean": true, + "defaultDocumentList": [], + "defaultDocumentMap": {}, + "defaultDocumentString": "hi", + "defaultDouble": 1.0, + "defaultEnum": "FOO", + "defaultFloat": 1.0, + "defaultIntEnum": 1, + "defaultInteger": 10, + "defaultList": [], + "defaultLong": 100, + "defaultMap": {}, + "defaultShort": 1, + "defaultString": "hi", + "defaultTimestamp": 0, + "emptyBlob": "", + "emptyString": "", + "falseBoolean": false, + "zeroByte": 0, + "zeroDouble": 0.0, + "zeroFloat": 0.0, + "zeroInteger": 0, + "zeroLong": 0, + "zeroShort": 0 + }, + "protocol": "aws.protocols#awsJson1_0", + "tags": [ + "defaults" + ] + }, + { + "appliesTo": "client", + "body": "{\n \"defaultString\": \"bye\",\n \"defaultBoolean\": false,\n \"defaultList\": [\"a\"],\n \"defaultDocumentMap\": {\"name\": \"Jack\"},\n \"defaultDocumentString\": \"bye\",\n \"defaultDocumentBoolean\": false,\n \"defaultDocumentList\": [\"b\"],\n \"defaultNullDocument\": \"notNull\",\n \"defaultTimestamp\": 2,\n \"defaultBlob\": \"aGk=\",\n \"defaultByte\": 2,\n \"defaultShort\": 2,\n \"defaultInteger\": 20,\n \"defaultLong\": 200,\n \"defaultFloat\": 2.0,\n \"defaultDouble\": 2.0,\n \"defaultMap\": {\"name\": \"Jack\"},\n \"defaultEnum\": \"BAR\",\n \"defaultIntEnum\": 2,\n \"emptyString\": \"foo\",\n \"falseBoolean\": true,\n \"emptyBlob\": \"aGk=\",\n \"zeroByte\": 1,\n \"zeroShort\": 1,\n \"zeroInteger\": 1,\n \"zeroLong\": 1,\n \"zeroFloat\": 1.0,\n \"zeroDouble\": 1.0\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Client ignores default values if member values are present in the response.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10ClientIgnoresDefaultValuesIfMemberValuesArePresentInResponse", + "params": { + "defaultBlob": "hi", + "defaultBoolean": false, + "defaultByte": 2, + "defaultDocumentBoolean": false, + "defaultDocumentList": [ + "b" + ], + "defaultDocumentMap": { + "name": "Jack" + }, + "defaultDocumentString": "bye", + "defaultDouble": 2.0, + "defaultEnum": "BAR", + "defaultFloat": 2.0, + "defaultIntEnum": 2, + "defaultInteger": 20, + "defaultList": [ + "a" + ], + "defaultLong": 200, + "defaultMap": { + "name": "Jack" + }, + "defaultNullDocument": "notNull", + "defaultShort": 2, + "defaultString": "bye", + "defaultTimestamp": 2, + "emptyBlob": "hi", + "emptyString": "foo", + "falseBoolean": true, + "zeroByte": 1, + "zeroDouble": 1.0, + "zeroFloat": 1.0, + "zeroInteger": 1, + "zeroLong": 1, + "zeroShort": 1 + }, + "protocol": "aws.protocols#awsJson1_0", + "tags": [ + "defaults" + ] + } + ] + }, + "aws.protocoltests.json10#OperationWithNestedStructure": { + "requests": [ + { + "appliesTo": "client", + "body": "{\n \"topLevel\": {\n \"dialog\": {\n \"language\": \"en\",\n \"greeting\": \"hi\"\n },\n \"dialogList\": [\n {\n \"greeting\": \"hi\"\n },\n {\n \"greeting\": \"hi\",\n \"farewell\": {\n \"phrase\": \"bye\"\n }\n },\n {\n \"language\": \"it\",\n \"greeting\": \"ciao\",\n \"farewell\": {\n \"phrase\": \"arrivederci\"\n }\n }\n ],\n \"dialogMap\": {\n \"emptyDialog\": {\n \"greeting\": \"hi\"\n },\n \"partialEmptyDialog\": {\n \"language\": \"en\",\n \"greeting\": \"hi\",\n \"farewell\": {\n \"phrase\": \"bye\"\n }\n },\n \"nonEmptyDialog\": {\n \"greeting\": \"konnichiwa\",\n \"farewell\": {\n \"phrase\": \"sayonara\"\n }\n }\n }\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Client populates nested default values when missing.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10ClientPopulatesNestedDefaultValuesWhenMissing", + "method": "POST", + "params": { + "topLevel": { + "dialog": { + "language": "en" + }, + "dialogList": [ + {}, + { + "farewell": {} + }, + { + "farewell": { + "phrase": "arrivederci" + }, + "greeting": "ciao", + "language": "it" + } + ], + "dialogMap": { + "emptyDialog": {}, + "nonEmptyDialog": { + "farewell": { + "phrase": "sayonara" + }, + "greeting": "konnichiwa" + }, + "partialEmptyDialog": { + "farewell": {}, + "language": "en" + } + } + } + }, + "protocol": "aws.protocols#awsJson1_0", + "tags": [ + "defaults" + ], + "uri": "/" + } + ], + "responses": [ + { + "appliesTo": "client", + "body": "{\n \"dialog\": {\n \"language\": \"en\"\n },\n \"dialogList\": [\n {\n },\n {\n \"farewell\": {}\n },\n {\n \"language\": \"it\",\n \"greeting\": \"ciao\",\n \"farewell\": {\n \"phrase\": \"arrivederci\"\n }\n }\n ],\n \"dialogMap\": {\n \"emptyDialog\": {\n },\n \"partialEmptyDialog\": {\n \"language\": \"en\",\n \"farewell\": {}\n },\n \"nonEmptyDialog\": {\n \"greeting\": \"konnichiwa\",\n \"farewell\": {\n \"phrase\": \"sayonara\"\n }\n }\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Client populates nested default values when missing in response body.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10ClientPopulatesNestedDefaultsWhenMissingInResponseBody", + "params": { + "dialog": { + "greeting": "hi", + "language": "en" + }, + "dialogList": [ + { + "greeting": "hi" + }, + { + "farewell": { + "phrase": "bye" + }, + "greeting": "hi" + }, + { + "farewell": { + "phrase": "arrivederci" + }, + "greeting": "ciao", + "language": "it" + } + ], + "dialogMap": { + "emptyDialog": { + "greeting": "hi" + }, + "nonEmptyDialog": { + "farewell": { + "phrase": "sayonara" + }, + "greeting": "konnichiwa" + }, + "partialEmptyDialog": { + "farewell": { + "phrase": "bye" + }, + "greeting": "hi", + "language": "en" + } + } + }, + "protocol": "aws.protocols#awsJson1_0", + "tags": [ + "defaults" + ] + } + ] + }, + "aws.protocoltests.json10#OperationWithRequiredMembers": { + "responses": [ + { + "appliesTo": "client", + "body": "{}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Client error corrects when server fails to serialize required values.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10ClientErrorCorrectsWhenServerFailsToSerializeRequiredValues", + "params": { + "requiredBlob": "", + "requiredBoolean": false, + "requiredByte": 0, + "requiredDouble": 0.0, + "requiredFloat": 0.0, + "requiredInteger": 0, + "requiredList": [], + "requiredLong": 0, + "requiredMap": {}, + "requiredShort": 0, + "requiredString": "", + "requiredTimestamp": 0 + }, + "protocol": "aws.protocols#awsJson1_0", + "tags": [ + "defaults", + "error-correction" + ] + } + ] + }, + "aws.protocoltests.json10#OperationWithRequiredMembersWithDefaults": { + "responses": [ + { + "appliesTo": "client", + "body": "{}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Client error corrects with default values when server fails to serialize required values.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10ClientErrorCorrectsWithDefaultValuesWhenServerFailsToSerializeRequiredValues", + "params": { + "requiredBlob": "blob", + "requiredBoolean": true, + "requiredByte": 1, + "requiredDouble": 1.0, + "requiredEnum": "FOO", + "requiredFloat": 1.0, + "requiredIntEnum": 1, + "requiredInteger": 10, + "requiredList": [], + "requiredLong": 100, + "requiredMap": {}, + "requiredShort": 1, + "requiredString": "hi", + "requiredTimestamp": 1 + }, + "protocol": "aws.protocols#awsJson1_0", + "tags": [ + "defaults", + "error-correction" + ] + } + ] + }, + "aws.protocoltests.json10#PutWithContentEncoding": { + "requests": [ + { + "documentation": "Compression algorithm encoding is appended to the Content-Encoding header.", + "headers": { + "Content-Encoding": "gzip" + }, + "id": "SDKAppliedContentEncoding_awsJson1_0", + "method": "POST", + "params": { + "data": "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\n0I3XcdB0WEj4x4xRztB9Cx2Mc4qFYQdzS9kOioAgNBti1rBySZ8lFZM2zqxvBsJTTJsmcKPr1crqiXjM\noVWdM4ObOO6QA7Pu4c1hT68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1ZogeZlc0pXuNE0tagvD57xwDRFkAuoQyMu\nYDdZasXrpSmEE5UjHVkyYsISn8QsfXurzDybX468aoRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n" + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + }, + { + "documentation": "Compression algorithm encoding is appended to the Content-Encoding header, and the\nuser-provided content-encoding is NOT in the Content-Encoding header since HTTP binding\ntraits are ignored in the awsJson1_0 protocol.\n", + "headers": { + "Content-Encoding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oRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n", + "encoding": "custom" + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + } + ] + }, + "aws.protocoltests.json10#QueryIncompatibleOperation": { + "requests": [ + { + "body": "{}", + "bodyMediaType": "application/json", + "documentation": "The query mode header MUST NOT be set on non-query-compatible services.", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.QueryIncompatibleOperation" + }, + "id": "NonQueryCompatibleAwsJson10ForbidsQueryModeHeader", + "method": "POST", + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + } + ] + }, + "aws.protocoltests.json10#SimpleScalarProperties": { + "requests": [ + { + "body": "{\n \"floatValue\": \"NaN\",\n \"doubleValue\": \"NaN\"\n}", + "bodyMediaType": "application/json", + "documentation": "Supports handling NaN float values.", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.SimpleScalarProperties" + }, + "id": "AwsJson10SupportsNaNFloatInputs", + "method": "POST", + "params": { + "doubleValue": "NaN", + "floatValue": "NaN" + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + }, + { + "body": "{\n \"floatValue\": \"Infinity\",\n \"doubleValue\": \"Infinity\"\n}", + "bodyMediaType": "application/json", + "documentation": "Supports handling Infinity float values.", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.SimpleScalarProperties" + }, + "id": "AwsJson10SupportsInfinityFloatInputs", + "method": "POST", + "params": { + "doubleValue": "Infinity", + "floatValue": "Infinity" + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + }, + { + "body": "{\n \"floatValue\": \"-Infinity\",\n \"doubleValue\": \"-Infinity\"\n}", + "bodyMediaType": "application/json", + "documentation": "Supports handling -Infinity float values.", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "JsonRpc10.SimpleScalarProperties" + }, + "id": "AwsJson10SupportsNegativeInfinityFloatInputs", + "method": "POST", + "params": { + "doubleValue": "-Infinity", + "floatValue": "-Infinity" + }, + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + } + ], + "responses": [ + { + "body": "{\n \"floatValue\": \"NaN\",\n \"doubleValue\": \"NaN\"\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Supports handling NaN float values.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10SupportsNaNFloatInputs", + "params": { + "doubleValue": "NaN", + "floatValue": "NaN" + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "body": "{\n \"floatValue\": \"Infinity\",\n \"doubleValue\": \"Infinity\"\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Supports handling Infinity float values.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10SupportsInfinityFloatInputs", + "params": { + "doubleValue": "Infinity", + "floatValue": "Infinity" + }, + "protocol": "aws.protocols#awsJson1_0" + }, + { + "body": "{\n \"floatValue\": \"-Infinity\",\n \"doubleValue\": \"-Infinity\"\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Supports handling -Infinity float values.", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "AwsJson10SupportsNegativeInfinityFloatInputs", + "params": { + "doubleValue": "-Infinity", + "floatValue": "-Infinity" + }, + "protocol": "aws.protocols#awsJson1_0" + } + ] + } +} diff --git a/scripts/codegen-output-py/models/vectors/aws-json-1-1.json b/scripts/codegen-output-py/models/vectors/aws-json-1-1.json new file mode 100644 index 000000000..e0558a570 --- /dev/null +++ b/scripts/codegen-output-py/models/vectors/aws-json-1-1.json @@ -0,0 +1,2187 @@ +{ + "aws.protocoltests.json#ComplexError": { + "responses": [ + { + "body": "{\n \"__type\": \"ComplexError\",\n \"TopLevel\": \"Top level\",\n \"Nested\": {\n \"Foo\": \"bar\"\n }\n}", + "bodyMediaType": "application/json", + "code": 400, + "documentation": "Parses a complex error with no message member", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11ComplexError", + "params": { + "Nested": { + "Foo": "bar" + }, + "TopLevel": "Top level" + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\n \"__type\": \"ComplexError\"\n}", + "bodyMediaType": "application/json", + "code": 400, + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11EmptyComplexError", + "protocol": "aws.protocols#awsJson1_1" + } + ] + }, + "aws.protocoltests.json#DatetimeOffsets": { + "responses": [ + { + "appliesTo": "client", + "body": " {\n \"datetime\": \"2019-12-16T22:48:18-01:00\"\n }\n", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Ensures that clients can correctly parse datetime (timestamps) with offsets", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11DateTimeWithNegativeOffset", + "params": { + "datetime": 1576540098 + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "appliesTo": "client", + "body": " {\n \"datetime\": \"2019-12-17T00:48:18+01:00\"\n }\n", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Ensures that clients can correctly parse datetime (timestamps) with offsets", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11DateTimeWithPositiveOffset", + "params": { + "datetime": 1576540098 + }, + "protocol": "aws.protocols#awsJson1_1" + } + ] + }, + "aws.protocoltests.json#EmptyOperation": { + "requests": [ + { + "documentation": "Sends requests to /", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.EmptyOperation" + }, + "id": "sends_requests_to_slash", + "method": "POST", + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "documentation": "Includes X-Amz-Target header and Content-Type", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.EmptyOperation" + }, + "id": "includes_x_amz_target_and_content_type", + "method": "POST", + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "body": "{}", + "bodyMediaType": "application/json", + "documentation": "Clients must always send an empty JSON object payload for\noperations with no input (that is, `{}`). While AWS service\nimplementations support requests with no payload or requests\nthat send `{}`, always sending `{}` from the client is\npreferred for forward compatibility in case input is ever\nadded to an operation.", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.EmptyOperation" + }, + "id": "json_1_1_client_sends_empty_payload_for_no_input_shape", + "method": "POST", + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + } + ], + "responses": [ + { + "appliesTo": "client", + "body": "{}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "When no output is defined, the service is expected to return\nan empty payload, however, client must ignore a JSON payload\nif one is returned. This ensures that if output is added later,\nthen it will not break the client.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "handles_empty_output_shape", + "protocol": "aws.protocols#awsJson1_1" + }, + { + "appliesTo": "client", + "body": "{\n \"foo\": true\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "This client-only test builds on handles_empty_output_shape,\nby including unexpected fields in the JSON. A client\nneeds to ignore JSON output that is empty or that contains\nJSON object data.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "handles_unexpected_json_output", + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "", + "code": 200, + "documentation": "When no output is defined, the service is expected to return\nan empty payload. Despite the lack of a payload, the service\nis expected to always send a Content-Type header. Clients must\nhandle cases where a service returns a JSON object and where\na service returns no JSON at all.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "json_1_1_service_responds_with_no_payload", + "protocol": "aws.protocols#awsJson1_1" + } + ] + }, + "aws.protocoltests.json#EndpointOperation": { + "requests": [ + { + "body": "{}", + "documentation": "Operations can prepend to the given host if they define the\nendpoint trait.", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.EndpointOperation" + }, + "host": "example.com", + "id": "AwsJson11EndpointTrait", + "method": "POST", + "protocol": "aws.protocols#awsJson1_1", + "resolvedHost": "foo.example.com", + "uri": "/" + } + ] + }, + "aws.protocoltests.json#EndpointWithHostLabelOperation": { + "requests": [ + { + "body": "{\"label\": \"bar\"}", + "bodyMediaType": "application/json", + "documentation": "Operations can prepend to the given host if they define the\nendpoint trait, and can use the host label trait to define\nfurther customization based on user input.", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.EndpointWithHostLabelOperation" + }, + "host": "example.com", + "id": "AwsJson11EndpointTraitWithHostLabel", + "method": "POST", + "params": { + "label": "bar" + }, + "protocol": "aws.protocols#awsJson1_1", + "resolvedHost": "foo.bar.example.com", + "uri": "/" + } + ] + }, + "aws.protocoltests.json#FooError": { + "responses": [ + { + "appliesTo": "client", + "code": 500, + "documentation": "Serializes the X-Amzn-ErrorType header. For an example service, see Amazon EKS.", + "headers": { + "X-Amzn-Errortype": "FooError" + }, + "id": "AwsJson11FooErrorUsingXAmznErrorType", + "protocol": "aws.protocols#awsJson1_1" + }, + { + "appliesTo": "client", + "code": 500, + "documentation": "Some X-Amzn-Errortype headers contain URLs. Clients need to split the URL on ':' and take only the first half of the string. For example, 'ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/'\nis to be interpreted as 'ValidationException'.\n\nFor an example service see Amazon Polly.", + "headers": { + "X-Amzn-Errortype": "FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" + }, + "id": "AwsJson11FooErrorUsingXAmznErrorTypeWithUri", + "protocol": "aws.protocols#awsJson1_1" + }, + { + "appliesTo": "client", + "code": 500, + "documentation": "X-Amzn-Errortype might contain a URL and a namespace. Client should extract only the shape name. This is a pathalogical case that might not actually happen in any deployed AWS service.", + "headers": { + "X-Amzn-Errortype": "aws.protocoltests.json#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" + }, + "id": "AwsJson11FooErrorUsingXAmznErrorTypeWithUriAndNamespace", + "protocol": "aws.protocols#awsJson1_1" + }, + { + "appliesTo": "client", + "body": "{\n \"code\": \"FooError\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "This example uses the 'code' property in the output rather than X-Amzn-Errortype. Some services do this though it's preferable to send the X-Amzn-Errortype. Client implementations must first check for the X-Amzn-Errortype and then check for a top-level 'code' property.\n\nFor example service see Amazon S3 Glacier.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11FooErrorUsingCode", + "protocol": "aws.protocols#awsJson1_1" + }, + { + "appliesTo": "client", + "body": "{\n \"code\": \"aws.protocoltests.json#FooError\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Some services serialize errors using code, and it might contain a namespace. Clients should just take the last part of the string after '#'.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11FooErrorUsingCodeAndNamespace", + "protocol": "aws.protocols#awsJson1_1" + }, + { + "appliesTo": "client", + "body": "{\n \"code\": \"aws.protocoltests.json#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Some services serialize errors using code, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before \":\". This is a pathalogical case that might not occur in any deployed AWS service.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11FooErrorUsingCodeUriAndNamespace", + "protocol": "aws.protocols#awsJson1_1" + }, + { + "appliesTo": "client", + "body": "{\n \"__type\": \"FooError\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Some services serialize errors using __type.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11FooErrorWithDunderType", + "protocol": "aws.protocols#awsJson1_1" + }, + { + "appliesTo": "client", + "body": "{\n \"__type\": \"aws.protocoltests.json#FooError\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Some services serialize errors using __type, and it might contain a namespace. Clients should just take the last part of the string after '#'.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11FooErrorWithDunderTypeAndNamespace", + "protocol": "aws.protocols#awsJson1_1" + }, + { + "appliesTo": "client", + "body": "{\n \"__type\": \"aws.different.namespace#FooError\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Because only the part after '#' is considered, an unrecognized namespace should not make a difference.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11FooErrorWithDunderTypeAndDifferentNamespace", + "protocol": "aws.protocols#awsJson1_1" + }, + { + "appliesTo": "client", + "body": "{\n \"__type\": \"aws.protocoltests.json#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/\"\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Some services serialize errors using __type, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before \":\". This is a pathalogical case that might not occur in any deployed AWS service.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11FooErrorWithDunderTypeUriAndNamespace", + "protocol": "aws.protocols#awsJson1_1" + }, + { + "appliesTo": "client", + "body": "{\n \"__type\": \"aws.protocoltests.json#FooError\",\n \"ErrorDetails\": [\n {\n \"__type\": \"com.amazon.internal#ErrorDetails\",\n \"reason\": \"Some reason\"\n }\n ]\n}", + "bodyMediaType": "application/json", + "code": 500, + "documentation": "Some services serialize errors using __type, and if the response includes additional shapes that belong to a different namespace there'll be a nested __type property that must not be considered when determining which error to be surfaced.\n\nFor an example service see Amazon DynamoDB.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11FooErrorWithNestedTypeProperty", + "protocol": "aws.protocols#awsJson1_1" + } + ] + }, + "aws.protocoltests.json#FractionalSeconds": { + "responses": [ + { + "appliesTo": "client", + "body": " {\n \"datetime\": \"2000-01-02T20:34:56.123Z\"\n }\n", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Ensures that clients can correctly parse datetime timestamps with fractional seconds", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11DateTimeWithFractionalSeconds", + "params": { + "datetime": 946845296.123 + }, + "protocol": "aws.protocols#awsJson1_1" + } + ] + }, + "aws.protocoltests.json#HostWithPathOperation": { + "requests": [ + { + "appliesTo": "client", + "body": "{}", + "documentation": "Custom endpoints supplied by users can have paths", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.HostWithPathOperation" + }, + "host": "example.com/custom", + "id": "AwsJson11HostWithPath", + "method": "POST", + "protocol": "aws.protocols#awsJson1_1", + "uri": "/custom/" + } + ] + }, + "aws.protocoltests.json#InvalidGreeting": { + "responses": [ + { + "body": "{\n \"__type\": \"InvalidGreeting\",\n \"Message\": \"Hi\"\n}", + "bodyMediaType": "application/json", + "code": 400, + "documentation": "Parses simple JSON errors", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11InvalidGreetingError", + "params": { + "Message": "Hi" + }, + "protocol": "aws.protocols#awsJson1_1" + } + ] + }, + "aws.protocoltests.json#JsonEnums": { + "requests": [ + { + "body": "{\n \"fooEnum1\": \"Foo\",\n \"fooEnum2\": \"0\",\n \"fooEnum3\": \"1\",\n \"fooEnumList\": [\n \"Foo\",\n \"0\"\n ],\n \"fooEnumSet\": [\n \"Foo\",\n \"0\"\n ],\n \"fooEnumMap\": {\n \"hi\": \"Foo\",\n \"zero\": \"0\"\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes simple scalar properties", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.JsonEnums" + }, + "id": "AwsJson11Enums", + "method": "POST", + "params": { + "fooEnum1": "Foo", + "fooEnum2": "0", + "fooEnum3": "1", + "fooEnumList": [ + "Foo", + "0" + ], + "fooEnumMap": { + "hi": "Foo", + "zero": "0" + }, + "fooEnumSet": [ + "Foo", + "0" + ] + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + } + ], + "responses": [ + { + "body": "{\n \"fooEnum1\": \"Foo\",\n \"fooEnum2\": \"0\",\n \"fooEnum3\": \"1\",\n \"fooEnumList\": [\n \"Foo\",\n \"0\"\n ],\n \"fooEnumSet\": [\n \"Foo\",\n \"0\"\n ],\n \"fooEnumMap\": {\n \"hi\": \"Foo\",\n \"zero\": \"0\"\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Serializes simple scalar properties", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11Enums", + "params": { + "fooEnum1": "Foo", + "fooEnum2": "0", + "fooEnum3": "1", + "fooEnumList": [ + "Foo", + "0" + ], + "fooEnumMap": { + "hi": "Foo", + "zero": "0" + }, + "fooEnumSet": [ + "Foo", + "0" + ] + }, + "protocol": "aws.protocols#awsJson1_1" + } + ] + }, + "aws.protocoltests.json#JsonIntEnums": { + "requests": [ + { + "body": "{\n \"intEnum1\": 1,\n \"intEnum2\": 2,\n \"intEnum3\": 3,\n \"intEnumList\": [\n 1,\n 2\n ],\n \"intEnumSet\": [\n 1,\n 2\n ],\n \"intEnumMap\": {\n \"a\": 1,\n \"b\": 2\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes simple scalar properties", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.JsonIntEnums" + }, + "id": "AwsJson11IntEnums", + "method": "POST", + "params": { + "intEnum1": 1, + "intEnum2": 2, + "intEnum3": 3, + "intEnumList": [ + 1, + 2 + ], + "intEnumMap": { + "a": 1, + "b": 2 + }, + "intEnumSet": [ + 1, + 2 + ] + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + } + ], + "responses": [ + { + "body": "{\n \"intEnum1\": 1,\n \"intEnum2\": 2,\n \"intEnum3\": 3,\n \"intEnumList\": [\n 1,\n 2\n ],\n \"intEnumSet\": [\n 1,\n 2\n ],\n \"intEnumMap\": {\n \"a\": 1,\n \"b\": 2\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Serializes simple scalar properties", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.JsonIntEnums" + }, + "id": "AwsJson11IntEnums", + "params": { + "intEnum1": 1, + "intEnum2": 2, + "intEnum3": 3, + "intEnumList": [ + 1, + 2 + ], + "intEnumMap": { + "a": 1, + "b": 2 + }, + "intEnumSet": [ + 1, + 2 + ] + }, + "protocol": "aws.protocols#awsJson1_1" + } + ] + }, + "aws.protocoltests.json#JsonUnions": { + "requests": [ + { + "body": "{\n \"contents\": {\n \"stringValue\": \"foo\"\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a string union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.JsonUnions" + }, + "id": "AwsJson11SerializeStringUnionValue", + "method": "POST", + "params": { + "contents": { + "stringValue": "foo" + } + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"booleanValue\": true\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a boolean union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.JsonUnions" + }, + "id": "AwsJson11SerializeBooleanUnionValue", + "method": "POST", + "params": { + "contents": { + "booleanValue": true + } + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"numberValue\": 1\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a number union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.JsonUnions" + }, + "id": "AwsJson11SerializeNumberUnionValue", + "method": "POST", + "params": { + "contents": { + "numberValue": 1 + } + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"blobValue\": \"Zm9v\"\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a blob union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.JsonUnions" + }, + "id": "AwsJson11SerializeBlobUnionValue", + "method": "POST", + "params": { + "contents": { + "blobValue": "foo" + } + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"timestampValue\": 1398796238\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a timestamp union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.JsonUnions" + }, + "id": "AwsJson11SerializeTimestampUnionValue", + "method": "POST", + "params": { + "contents": { + "timestampValue": 1398796238 + } + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"enumValue\": \"Foo\"\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes an enum union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.JsonUnions" + }, + "id": "AwsJson11SerializeEnumUnionValue", + "method": "POST", + "params": { + "contents": { + "enumValue": "Foo" + } + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"listValue\": [\"foo\", \"bar\"]\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a list union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.JsonUnions" + }, + "id": "AwsJson11SerializeListUnionValue", + "method": "POST", + "params": { + "contents": { + "listValue": [ + "foo", + "bar" + ] + } + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"mapValue\": {\n \"foo\": \"bar\",\n \"spam\": \"eggs\"\n }\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a map union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.JsonUnions" + }, + "id": "AwsJson11SerializeMapUnionValue", + "method": "POST", + "params": { + "contents": { + "mapValue": { + "foo": "bar", + "spam": "eggs" + } + } + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "body": "{\n \"contents\": {\n \"structureValue\": {\n \"hi\": \"hello\"\n }\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes a structure union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.JsonUnions" + }, + "id": "AwsJson11SerializeStructureUnionValue", + "method": "POST", + "params": { + "contents": { + "structureValue": { + "hi": "hello" + } + } + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + } + ], + "responses": [ + { + "body": "{\n \"contents\": {\n \"stringValue\": \"foo\"\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a string union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11DeserializeStringUnionValue", + "params": { + "contents": { + "stringValue": "foo" + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\n \"contents\": {\n \"booleanValue\": true\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a boolean union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11DeserializeBooleanUnionValue", + "params": { + "contents": { + "booleanValue": true + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\n \"contents\": {\n \"numberValue\": 1\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a number union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11DeserializeNumberUnionValue", + "params": { + "contents": { + "numberValue": 1 + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\n \"contents\": {\n \"blobValue\": \"Zm9v\"\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a blob union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11DeserializeBlobUnionValue", + "params": { + "contents": { + "blobValue": "foo" + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\n \"contents\": {\n \"timestampValue\": 1398796238\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a timestamp union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11DeserializeTimestampUnionValue", + "params": { + "contents": { + "timestampValue": 1398796238 + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\n \"contents\": {\n \"enumValue\": \"Foo\"\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes an enum union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11DeserializeEnumUnionValue", + "params": { + "contents": { + "enumValue": "Foo" + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\n \"contents\": {\n \"listValue\": [\"foo\", \"bar\"]\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a list union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11DeserializeListUnionValue", + "params": { + "contents": { + "listValue": [ + "foo", + "bar" + ] + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\n \"contents\": {\n \"mapValue\": {\n \"foo\": \"bar\",\n \"spam\": \"eggs\"\n }\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a map union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11DeserializeMapUnionValue", + "params": { + "contents": { + "mapValue": { + "foo": "bar", + "spam": "eggs" + } + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\n \"contents\": {\n \"structureValue\": {\n \"hi\": \"hello\"\n }\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes a structure union value", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11DeserializeStructureUnionValue", + "params": { + "contents": { + "structureValue": { + "hi": "hello" + } + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "appliesTo": "client", + "body": "{\n \"contents\": {\n \"__type\": \"aws.protocoltests.json10#MyUnion\",\n \"structureValue\": {\n \"hi\": \"hello\"\n }\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Ignores an unrecognized __type property", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11DeserializeIgnoreType", + "params": { + "contents": { + "structureValue": { + "hi": "hello" + } + } + }, + "protocol": "aws.protocols#awsJson1_1" + } + ] + }, + "aws.protocoltests.json#KitchenSinkOperation": { + "requests": [ + { + "body": "{\"String\":\"abc xyz\"}", + "bodyMediaType": "application/json", + "documentation": "Serializes string shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_string_shapes", + "method": "POST", + "params": { + "String": "abc xyz" + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"JsonValue\":\"{\\\"string\\\":\\\"value\\\",\\\"number\\\":1234.5,\\\"boolTrue\\\":true,\\\"boolFalse\\\":false,\\\"array\\\":[1,2,3,4],\\\"object\\\":{\\\"key\\\":\\\"value\\\"},\\\"null\\\":null}\"}", + "bodyMediaType": "application/json", + "documentation": "Serializes string shapes with jsonvalue trait", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_string_shapes_with_jsonvalue_trait", + "method": "POST", + "params": { + "JsonValue": "{\"string\":\"value\",\"number\":1234.5,\"boolTrue\":true,\"boolFalse\":false,\"array\":[1,2,3,4],\"object\":{\"key\":\"value\"},\"null\":null}" + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"Integer\":1234}", + "bodyMediaType": "application/json", + "documentation": "Serializes integer shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_integer_shapes", + "method": "POST", + "params": { + "Integer": 1234 + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"Long\":999999999999}", + "bodyMediaType": "application/json", + "documentation": "Serializes long shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_long_shapes", + "method": "POST", + "params": { + "Long": 999999999999 + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"Float\":1234.5}", + "bodyMediaType": "application/json", + "documentation": "Serializes float shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_float_shapes", + "method": "POST", + "params": { + "Float": 1234.5 + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"Double\":1234.5}", + "bodyMediaType": "application/json", + "documentation": "Serializes double shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_double_shapes", + "method": "POST", + "params": { + "Double": 1234.5 + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"Blob\":\"YmluYXJ5LXZhbHVl\"}", + "bodyMediaType": "application/json", + "documentation": "Serializes blob shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_blob_shapes", + "method": "POST", + "params": { + "Blob": "binary-value" + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"Boolean\":true}", + "bodyMediaType": "application/json", + "documentation": "Serializes boolean shapes (true)", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_boolean_shapes_true", + "method": "POST", + "params": { + "Boolean": true + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"Boolean\":false}", + "bodyMediaType": "application/json", + "documentation": "Serializes boolean shapes (false)", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_boolean_shapes_false", + "method": "POST", + "params": { + "Boolean": false + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"Timestamp\":946845296}", + "bodyMediaType": "application/json", + "documentation": "Serializes timestamp shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_timestamp_shapes", + "method": "POST", + "params": { + "Timestamp": 946845296 + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"Iso8601Timestamp\":\"2000-01-02T20:34:56Z\"}", + "bodyMediaType": "application/json", + "documentation": "Serializes timestamp shapes with iso8601 timestampFormat", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_timestamp_shapes_with_iso8601_timestampformat", + "method": "POST", + "params": { + "Iso8601Timestamp": 946845296 + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"HttpdateTimestamp\":\"Sun, 02 Jan 2000 20:34:56 GMT\"}", + "bodyMediaType": "application/json", + "documentation": "Serializes timestamp shapes with httpdate timestampFormat", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_timestamp_shapes_with_httpdate_timestampformat", + "method": "POST", + "params": { + "HttpdateTimestamp": 946845296 + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"UnixTimestamp\":946845296}", + "bodyMediaType": "application/json", + "documentation": "Serializes timestamp shapes with unixTimestamp timestampFormat", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_timestamp_shapes_with_unixtimestamp_timestampformat", + "method": "POST", + "params": { + "UnixTimestamp": 946845296 + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"ListOfStrings\":[\"abc\",\"mno\",\"xyz\"]}", + "bodyMediaType": "application/json", + "documentation": "Serializes list shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_list_shapes", + "method": "POST", + "params": { + "ListOfStrings": [ + "abc", + "mno", + "xyz" + ] + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"ListOfStrings\":[]}", + "bodyMediaType": "application/json", + "documentation": "Serializes empty list shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_empty_list_shapes", + "method": "POST", + "params": { + "ListOfStrings": [] + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"ListOfMapsOfStrings\":[{\"foo\":\"bar\"},{\"abc\":\"xyz\"},{\"red\":\"blue\"}]}", + "bodyMediaType": "application/json", + "documentation": "Serializes list of map shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_list_of_map_shapes", + "method": "POST", + "params": { + "ListOfMapsOfStrings": [ + { + "foo": "bar" + }, + { + "abc": "xyz" + }, + { + "red": "blue" + } + ] + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"ListOfStructs\":[{\"Value\":\"abc\"},{\"Value\":\"mno\"},{\"Value\":\"xyz\"}]}", + "bodyMediaType": "application/json", + "documentation": "Serializes list of structure shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_list_of_structure_shapes", + "method": "POST", + "params": { + "ListOfStructs": [ + { + "Value": "abc" + }, + { + "Value": "mno" + }, + { + "Value": "xyz" + } + ] + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"RecursiveList\":[{\"RecursiveList\":[{\"RecursiveList\":[{\"Integer\":123}]}]}]}", + "bodyMediaType": "application/json", + "documentation": "Serializes list of recursive structure shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_list_of_recursive_structure_shapes", + "method": "POST", + "params": { + "RecursiveList": [ + { + "RecursiveList": [ + { + "RecursiveList": [ + { + "Integer": 123 + } + ] + } + ] + } + ] + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"MapOfStrings\":{\"abc\":\"xyz\",\"mno\":\"hjk\"}}", + "bodyMediaType": "application/json", + "documentation": "Serializes map shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_map_shapes", + "method": "POST", + "params": { + "MapOfStrings": { + "abc": "xyz", + "mno": "hjk" + } + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"MapOfStrings\":{}}", + "bodyMediaType": "application/json", + "documentation": "Serializes empty map shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_empty_map_shapes", + "method": "POST", + "params": { + "MapOfStrings": {} + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"MapOfListsOfStrings\":{\"abc\":[\"abc\",\"xyz\"],\"mno\":[\"xyz\",\"abc\"]}}", + "bodyMediaType": "application/json", + "documentation": "Serializes map of list shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_map_of_list_shapes", + "method": "POST", + "params": { + "MapOfListsOfStrings": { + "abc": [ + "abc", + "xyz" + ], + "mno": [ + "xyz", + "abc" + ] + } + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"MapOfStructs\":{\"key1\":{\"Value\":\"value-1\"},\"key2\":{\"Value\":\"value-2\"}}}", + "bodyMediaType": "application/json", + "documentation": "Serializes map of structure shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_map_of_structure_shapes", + "method": "POST", + "params": { + "MapOfStructs": { + "key1": { + "Value": "value-1" + }, + "key2": { + "Value": "value-2" + } + } + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"RecursiveMap\":{\"key1\":{\"RecursiveMap\":{\"key2\":{\"RecursiveMap\":{\"key3\":{\"Boolean\":false}}}}}}}", + "bodyMediaType": "application/json", + "documentation": "Serializes map of recursive structure shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_map_of_recursive_structure_shapes", + "method": "POST", + "params": { + "RecursiveMap": { + "key1": { + "RecursiveMap": { + "key2": { + "RecursiveMap": { + "key3": { + "Boolean": false + } + } + } + } + } + } + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"SimpleStruct\":{\"Value\":\"abc\"}}", + "bodyMediaType": "application/json", + "documentation": "Serializes structure shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_structure_shapes", + "method": "POST", + "params": { + "SimpleStruct": { + "Value": "abc" + } + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"StructWithJsonName\":{\"Value\":\"some-value\"}}", + "bodyMediaType": "application/json", + "documentation": "Serializes structure members with locationName traits", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_structure_members_with_locationname_traits", + "method": "POST", + "params": { + "StructWithJsonName": { + "Value": "some-value" + } + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"SimpleStruct\":{}}", + "bodyMediaType": "application/json", + "documentation": "Serializes empty structure shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_empty_structure_shapes", + "method": "POST", + "params": { + "SimpleStruct": {} + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"EmptyStruct\":{}}", + "bodyMediaType": "application/json", + "documentation": "Serializes structure which have no members", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_structure_which_have_no_members", + "method": "POST", + "params": { + "EmptyStruct": {} + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + }, + { + "body": "{\"String\":\"top-value\",\"Boolean\":false,\"RecursiveStruct\":{\"String\":\"nested-value\",\"Boolean\":true,\"RecursiveList\":[{\"String\":\"string-only\"},{\"RecursiveStruct\":{\"MapOfStrings\":{\"color\":\"red\",\"size\":\"large\"}}}]}}", + "bodyMediaType": "application/json", + "documentation": "Serializes recursive structure shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + }, + "id": "serializes_recursive_structure_shapes", + "method": "POST", + "params": { + "Boolean": false, + "RecursiveStruct": { + "Boolean": true, + "RecursiveList": [ + { + "String": "string-only" + }, + { + "RecursiveStruct": { + "MapOfStrings": { + "color": "red", + "size": "large" + } + } + } + ], + "String": "nested-value" + }, + "String": "top-value" + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + } + ], + "responses": [ + { + "body": "{}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses operations with empty JSON bodies", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_operations_with_empty_json_bodies", + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"String\":\"string-value\"}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses string shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_string_shapes", + "params": { + "String": "string-value" + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"Integer\":1234}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses integer shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_integer_shapes", + "params": { + "Integer": 1234 + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"Long\":1234567890123456789}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses long shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_long_shapes", + "params": { + "Long": 1234567890123456789 + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"Float\":1234.5}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses float shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_float_shapes", + "params": { + "Float": 1234.5 + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"Double\":123456789.12345679}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses double shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_double_shapes", + "params": { + "Double": 123456789.12345679 + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"Boolean\":true}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses boolean shapes (true)", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_boolean_shapes_true", + "params": { + "Boolean": true + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"Boolean\":false}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses boolean (false)", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_boolean_false", + "params": { + "Boolean": false + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"Blob\":\"YmluYXJ5LXZhbHVl\"}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses blob shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_blob_shapes", + "params": { + "Blob": "binary-value" + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"Timestamp\":946845296}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses timestamp shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_timestamp_shapes", + "params": { + "Timestamp": 946845296 + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"Iso8601Timestamp\":\"2000-01-02T20:34:56Z\"}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses iso8601 timestamps", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_iso8601_timestamps", + "params": { + "Iso8601Timestamp": 946845296 + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"HttpdateTimestamp\":\"Sun, 02 Jan 2000 20:34:56 GMT\"}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses httpdate timestamps", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_httpdate_timestamps", + "params": { + "HttpdateTimestamp": 946845296 + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"ListOfStrings\":[\"abc\",\"mno\",\"xyz\"]}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses list shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_list_shapes", + "params": { + "ListOfStrings": [ + "abc", + "mno", + "xyz" + ] + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"ListOfMapsOfStrings\":[{\"size\":\"large\"},{\"color\":\"red\"}]}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses list of map shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_list_of_map_shapes", + "params": { + "ListOfMapsOfStrings": [ + { + "size": "large" + }, + { + "color": "red" + } + ] + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"ListOfLists\":[[\"abc\",\"mno\",\"xyz\"],[\"hjk\",\"qrs\",\"tuv\"]]}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses list of list shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_list_of_list_shapes", + "params": { + "ListOfLists": [ + [ + "abc", + "mno", + "xyz" + ], + [ + "hjk", + "qrs", + "tuv" + ] + ] + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"ListOfStructs\":[{\"Value\":\"value-1\"},{\"Value\":\"value-2\"}]}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses list of structure shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_list_of_structure_shapes", + "params": { + "ListOfStructs": [ + { + "Value": "value-1" + }, + { + "Value": "value-2" + } + ] + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"RecursiveList\":[{\"RecursiveList\":[{\"RecursiveList\":[{\"String\":\"value\"}]}]}]}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses list of recursive structure shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_list_of_recursive_structure_shapes", + "params": { + "RecursiveList": [ + { + "RecursiveList": [ + { + "RecursiveList": [ + { + "String": "value" + } + ] + } + ] + } + ] + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"MapOfStrings\":{\"size\":\"large\",\"color\":\"red\"}}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses map shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_map_shapes", + "params": { + "MapOfStrings": { + "color": "red", + "size": "large" + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"MapOfListsOfStrings\":{\"sizes\":[\"large\",\"small\"],\"colors\":[\"red\",\"green\"]}}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses map of list shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_map_of_list_shapes", + "params": { + "MapOfListsOfStrings": { + "colors": [ + "red", + "green" + ], + "sizes": [ + "large", + "small" + ] + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"MapOfMaps\":{\"sizes\":{\"large\":\"L\",\"medium\":\"M\"},\"colors\":{\"red\":\"R\",\"blue\":\"B\"}}}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses map of map shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_map_of_map_shapes", + "params": { + "MapOfMaps": { + "colors": { + "blue": "B", + "red": "R" + }, + "sizes": { + "large": "L", + "medium": "M" + } + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"MapOfStructs\":{\"size\":{\"Value\":\"small\"},\"color\":{\"Value\":\"red\"}}}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses map of structure shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_map_of_structure_shapes", + "params": { + "MapOfStructs": { + "color": { + "Value": "red" + }, + "size": { + "Value": "small" + } + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\"RecursiveMap\":{\"key-1\":{\"RecursiveMap\":{\"key-2\":{\"RecursiveMap\":{\"key-3\":{\"String\":\"value\"}}}}}}}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses map of recursive structure shapes", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "parses_map_of_recursive_structure_shapes", + "params": { + "RecursiveMap": { + "key-1": { + "RecursiveMap": { + "key-2": { + "RecursiveMap": { + "key-3": { + "String": "value" + } + } + } + } + } + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Parses the request id from the response", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amzn-Requestid": "amazon-uniq-request-id" + }, + "id": "parses_the_request_id_from_the_response", + "protocol": "aws.protocols#awsJson1_1" + } + ] + }, + "aws.protocoltests.json#NullOperation": { + "requests": [ + { + "appliesTo": "client", + "body": "{}", + "bodyMediaType": "application/json", + "documentation": "Null structure values are dropped", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.NullOperation" + }, + "id": "AwsJson11StructuresDontSerializeNullValues", + "method": "POST", + "params": { + "string": null + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + } + ], + "responses": [ + { + "appliesTo": "client", + "body": "{\n \"string\": null\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Null structure values are dropped", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11StructuresDontDeserializeNullValues", + "params": {}, + "protocol": "aws.protocols#awsJson1_1" + } + ] + }, + "aws.protocoltests.json#OperationWithOptionalInputOutput": { + "requests": [ + { + "body": "{}", + "bodyMediaType": "application/json", + "documentation": "Can call operations with no input or output", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.OperationWithOptionalInputOutput" + }, + "id": "can_call_operation_with_no_input_or_output", + "method": "POST", + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "body": "{\"Value\":\"Hi\"}", + "bodyMediaType": "application/json", + "documentation": "Can invoke operations with optional input", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.OperationWithOptionalInputOutput" + }, + "id": "can_call_operation_with_optional_input", + "method": "POST", + "params": { + "Value": "Hi" + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + } + ] + }, + "aws.protocoltests.json#PutAndGetInlineDocuments": { + "requests": [ + { + "body": "{\n \"inlineDocument\": {\"foo\": \"bar\"}\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes inline documents in a JSON request.", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.PutAndGetInlineDocuments" + }, + "id": "PutAndGetInlineDocumentsInput", + "method": "POST", + "params": { + "inlineDocument": { + "foo": "bar" + } + }, + "protocol": "aws.protocols#awsJson1_1", + "requireHeaders": [ + "Content-Length" + ], + "uri": "/" + } + ], + "responses": [ + { + "body": "{\n \"inlineDocument\": {\"foo\": \"bar\"}\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Serializes inline documents in a JSON response.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "PutAndGetInlineDocumentsInput", + "params": { + "inlineDocument": { + "foo": "bar" + } + }, + "protocol": "aws.protocols#awsJson1_1" + } + ] + }, + "aws.protocoltests.json#PutWithContentEncoding": { + "requests": [ + { + "documentation": "Compression algorithm encoding is appended to the Content-Encoding header.", + "headers": { + "Content-Encoding": "gzip" + }, + "id": "SDKAppliedContentEncoding_awsJson1_1", + "method": "POST", + "params": { + "data": "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0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2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n" + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "documentation": "Compression algorithm encoding is appended to the Content-Encoding header, and the\nuser-provided content-encoding is NOT in the Content-Encoding header since HTTP binding\ntraits are ignored in the awsJson1_1 protocol.\n", + "headers": { + "Content-Encoding": "gzip" + }, + "id": "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1", + "method": "POST", + "params": { + "data": "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473Q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aIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n", + "encoding": "custom" + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + } + ] + }, + "aws.protocoltests.json#SimpleScalarProperties": { + "requests": [ + { + "body": "{\n \"floatValue\": \"NaN\",\n \"doubleValue\": \"NaN\"\n}", + "bodyMediaType": "application/json", + "documentation": "Supports handling NaN float values.", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.SimpleScalarProperties" + }, + "id": "AwsJson11SupportsNaNFloatInputs", + "method": "POST", + "params": { + "doubleValue": "NaN", + "floatValue": "NaN" + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "body": "{\n \"floatValue\": \"Infinity\",\n \"doubleValue\": \"Infinity\"\n}", + "bodyMediaType": "application/json", + "documentation": "Supports handling Infinity float values.", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.SimpleScalarProperties" + }, + "id": "AwsJson11SupportsInfinityFloatInputs", + "method": "POST", + "params": { + "doubleValue": "Infinity", + "floatValue": "Infinity" + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "body": "{\n \"floatValue\": \"-Infinity\",\n \"doubleValue\": \"-Infinity\"\n}", + "bodyMediaType": "application/json", + "documentation": "Supports handling -Infinity float values.", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.SimpleScalarProperties" + }, + "id": "AwsJson11SupportsNegativeInfinityFloatInputs", + "method": "POST", + "params": { + "doubleValue": "-Infinity", + "floatValue": "-Infinity" + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + } + ], + "responses": [ + { + "body": "{\n \"floatValue\": \"NaN\",\n \"doubleValue\": \"NaN\"\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Supports handling NaN float values.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11SupportsNaNFloatInputs", + "params": { + "doubleValue": "NaN", + "floatValue": "NaN" + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\n \"floatValue\": \"Infinity\",\n \"doubleValue\": \"Infinity\"\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Supports handling Infinity float values.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11SupportsInfinityFloatInputs", + "params": { + "doubleValue": "Infinity", + "floatValue": "Infinity" + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\n \"floatValue\": \"-Infinity\",\n \"doubleValue\": \"-Infinity\"\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Supports handling -Infinity float values.", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11SupportsNegativeInfinityFloatInputs", + "params": { + "doubleValue": "-Infinity", + "floatValue": "-Infinity" + }, + "protocol": "aws.protocols#awsJson1_1" + } + ] + }, + "aws.protocoltests.json#SparseNullsOperation": { + "requests": [ + { + "body": "{\n \"sparseStringMap\": {\n \"foo\": null\n }\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes null values in maps", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.SparseNullsOperation" + }, + "id": "AwsJson11SparseMapsSerializeNullValues", + "method": "POST", + "params": { + "sparseStringMap": { + "foo": null + } + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + }, + { + "body": "{\n \"sparseStringList\": [\n null\n ]\n}", + "bodyMediaType": "application/json", + "documentation": "Serializes null values in lists", + "headers": { + "Content-Type": "application/x-amz-json-1.1", + "X-Amz-Target": "JsonProtocol.SparseNullsOperation" + }, + "id": "AwsJson11SparseListsSerializeNull", + "method": "POST", + "params": { + "sparseStringList": [ + null + ] + }, + "protocol": "aws.protocols#awsJson1_1", + "uri": "/" + } + ], + "responses": [ + { + "body": "{\n \"sparseStringMap\": {\n \"foo\": null\n }\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes null values in maps", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11SparseMapsDeserializeNullValues", + "params": { + "sparseStringMap": { + "foo": null + } + }, + "protocol": "aws.protocols#awsJson1_1" + }, + { + "body": "{\n \"sparseStringList\": [\n null\n ]\n}", + "bodyMediaType": "application/json", + "code": 200, + "documentation": "Deserializes null values in lists", + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "id": "AwsJson11SparseListsDeserializeNull", + "params": { + "sparseStringList": [ + null + ] + }, + "protocol": "aws.protocols#awsJson1_1" + } + ] + } +} diff --git a/scripts/codegen-output-py/models/vectors/query-compatible-aws-json-1-0.json b/scripts/codegen-output-py/models/vectors/query-compatible-aws-json-1-0.json new file mode 100644 index 000000000..734fd63f5 --- /dev/null +++ b/scripts/codegen-output-py/models/vectors/query-compatible-aws-json-1-0.json @@ -0,0 +1,66 @@ +{ + "aws.protocoltests.json10#CustomCodeError": { + "responses": [ + { + "body": "{\n \"__type\": \"aws.protocoltests.json10#CustomCodeError\",\n \"message\": \"Hi\"\n}", + "bodyMediaType": "application/json", + "code": 400, + "documentation": "Parses simple errors with query error code", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "x-amzn-query-error": "Customized;Sender" + }, + "id": "QueryCompatibleAwsJson10CustomCodeError", + "params": { + "message": "Hi" + }, + "protocol": "aws.protocols#awsJson1_0", + "vendorParams": { + "code": "Customized", + "type": "Sender" + }, + "vendorParamsShape": "aws.protocoltests.config#ErrorCodeParams" + } + ] + }, + "aws.protocoltests.json10#NoCustomCodeError": { + "responses": [ + { + "body": "{\n \"__type\": \"aws.protocoltests.json10#NoCustomCodeError\",\n \"message\": \"Hi\"\n}", + "bodyMediaType": "application/json", + "code": 400, + "documentation": "Parses simple errors with no query error code", + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "id": "QueryCompatibleAwsJson10NoCustomCodeError", + "params": { + "message": "Hi" + }, + "protocol": "aws.protocols#awsJson1_0", + "vendorParams": { + "code": "NoCustomCodeError" + }, + "vendorParamsShape": "aws.protocoltests.config#ErrorCodeParams" + } + ] + }, + "aws.protocoltests.json10#QueryCompatibleOperation": { + "requests": [ + { + "body": "{}", + "bodyMediaType": "application/json", + "documentation": "Clients for query-compatible services MUST send the x-amzn-query-mode header.", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "QueryCompatibleJsonRpc10.QueryCompatibleOperation", + "x-amzn-query-mode": "true" + }, + "id": "QueryCompatibleAwsJson10CborSendsQueryModeHeader", + "method": "POST", + "protocol": "aws.protocols#awsJson1_0", + "uri": "/" + } + ] + } +} diff --git a/scripts/codegen-output-py/pyrightconfig.json b/scripts/codegen-output-py/pyrightconfig.json index 1d6cc0c95..82a998db9 100644 --- a/scripts/codegen-output-py/pyrightconfig.json +++ b/scripts/codegen-output-py/pyrightconfig.json @@ -8,7 +8,9 @@ "tests/_typecheck.py" ], "extraPaths": [ + "../../codegen-output-py/aws-json-1-0-client/src", "../../codegen-output-py/aws-json-1-0/src", + "../../codegen-output-py/aws-json-1-1-client/src", "../../codegen-output-py/aws-json-1-1/src", "../../codegen-output-py/aws-query/src", "../../codegen-output-py/ec2-query/src", @@ -17,6 +19,7 @@ "../../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-client/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-client/src", diff --git a/scripts/codegen-output-py/tests/test_client_protocol_vectors.py b/scripts/codegen-output-py/tests/test_client_protocol_vectors.py index 451547e0c..ed6249742 100644 --- a/scripts/codegen-output-py/tests/test_client_protocol_vectors.py +++ b/scripts/codegen-output-py/tests/test_client_protocol_vectors.py @@ -59,6 +59,14 @@ # support the httpChecksumRequired or requestCompression traits yet. _EXPECTED_FAILURES = frozenset( { + "AwsJson10ClientPopulatesDefaultValuesInInput", + "AwsJson10ClientSkipsTopLevelDefaultValuesInInput", + "AwsJson10ClientUsesExplicitlyProvidedMemberValuesOverDefaults", + "AwsJson10ClientIgnoresNonTopLevelDefaultsOnMembersWithClientOptional", + "SDKAppliedContentEncoding_awsJson1_0", + "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_0", + "SDKAppliedContentEncoding_awsJson1_1", + "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1", "RestJsonClientPopulatesDefaultValuesInInput", "RestJsonClientSkipsTopLevelDefaultValuesInInput", "RestJsonClientUsesExplicitlyProvidedMemberValuesOverDefaults", @@ -563,5 +571,6 @@ def test_vectors_match_their_provenance() -> None: def test_every_client_vector_is_collected() -> None: # The Java clients run the same vectors: rpcv2Cbor has 29 request and 43 # response vectors, and rpcv2Json has 34 and 39. restJson1 has 244, less the 8 - # of the streaming operations the client omits. - assert len(list(_vectors())) == 72 + 73 + 236 + # of the streaming operations the client omits. awsJson1_0 has 67, awsJson1_1 + # has 118, and the query-compatible awsJson1_0 service has 3. + assert len(list(_vectors())) == 72 + 73 + 236 + 67 + 118 + 3