diff --git a/codegen-output/aws-json-1-0/src/awsjson10/models.py b/codegen-output/aws-json-1-0/src/awsjson10/models.py index 974578dec..7520b1878 100644 --- a/codegen-output/aws-json-1-0/src/awsjson10/models.py +++ b/codegen-output/aws-json-1-0/src/awsjson10/models.py @@ -1,5 +1,7 @@ # Code generated by smithy-python-codegen DO NOT EDIT. +from __future__ import annotations + from ._private import schemas as _schemas from smithy_core._dynamic_models import ModelRegistry from smithy_core.exceptions import ModeledError @@ -25,6 +27,44 @@ SIMPLE_SCALAR_PROPERTIES as _SCHEMA_SIMPLE_SCALAR_PROPERTIES, ) +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from .models import ( + ContentTypeParametersInput, + ContentTypeParametersOutput, + EmptyInputAndEmptyOutputInput, + EmptyInputAndEmptyOutputOutput, + EndpointOperationInput, + EndpointOperationOutput, + EndpointWithHostLabelOperationInput, + EndpointWithHostLabelOperationOutput, + GreetingWithErrorsInput, + GreetingWithErrorsOutput, + HostWithPathOperationInput, + HostWithPathOperationOutput, + JsonUnionsInput, + JsonUnionsOutput, + NoInputAndNoOutputInput, + NoInputAndNoOutputOutput, + NoInputAndOutputInput, + NoInputAndOutputOutput, + OperationWithDefaultsInput, + OperationWithDefaultsOutput, + OperationWithNestedStructureInput, + OperationWithNestedStructureOutput, + OperationWithRequiredMembersInput, + OperationWithRequiredMembersOutput, + OperationWithRequiredMembersWithDefaultsInput, + OperationWithRequiredMembersWithDefaultsOutput, + PutWithContentEncodingInput, + PutWithContentEncodingOutput, + QueryIncompatibleOperationInput, + QueryIncompatibleOperationOutput, + SimpleScalarPropertiesInput, + SimpleScalarPropertiesOutput, + ) + class ServiceError(ModeledError): """ @@ -161,35 +201,45 @@ def __getattr__(name: str): return _registry.build(name) -CONTENT_TYPE_PARAMETERS = APIOperation( +CONTENT_TYPE_PARAMETERS: APIOperation[ + ContentTypeParametersInput, ContentTypeParametersOutput +] = APIOperation( static_schema=_SCHEMA_CONTENT_TYPE_PARAMETERS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -EMPTY_INPUT_AND_EMPTY_OUTPUT = APIOperation( +EMPTY_INPUT_AND_EMPTY_OUTPUT: APIOperation[ + EmptyInputAndEmptyOutputInput, EmptyInputAndEmptyOutputOutput +] = APIOperation( static_schema=_SCHEMA_EMPTY_INPUT_AND_EMPTY_OUTPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -ENDPOINT_OPERATION = APIOperation( - static_schema=_SCHEMA_ENDPOINT_OPERATION, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +ENDPOINT_OPERATION: APIOperation[EndpointOperationInput, EndpointOperationOutput] = ( + APIOperation( + static_schema=_SCHEMA_ENDPOINT_OPERATION, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -ENDPOINT_WITH_HOST_LABEL_OPERATION = APIOperation( +ENDPOINT_WITH_HOST_LABEL_OPERATION: APIOperation[ + EndpointWithHostLabelOperationInput, EndpointWithHostLabelOperationOutput +] = APIOperation( static_schema=_SCHEMA_ENDPOINT_WITH_HOST_LABEL_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -GREETING_WITH_ERRORS = APIOperation( +GREETING_WITH_ERRORS: APIOperation[ + GreetingWithErrorsInput, GreetingWithErrorsOutput +] = APIOperation( static_schema=_SCHEMA_GREETING_WITH_ERRORS, model_registry=_registry, error_ids=[ @@ -200,77 +250,98 @@ def __getattr__(name: str): effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HOST_WITH_PATH_OPERATION = APIOperation( +HOST_WITH_PATH_OPERATION: APIOperation[ + HostWithPathOperationInput, HostWithPathOperationOutput +] = APIOperation( static_schema=_SCHEMA_HOST_WITH_PATH_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -JSON_UNIONS = APIOperation( +JSON_UNIONS: APIOperation[JsonUnionsInput, JsonUnionsOutput] = APIOperation( static_schema=_SCHEMA_JSON_UNIONS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NO_INPUT_AND_NO_OUTPUT = APIOperation( +NO_INPUT_AND_NO_OUTPUT: APIOperation[ + NoInputAndNoOutputInput, NoInputAndNoOutputOutput +] = APIOperation( static_schema=_SCHEMA_NO_INPUT_AND_NO_OUTPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NO_INPUT_AND_OUTPUT = APIOperation( - static_schema=_SCHEMA_NO_INPUT_AND_OUTPUT, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +NO_INPUT_AND_OUTPUT: APIOperation[NoInputAndOutputInput, NoInputAndOutputOutput] = ( + APIOperation( + static_schema=_SCHEMA_NO_INPUT_AND_OUTPUT, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -OPERATION_WITH_DEFAULTS = APIOperation( +OPERATION_WITH_DEFAULTS: APIOperation[ + OperationWithDefaultsInput, OperationWithDefaultsOutput +] = APIOperation( static_schema=_SCHEMA_OPERATION_WITH_DEFAULTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -OPERATION_WITH_NESTED_STRUCTURE = APIOperation( +OPERATION_WITH_NESTED_STRUCTURE: APIOperation[ + OperationWithNestedStructureInput, OperationWithNestedStructureOutput +] = APIOperation( static_schema=_SCHEMA_OPERATION_WITH_NESTED_STRUCTURE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -OPERATION_WITH_REQUIRED_MEMBERS = APIOperation( +OPERATION_WITH_REQUIRED_MEMBERS: APIOperation[ + OperationWithRequiredMembersInput, OperationWithRequiredMembersOutput +] = APIOperation( static_schema=_SCHEMA_OPERATION_WITH_REQUIRED_MEMBERS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS = APIOperation( +OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS: APIOperation[ + OperationWithRequiredMembersWithDefaultsInput, + OperationWithRequiredMembersWithDefaultsOutput, +] = APIOperation( static_schema=_SCHEMA_OPERATION_WITH_REQUIRED_MEMBERS_WITH_DEFAULTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -PUT_WITH_CONTENT_ENCODING = APIOperation( +PUT_WITH_CONTENT_ENCODING: APIOperation[ + PutWithContentEncodingInput, PutWithContentEncodingOutput +] = APIOperation( static_schema=_SCHEMA_PUT_WITH_CONTENT_ENCODING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_INCOMPATIBLE_OPERATION = APIOperation( +QUERY_INCOMPATIBLE_OPERATION: APIOperation[ + QueryIncompatibleOperationInput, QueryIncompatibleOperationOutput +] = APIOperation( static_schema=_SCHEMA_QUERY_INCOMPATIBLE_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -SIMPLE_SCALAR_PROPERTIES = APIOperation( +SIMPLE_SCALAR_PROPERTIES: APIOperation[ + SimpleScalarPropertiesInput, SimpleScalarPropertiesOutput +] = APIOperation( static_schema=_SCHEMA_SIMPLE_SCALAR_PROPERTIES, model_registry=_registry, error_ids=[], diff --git a/codegen-output/aws-json-1-0/src/awsjson10/models.pyi b/codegen-output/aws-json-1-0/src/awsjson10/models.pyi index df6fdbef1..f21cb800a 100644 --- a/codegen-output/aws-json-1-0/src/awsjson10/models.pyi +++ b/codegen-output/aws-json-1-0/src/awsjson10/models.pyi @@ -31,7 +31,7 @@ class ServiceError(ModeledError): class ClientOptionalDefaults(_SerdeShape): """Dataclass for ClientOptionalDefaults structure.""" - member: int | None = ... + member: int = ... @dataclass(kw_only=True) class ComplexError(ServiceError, _SerdeShape): @@ -75,41 +75,41 @@ class ContentTypeParametersOutput(_SerdeShape): 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 = ... + default_string: str = ... + default_boolean: bool = ... + default_list: list[str] = ... + default_document_map: Document = ... + default_document_string: Document = ... + default_document_boolean: Document = ... + default_document_list: Document = ... + default_null_document: Document = ... + default_timestamp: datetime = ... + default_blob: bytes = ... + default_byte: int = ... + default_short: int = ... + default_integer: int = ... + default_long: int = ... + default_float: float = ... + default_double: float = ... + default_map: dict[str, str] = ... + default_enum: str = ... + default_int_enum: int = ... + empty_string: str = ... + false_boolean: bool = ... + empty_blob: bytes = ... + zero_byte: int = ... + zero_short: int = ... + zero_integer: int = ... + zero_long: int = ... + zero_float: float = ... + zero_double: float = ... @dataclass(kw_only=True) class Dialog(_SerdeShape): """Dataclass for Dialog structure.""" language: str | None = ... - greeting: str | None = ... + greeting: str = ... farewell: Farewell | None = ... @dataclass(kw_only=True) @@ -166,7 +166,7 @@ class EndpointWithHostLabelOperationOutput(_SerdeShape): class Farewell(_SerdeShape): """Dataclass for Farewell structure.""" - phrase: str | None = ... + phrase: str = ... @dataclass(kw_only=True) class FooError(ServiceError, _SerdeShape): @@ -357,41 +357,41 @@ class OperationWithDefaultsInput(_SerdeShape): defaults: Defaults | None = ... client_optional_defaults: ClientOptionalDefaults | None = ... - top_level_default: str | None = ... - other_top_level_default: int | None = ... + top_level_default: str = ... + other_top_level_default: int = ... @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 = ... + default_string: str = ... + default_boolean: bool = ... + default_list: list[str] = ... + default_document_map: Document = ... + default_document_string: Document = ... + default_document_boolean: Document = ... + default_document_list: Document = ... + default_null_document: Document = ... + default_timestamp: datetime = ... + default_blob: bytes = ... + default_byte: int = ... + default_short: int = ... + default_integer: int = ... + default_long: int = ... + default_float: float = ... + default_double: float = ... + default_map: dict[str, str] = ... + default_enum: str = ... + default_int_enum: int = ... + empty_string: str = ... + false_boolean: bool = ... + empty_blob: bytes = ... + zero_byte: int = ... + zero_short: int = ... + zero_integer: int = ... + zero_long: int = ... + zero_float: float = ... + zero_double: float = ... response_metadata: ResponseMetadata = ... """ Metadata about the response that produced this output. Use this to @@ -411,8 +411,8 @@ class OperationWithNestedStructureOutput(_SerdeShape): """Dataclass for OperationWithNestedStructureOutput structure.""" dialog: Dialog - dialog_list: list[Dialog] | None = ... - dialog_map: dict[str, Dialog] | None = ... + dialog_list: list[Dialog] = ... + dialog_map: dict[str, Dialog] = ... response_metadata: ResponseMetadata = ... """ Metadata about the response that produced this output. Use this to @@ -457,20 +457,20 @@ class OperationWithRequiredMembersWithDefaultsInput(_SerdeShape): 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 = ... + 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] = ... + required_enum: str = ... + required_int_enum: int = ... response_metadata: ResponseMetadata = ... """ Metadata about the response that produced this output. Use this to @@ -558,8 +558,8 @@ class TopLevel(_SerdeShape): """Dataclass for TopLevel structure.""" dialog: Dialog - dialog_list: list[Dialog] | None = ... - dialog_map: dict[str, Dialog] | None = ... + dialog_list: list[Dialog] = ... + dialog_map: dict[str, Dialog] = ... class FooEnum(UnknownEnumMixin, StrEnum): FOO = "Foo" diff --git a/codegen-output/aws-json-1-1/src/awsjson11/models.py b/codegen-output/aws-json-1-1/src/awsjson11/models.py index 4e91aa536..f182552b6 100644 --- a/codegen-output/aws-json-1-1/src/awsjson11/models.py +++ b/codegen-output/aws-json-1-1/src/awsjson11/models.py @@ -1,5 +1,7 @@ # Code generated by smithy-python-codegen DO NOT EDIT. +from __future__ import annotations + from ._private import schemas as _schemas from smithy_core._dynamic_models import ModelRegistry from smithy_core.exceptions import ModeledError @@ -27,6 +29,48 @@ SPARSE_NULLS_OPERATION as _SCHEMA_SPARSE_NULLS_OPERATION, ) +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from .models import ( + ContentTypeParametersInput, + ContentTypeParametersOutput, + DatetimeOffsetsInput, + DatetimeOffsetsOutput, + EmptyOperationInput, + EmptyOperationOutput, + EndpointOperationInput, + EndpointOperationOutput, + EndpointWithHostLabelOperationInput, + EndpointWithHostLabelOperationOutput, + FractionalSecondsInput, + FractionalSecondsOutput, + GreetingWithErrorsInput, + GreetingWithErrorsOutput, + HostWithPathOperationInput, + HostWithPathOperationOutput, + JsonEnumsInput, + JsonEnumsOutput, + JsonIntEnumsInput, + JsonIntEnumsOutput, + JsonUnionsInput, + JsonUnionsOutput, + KitchenSinkOperationInput, + KitchenSinkOperationOutput, + NullOperationInput, + NullOperationOutput, + OperationWithOptionalInputOutputInput, + OperationWithOptionalInputOutputOutput, + PutAndGetInlineDocumentsInput, + PutAndGetInlineDocumentsOutput, + PutWithContentEncodingInput, + PutWithContentEncodingOutput, + SimpleScalarPropertiesInput, + SimpleScalarPropertiesOutput, + SparseNullsOperationInput, + SparseNullsOperationOutput, + ) + class ServiceError(ModeledError): """ @@ -164,49 +208,61 @@ def __getattr__(name: str): return _registry.build(name) -CONTENT_TYPE_PARAMETERS = APIOperation( +CONTENT_TYPE_PARAMETERS: APIOperation[ + ContentTypeParametersInput, ContentTypeParametersOutput +] = APIOperation( static_schema=_SCHEMA_CONTENT_TYPE_PARAMETERS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -DATETIME_OFFSETS = APIOperation( - static_schema=_SCHEMA_DATETIME_OFFSETS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +DATETIME_OFFSETS: APIOperation[DatetimeOffsetsInput, DatetimeOffsetsOutput] = ( + APIOperation( + static_schema=_SCHEMA_DATETIME_OFFSETS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -EMPTY_OPERATION = APIOperation( +EMPTY_OPERATION: APIOperation[EmptyOperationInput, EmptyOperationOutput] = APIOperation( static_schema=_SCHEMA_EMPTY_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -ENDPOINT_OPERATION = APIOperation( - static_schema=_SCHEMA_ENDPOINT_OPERATION, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +ENDPOINT_OPERATION: APIOperation[EndpointOperationInput, EndpointOperationOutput] = ( + APIOperation( + static_schema=_SCHEMA_ENDPOINT_OPERATION, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -ENDPOINT_WITH_HOST_LABEL_OPERATION = APIOperation( +ENDPOINT_WITH_HOST_LABEL_OPERATION: APIOperation[ + EndpointWithHostLabelOperationInput, EndpointWithHostLabelOperationOutput +] = APIOperation( static_schema=_SCHEMA_ENDPOINT_WITH_HOST_LABEL_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -FRACTIONAL_SECONDS = APIOperation( - static_schema=_SCHEMA_FRACTIONAL_SECONDS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +FRACTIONAL_SECONDS: APIOperation[FractionalSecondsInput, FractionalSecondsOutput] = ( + APIOperation( + static_schema=_SCHEMA_FRACTIONAL_SECONDS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -GREETING_WITH_ERRORS = APIOperation( +GREETING_WITH_ERRORS: APIOperation[ + GreetingWithErrorsInput, GreetingWithErrorsOutput +] = APIOperation( static_schema=_SCHEMA_GREETING_WITH_ERRORS, model_registry=_registry, error_ids=[ @@ -217,77 +273,91 @@ def __getattr__(name: str): effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HOST_WITH_PATH_OPERATION = APIOperation( +HOST_WITH_PATH_OPERATION: APIOperation[ + HostWithPathOperationInput, HostWithPathOperationOutput +] = APIOperation( static_schema=_SCHEMA_HOST_WITH_PATH_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -JSON_ENUMS = APIOperation( +JSON_ENUMS: APIOperation[JsonEnumsInput, JsonEnumsOutput] = APIOperation( static_schema=_SCHEMA_JSON_ENUMS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -JSON_INT_ENUMS = APIOperation( +JSON_INT_ENUMS: APIOperation[JsonIntEnumsInput, JsonIntEnumsOutput] = APIOperation( static_schema=_SCHEMA_JSON_INT_ENUMS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -JSON_UNIONS = APIOperation( +JSON_UNIONS: APIOperation[JsonUnionsInput, JsonUnionsOutput] = APIOperation( static_schema=_SCHEMA_JSON_UNIONS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NULL_OPERATION = APIOperation( +NULL_OPERATION: APIOperation[NullOperationInput, NullOperationOutput] = APIOperation( static_schema=_SCHEMA_NULL_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -OPERATION_WITH_OPTIONAL_INPUT_OUTPUT = APIOperation( +OPERATION_WITH_OPTIONAL_INPUT_OUTPUT: APIOperation[ + OperationWithOptionalInputOutputInput, OperationWithOptionalInputOutputOutput +] = APIOperation( static_schema=_SCHEMA_OPERATION_WITH_OPTIONAL_INPUT_OUTPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -PUT_AND_GET_INLINE_DOCUMENTS = APIOperation( +PUT_AND_GET_INLINE_DOCUMENTS: APIOperation[ + PutAndGetInlineDocumentsInput, PutAndGetInlineDocumentsOutput +] = APIOperation( static_schema=_SCHEMA_PUT_AND_GET_INLINE_DOCUMENTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -PUT_WITH_CONTENT_ENCODING = APIOperation( +PUT_WITH_CONTENT_ENCODING: APIOperation[ + PutWithContentEncodingInput, PutWithContentEncodingOutput +] = APIOperation( static_schema=_SCHEMA_PUT_WITH_CONTENT_ENCODING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -SIMPLE_SCALAR_PROPERTIES = APIOperation( +SIMPLE_SCALAR_PROPERTIES: APIOperation[ + SimpleScalarPropertiesInput, SimpleScalarPropertiesOutput +] = APIOperation( static_schema=_SCHEMA_SIMPLE_SCALAR_PROPERTIES, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -SPARSE_NULLS_OPERATION = APIOperation( +SPARSE_NULLS_OPERATION: APIOperation[ + SparseNullsOperationInput, SparseNullsOperationOutput +] = APIOperation( static_schema=_SCHEMA_SPARSE_NULLS_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -KITCHEN_SINK_OPERATION = APIOperation( +KITCHEN_SINK_OPERATION: APIOperation[ + KitchenSinkOperationInput, KitchenSinkOperationOutput +] = APIOperation( static_schema=_SCHEMA_KITCHEN_SINK_OPERATION, model_registry=_registry, error_ids=[ diff --git a/codegen-output/aws-query/src/awsquery/models.py b/codegen-output/aws-query/src/awsquery/models.py index e58c36158..6f14f99af 100644 --- a/codegen-output/aws-query/src/awsquery/models.py +++ b/codegen-output/aws-query/src/awsquery/models.py @@ -1,5 +1,7 @@ # Code generated by smithy-python-codegen DO NOT EDIT. +from __future__ import annotations + from ._private import schemas as _schemas from smithy_core._dynamic_models import ModelRegistry from smithy_core.exceptions import ModeledError @@ -42,6 +44,78 @@ XML_TIMESTAMPS as _SCHEMA_XML_TIMESTAMPS, ) +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from .models import ( + DatetimeOffsetsInput, + DatetimeOffsetsOutput, + EmptyInputAndEmptyOutputInput, + EmptyInputAndEmptyOutputOutput, + EndpointOperationInput, + EndpointOperationOutput, + EndpointWithHostLabelOperationInput, + EndpointWithHostLabelOperationOutput, + FlattenedXmlMapInput, + FlattenedXmlMapOutput, + FlattenedXmlMapWithXmlNameInput, + FlattenedXmlMapWithXmlNameOutput, + FlattenedXmlMapWithXmlNamespaceInput, + FlattenedXmlMapWithXmlNamespaceOutput, + FractionalSecondsInput, + FractionalSecondsOutput, + GreetingWithErrorsInput, + GreetingWithErrorsOutput, + HostWithPathOperationInput, + HostWithPathOperationOutput, + IgnoresWrappingXmlNameInput, + IgnoresWrappingXmlNameOutput, + NestedStructuresInput, + NestedStructuresOutput, + NoInputAndNoOutputInput, + NoInputAndNoOutputOutput, + NoInputAndOutputInput, + NoInputAndOutputOutput, + PutWithContentEncodingInput, + PutWithContentEncodingOutput, + QueryIdempotencyTokenAutoFillInput, + QueryIdempotencyTokenAutoFillOutput, + QueryListsInput, + QueryListsOutput, + QueryMapsInput, + QueryMapsOutput, + QueryTimestampsInput, + QueryTimestampsOutput, + RecursiveXmlShapesInput, + RecursiveXmlShapesOutput, + SimpleInputParamsInput, + SimpleInputParamsOutput, + SimpleScalarXmlPropertiesInput, + SimpleScalarXmlPropertiesOutput, + XmlBlobsInput, + XmlBlobsOperationOutput, + XmlEmptyBlobsInput, + XmlEmptyBlobsOutput, + XmlEmptyListsInput, + XmlEmptyListsOutput, + XmlEmptyMapsInput, + XmlEmptyMapsOutput, + XmlEnumsInput, + XmlEnumsOutput, + XmlIntEnumsInput, + XmlIntEnumsOutput, + XmlListsInput, + XmlListsOperationOutput, + XmlMapsInput, + XmlMapsOperationOutput, + XmlMapsXmlNameInput, + XmlMapsXmlNameOutput, + XmlNamespacesInput, + XmlNamespacesOutput, + XmlTimestampsInput, + XmlTimestampsOutput, + ) + class ServiceError(ModeledError): """ @@ -229,63 +303,81 @@ def __getattr__(name: str): return _registry.build(name) -DATETIME_OFFSETS = APIOperation( - static_schema=_SCHEMA_DATETIME_OFFSETS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +DATETIME_OFFSETS: APIOperation[DatetimeOffsetsInput, DatetimeOffsetsOutput] = ( + APIOperation( + static_schema=_SCHEMA_DATETIME_OFFSETS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -EMPTY_INPUT_AND_EMPTY_OUTPUT = APIOperation( +EMPTY_INPUT_AND_EMPTY_OUTPUT: APIOperation[ + EmptyInputAndEmptyOutputInput, EmptyInputAndEmptyOutputOutput +] = APIOperation( static_schema=_SCHEMA_EMPTY_INPUT_AND_EMPTY_OUTPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -ENDPOINT_OPERATION = APIOperation( - static_schema=_SCHEMA_ENDPOINT_OPERATION, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +ENDPOINT_OPERATION: APIOperation[EndpointOperationInput, EndpointOperationOutput] = ( + APIOperation( + static_schema=_SCHEMA_ENDPOINT_OPERATION, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -ENDPOINT_WITH_HOST_LABEL_OPERATION = APIOperation( +ENDPOINT_WITH_HOST_LABEL_OPERATION: APIOperation[ + EndpointWithHostLabelOperationInput, EndpointWithHostLabelOperationOutput +] = APIOperation( static_schema=_SCHEMA_ENDPOINT_WITH_HOST_LABEL_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -FLATTENED_XML_MAP = APIOperation( - static_schema=_SCHEMA_FLATTENED_XML_MAP, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +FLATTENED_XML_MAP: APIOperation[FlattenedXmlMapInput, FlattenedXmlMapOutput] = ( + APIOperation( + static_schema=_SCHEMA_FLATTENED_XML_MAP, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -FLATTENED_XML_MAP_WITH_XML_NAME = APIOperation( +FLATTENED_XML_MAP_WITH_XML_NAME: APIOperation[ + FlattenedXmlMapWithXmlNameInput, FlattenedXmlMapWithXmlNameOutput +] = APIOperation( static_schema=_SCHEMA_FLATTENED_XML_MAP_WITH_XML_NAME, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -FLATTENED_XML_MAP_WITH_XML_NAMESPACE = APIOperation( +FLATTENED_XML_MAP_WITH_XML_NAMESPACE: APIOperation[ + FlattenedXmlMapWithXmlNamespaceInput, FlattenedXmlMapWithXmlNamespaceOutput +] = APIOperation( static_schema=_SCHEMA_FLATTENED_XML_MAP_WITH_XML_NAMESPACE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -FRACTIONAL_SECONDS = APIOperation( - static_schema=_SCHEMA_FRACTIONAL_SECONDS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +FRACTIONAL_SECONDS: APIOperation[FractionalSecondsInput, FractionalSecondsOutput] = ( + APIOperation( + static_schema=_SCHEMA_FRACTIONAL_SECONDS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -GREETING_WITH_ERRORS = APIOperation( +GREETING_WITH_ERRORS: APIOperation[ + GreetingWithErrorsInput, GreetingWithErrorsOutput +] = APIOperation( static_schema=_SCHEMA_GREETING_WITH_ERRORS, model_registry=_registry, error_ids=[ @@ -296,168 +388,192 @@ def __getattr__(name: str): effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HOST_WITH_PATH_OPERATION = APIOperation( +HOST_WITH_PATH_OPERATION: APIOperation[ + HostWithPathOperationInput, HostWithPathOperationOutput +] = APIOperation( static_schema=_SCHEMA_HOST_WITH_PATH_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -IGNORES_WRAPPING_XML_NAME = APIOperation( +IGNORES_WRAPPING_XML_NAME: APIOperation[ + IgnoresWrappingXmlNameInput, IgnoresWrappingXmlNameOutput +] = APIOperation( static_schema=_SCHEMA_IGNORES_WRAPPING_XML_NAME, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NO_INPUT_AND_NO_OUTPUT = APIOperation( +NO_INPUT_AND_NO_OUTPUT: APIOperation[ + NoInputAndNoOutputInput, NoInputAndNoOutputOutput +] = APIOperation( static_schema=_SCHEMA_NO_INPUT_AND_NO_OUTPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NO_INPUT_AND_OUTPUT = APIOperation( - static_schema=_SCHEMA_NO_INPUT_AND_OUTPUT, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +NO_INPUT_AND_OUTPUT: APIOperation[NoInputAndOutputInput, NoInputAndOutputOutput] = ( + APIOperation( + static_schema=_SCHEMA_NO_INPUT_AND_OUTPUT, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -PUT_WITH_CONTENT_ENCODING = APIOperation( +PUT_WITH_CONTENT_ENCODING: APIOperation[ + PutWithContentEncodingInput, PutWithContentEncodingOutput +] = APIOperation( static_schema=_SCHEMA_PUT_WITH_CONTENT_ENCODING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL = APIOperation( +QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL: APIOperation[ + QueryIdempotencyTokenAutoFillInput, QueryIdempotencyTokenAutoFillOutput +] = APIOperation( static_schema=_SCHEMA_QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_LISTS = APIOperation( +QUERY_LISTS: APIOperation[QueryListsInput, QueryListsOutput] = APIOperation( static_schema=_SCHEMA_QUERY_LISTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_MAPS = APIOperation( +QUERY_MAPS: APIOperation[QueryMapsInput, QueryMapsOutput] = APIOperation( static_schema=_SCHEMA_QUERY_MAPS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_TIMESTAMPS = APIOperation( - static_schema=_SCHEMA_QUERY_TIMESTAMPS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +QUERY_TIMESTAMPS: APIOperation[QueryTimestampsInput, QueryTimestampsOutput] = ( + APIOperation( + static_schema=_SCHEMA_QUERY_TIMESTAMPS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -SIMPLE_INPUT_PARAMS = APIOperation( - static_schema=_SCHEMA_SIMPLE_INPUT_PARAMS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +SIMPLE_INPUT_PARAMS: APIOperation[SimpleInputParamsInput, SimpleInputParamsOutput] = ( + APIOperation( + static_schema=_SCHEMA_SIMPLE_INPUT_PARAMS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -SIMPLE_SCALAR_XML_PROPERTIES = APIOperation( +SIMPLE_SCALAR_XML_PROPERTIES: APIOperation[ + SimpleScalarXmlPropertiesInput, SimpleScalarXmlPropertiesOutput +] = APIOperation( static_schema=_SCHEMA_SIMPLE_SCALAR_XML_PROPERTIES, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_BLOBS = APIOperation( +XML_BLOBS: APIOperation[XmlBlobsInput, XmlBlobsOperationOutput] = APIOperation( static_schema=_SCHEMA_XML_BLOBS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_EMPTY_BLOBS = APIOperation( +XML_EMPTY_BLOBS: APIOperation[XmlEmptyBlobsInput, XmlEmptyBlobsOutput] = APIOperation( static_schema=_SCHEMA_XML_EMPTY_BLOBS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_EMPTY_LISTS = APIOperation( +XML_EMPTY_LISTS: APIOperation[XmlEmptyListsInput, XmlEmptyListsOutput] = APIOperation( static_schema=_SCHEMA_XML_EMPTY_LISTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_EMPTY_MAPS = APIOperation( +XML_EMPTY_MAPS: APIOperation[XmlEmptyMapsInput, XmlEmptyMapsOutput] = APIOperation( static_schema=_SCHEMA_XML_EMPTY_MAPS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_ENUMS = APIOperation( +XML_ENUMS: APIOperation[XmlEnumsInput, XmlEnumsOutput] = APIOperation( static_schema=_SCHEMA_XML_ENUMS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_INT_ENUMS = APIOperation( +XML_INT_ENUMS: APIOperation[XmlIntEnumsInput, XmlIntEnumsOutput] = APIOperation( static_schema=_SCHEMA_XML_INT_ENUMS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_LISTS = APIOperation( +XML_LISTS: APIOperation[XmlListsInput, XmlListsOperationOutput] = APIOperation( static_schema=_SCHEMA_XML_LISTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_MAPS = APIOperation( +XML_MAPS: APIOperation[XmlMapsInput, XmlMapsOperationOutput] = APIOperation( static_schema=_SCHEMA_XML_MAPS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_MAPS_XML_NAME = APIOperation( - static_schema=_SCHEMA_XML_MAPS_XML_NAME, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +XML_MAPS_XML_NAME: APIOperation[XmlMapsXmlNameInput, XmlMapsXmlNameOutput] = ( + APIOperation( + static_schema=_SCHEMA_XML_MAPS_XML_NAME, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -XML_NAMESPACES = APIOperation( +XML_NAMESPACES: APIOperation[XmlNamespacesInput, XmlNamespacesOutput] = APIOperation( static_schema=_SCHEMA_XML_NAMESPACES, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_TIMESTAMPS = APIOperation( +XML_TIMESTAMPS: APIOperation[XmlTimestampsInput, XmlTimestampsOutput] = APIOperation( static_schema=_SCHEMA_XML_TIMESTAMPS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NESTED_STRUCTURES = APIOperation( - static_schema=_SCHEMA_NESTED_STRUCTURES, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +NESTED_STRUCTURES: APIOperation[NestedStructuresInput, NestedStructuresOutput] = ( + APIOperation( + static_schema=_SCHEMA_NESTED_STRUCTURES, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -RECURSIVE_XML_SHAPES = APIOperation( +RECURSIVE_XML_SHAPES: APIOperation[ + RecursiveXmlShapesInput, RecursiveXmlShapesOutput +] = APIOperation( static_schema=_SCHEMA_RECURSIVE_XML_SHAPES, model_registry=_registry, error_ids=[], diff --git a/codegen-output/ec2-query/src/ec2query/models.py b/codegen-output/ec2-query/src/ec2query/models.py index 6a3ee98ca..549a2fc65 100644 --- a/codegen-output/ec2-query/src/ec2query/models.py +++ b/codegen-output/ec2-query/src/ec2query/models.py @@ -1,5 +1,7 @@ # Code generated by smithy-python-codegen DO NOT EDIT. +from __future__ import annotations + from ._private import schemas as _schemas from smithy_core._dynamic_models import ModelRegistry from smithy_core.exceptions import ModeledError @@ -34,6 +36,62 @@ XML_TIMESTAMPS as _SCHEMA_XML_TIMESTAMPS, ) +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from .models import ( + DatetimeOffsetsInput, + DatetimeOffsetsOutput, + EmptyInputAndEmptyOutputInput, + EmptyInputAndEmptyOutputOutput, + EndpointOperationInput, + EndpointOperationOutput, + EndpointWithHostLabelOperationInput, + EndpointWithHostLabelOperationOutput, + FractionalSecondsInput, + FractionalSecondsOutput, + GreetingWithErrorsInput, + GreetingWithErrorsOutput, + HostWithPathOperationInput, + HostWithPathOperationOutput, + IgnoresWrappingXmlNameInput, + IgnoresWrappingXmlNameOutput, + NestedStructuresInput, + NestedStructuresOutput, + NoInputAndOutputInput, + NoInputAndOutputOutput, + PutWithContentEncodingInput, + PutWithContentEncodingOutput, + QueryIdempotencyTokenAutoFillInput, + QueryIdempotencyTokenAutoFillOutput, + QueryListsInput, + QueryListsOutput, + QueryTimestampsInput, + QueryTimestampsOutput, + RecursiveXmlShapesInput, + RecursiveXmlShapesOutput, + SimpleInputParamsInput, + SimpleInputParamsOutput, + SimpleScalarXmlPropertiesInput, + SimpleScalarXmlPropertiesOutput, + XmlBlobsInput, + XmlBlobsOperationOutput, + XmlEmptyBlobsInput, + XmlEmptyBlobsOutput, + XmlEmptyListsInput, + XmlEmptyListsOutput, + XmlEnumsInput, + XmlEnumsOutput, + XmlIntEnumsInput, + XmlIntEnumsOutput, + XmlListsInput, + XmlListsOperationOutput, + XmlNamespacesInput, + XmlNamespacesOutput, + XmlTimestampsInput, + XmlTimestampsOutput, + ) + class ServiceError(ModeledError): """ @@ -185,42 +243,54 @@ def __getattr__(name: str): return _registry.build(name) -DATETIME_OFFSETS = APIOperation( - static_schema=_SCHEMA_DATETIME_OFFSETS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +DATETIME_OFFSETS: APIOperation[DatetimeOffsetsInput, DatetimeOffsetsOutput] = ( + APIOperation( + static_schema=_SCHEMA_DATETIME_OFFSETS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -EMPTY_INPUT_AND_EMPTY_OUTPUT = APIOperation( +EMPTY_INPUT_AND_EMPTY_OUTPUT: APIOperation[ + EmptyInputAndEmptyOutputInput, EmptyInputAndEmptyOutputOutput +] = APIOperation( static_schema=_SCHEMA_EMPTY_INPUT_AND_EMPTY_OUTPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -ENDPOINT_OPERATION = APIOperation( - static_schema=_SCHEMA_ENDPOINT_OPERATION, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +ENDPOINT_OPERATION: APIOperation[EndpointOperationInput, EndpointOperationOutput] = ( + APIOperation( + static_schema=_SCHEMA_ENDPOINT_OPERATION, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -ENDPOINT_WITH_HOST_LABEL_OPERATION = APIOperation( +ENDPOINT_WITH_HOST_LABEL_OPERATION: APIOperation[ + EndpointWithHostLabelOperationInput, EndpointWithHostLabelOperationOutput +] = APIOperation( static_schema=_SCHEMA_ENDPOINT_WITH_HOST_LABEL_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -FRACTIONAL_SECONDS = APIOperation( - static_schema=_SCHEMA_FRACTIONAL_SECONDS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +FRACTIONAL_SECONDS: APIOperation[FractionalSecondsInput, FractionalSecondsOutput] = ( + APIOperation( + static_schema=_SCHEMA_FRACTIONAL_SECONDS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -GREETING_WITH_ERRORS = APIOperation( +GREETING_WITH_ERRORS: APIOperation[ + GreetingWithErrorsInput, GreetingWithErrorsOutput +] = APIOperation( static_schema=_SCHEMA_GREETING_WITH_ERRORS, model_registry=_registry, error_ids=[ @@ -230,133 +300,153 @@ def __getattr__(name: str): effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HOST_WITH_PATH_OPERATION = APIOperation( +HOST_WITH_PATH_OPERATION: APIOperation[ + HostWithPathOperationInput, HostWithPathOperationOutput +] = APIOperation( static_schema=_SCHEMA_HOST_WITH_PATH_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -IGNORES_WRAPPING_XML_NAME = APIOperation( +IGNORES_WRAPPING_XML_NAME: APIOperation[ + IgnoresWrappingXmlNameInput, IgnoresWrappingXmlNameOutput +] = APIOperation( static_schema=_SCHEMA_IGNORES_WRAPPING_XML_NAME, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NO_INPUT_AND_OUTPUT = APIOperation( - static_schema=_SCHEMA_NO_INPUT_AND_OUTPUT, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +NO_INPUT_AND_OUTPUT: APIOperation[NoInputAndOutputInput, NoInputAndOutputOutput] = ( + APIOperation( + static_schema=_SCHEMA_NO_INPUT_AND_OUTPUT, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -PUT_WITH_CONTENT_ENCODING = APIOperation( +PUT_WITH_CONTENT_ENCODING: APIOperation[ + PutWithContentEncodingInput, PutWithContentEncodingOutput +] = APIOperation( static_schema=_SCHEMA_PUT_WITH_CONTENT_ENCODING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL = APIOperation( +QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL: APIOperation[ + QueryIdempotencyTokenAutoFillInput, QueryIdempotencyTokenAutoFillOutput +] = APIOperation( static_schema=_SCHEMA_QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_LISTS = APIOperation( +QUERY_LISTS: APIOperation[QueryListsInput, QueryListsOutput] = APIOperation( static_schema=_SCHEMA_QUERY_LISTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_TIMESTAMPS = APIOperation( - static_schema=_SCHEMA_QUERY_TIMESTAMPS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +QUERY_TIMESTAMPS: APIOperation[QueryTimestampsInput, QueryTimestampsOutput] = ( + APIOperation( + static_schema=_SCHEMA_QUERY_TIMESTAMPS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -SIMPLE_INPUT_PARAMS = APIOperation( - static_schema=_SCHEMA_SIMPLE_INPUT_PARAMS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +SIMPLE_INPUT_PARAMS: APIOperation[SimpleInputParamsInput, SimpleInputParamsOutput] = ( + APIOperation( + static_schema=_SCHEMA_SIMPLE_INPUT_PARAMS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -SIMPLE_SCALAR_XML_PROPERTIES = APIOperation( +SIMPLE_SCALAR_XML_PROPERTIES: APIOperation[ + SimpleScalarXmlPropertiesInput, SimpleScalarXmlPropertiesOutput +] = APIOperation( static_schema=_SCHEMA_SIMPLE_SCALAR_XML_PROPERTIES, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_BLOBS = APIOperation( +XML_BLOBS: APIOperation[XmlBlobsInput, XmlBlobsOperationOutput] = APIOperation( static_schema=_SCHEMA_XML_BLOBS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_EMPTY_BLOBS = APIOperation( +XML_EMPTY_BLOBS: APIOperation[XmlEmptyBlobsInput, XmlEmptyBlobsOutput] = APIOperation( static_schema=_SCHEMA_XML_EMPTY_BLOBS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_EMPTY_LISTS = APIOperation( +XML_EMPTY_LISTS: APIOperation[XmlEmptyListsInput, XmlEmptyListsOutput] = APIOperation( static_schema=_SCHEMA_XML_EMPTY_LISTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_ENUMS = APIOperation( +XML_ENUMS: APIOperation[XmlEnumsInput, XmlEnumsOutput] = APIOperation( static_schema=_SCHEMA_XML_ENUMS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_INT_ENUMS = APIOperation( +XML_INT_ENUMS: APIOperation[XmlIntEnumsInput, XmlIntEnumsOutput] = APIOperation( static_schema=_SCHEMA_XML_INT_ENUMS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_LISTS = APIOperation( +XML_LISTS: APIOperation[XmlListsInput, XmlListsOperationOutput] = APIOperation( static_schema=_SCHEMA_XML_LISTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_NAMESPACES = APIOperation( +XML_NAMESPACES: APIOperation[XmlNamespacesInput, XmlNamespacesOutput] = APIOperation( static_schema=_SCHEMA_XML_NAMESPACES, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_TIMESTAMPS = APIOperation( +XML_TIMESTAMPS: APIOperation[XmlTimestampsInput, XmlTimestampsOutput] = APIOperation( static_schema=_SCHEMA_XML_TIMESTAMPS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NESTED_STRUCTURES = APIOperation( - static_schema=_SCHEMA_NESTED_STRUCTURES, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +NESTED_STRUCTURES: APIOperation[NestedStructuresInput, NestedStructuresOutput] = ( + APIOperation( + static_schema=_SCHEMA_NESTED_STRUCTURES, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -RECURSIVE_XML_SHAPES = APIOperation( +RECURSIVE_XML_SHAPES: APIOperation[ + RecursiveXmlShapesInput, RecursiveXmlShapesOutput +] = APIOperation( static_schema=_SCHEMA_RECURSIVE_XML_SHAPES, model_registry=_registry, error_ids=[], diff --git a/codegen-output/my-handwritten-model/src/my_handwritten_model/client.py b/codegen-output/my-handwritten-model/src/my_handwritten_model/client.py index 488b24f3b..0e496bbcf 100644 --- a/codegen-output/my-handwritten-model/src/my_handwritten_model/client.py +++ b/codegen-output/my-handwritten-model/src/my_handwritten_model/client.py @@ -147,7 +147,7 @@ async def publish_events( invocations. Returns: - An `InputEventStream` for client-to-server streaming. + An `AsyncInputEventStream` for client-to-server streaming. """ pipeline, call = await self._prepare_call(input, PUBLISH_EVENTS, [], plugins) return await pipeline.input_stream(call, PublishEventStream) @@ -168,7 +168,7 @@ async def subscribe_to_events( invocations. Returns: - An `OutputEventStream` for server-to-client streaming. + An `AsyncOutputEventStream` for server-to-client streaming. """ pipeline, call = await self._prepare_call( input, SUBSCRIBE_TO_EVENTS, [], plugins @@ -195,7 +195,7 @@ async def trade_event_stream( invocations. Returns: - A `DuplexEventStream` for bidirectional streaming. + An `AsyncDuplexEventStream` for bidirectional streaming. """ pipeline, call = await self._prepare_call( input, TRADE_EVENT_STREAM, [], plugins diff --git a/codegen-output/my-handwritten-model/src/my_handwritten_model/models.py b/codegen-output/my-handwritten-model/src/my_handwritten_model/models.py index 45a366c86..0bb8689ee 100644 --- a/codegen-output/my-handwritten-model/src/my_handwritten_model/models.py +++ b/codegen-output/my-handwritten-model/src/my_handwritten_model/models.py @@ -1,5 +1,7 @@ # Code generated by smithy-python-codegen DO NOT EDIT. +from __future__ import annotations + from ._private import schemas as _schemas from smithy_core._dynamic_models import ModelRegistry from smithy_core.exceptions import ModeledError @@ -12,6 +14,18 @@ TRADE_EVENT_STREAM as _SCHEMA_TRADE_EVENT_STREAM, ) +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from .models import ( + PublishEventsInput, + PublishEventsOutput, + SubscribeToEventsInput, + SubscribeToEventsOutput, + TradeEventStreamInput, + TradeEventStreamOutput, + ) + class ServiceError(ModeledError): """ @@ -89,23 +103,27 @@ def __getattr__(name: str): return _registry.build(name) -PUBLISH_EVENTS = APIOperation( +PUBLISH_EVENTS: APIOperation[PublishEventsInput, PublishEventsOutput] = APIOperation( static_schema=_SCHEMA_PUBLISH_EVENTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("smithy.api#noAuth")], ) -SUBSCRIBE_TO_EVENTS = APIOperation( - static_schema=_SCHEMA_SUBSCRIBE_TO_EVENTS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("smithy.api#noAuth")], +SUBSCRIBE_TO_EVENTS: APIOperation[SubscribeToEventsInput, SubscribeToEventsOutput] = ( + APIOperation( + static_schema=_SCHEMA_SUBSCRIBE_TO_EVENTS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("smithy.api#noAuth")], + ) ) -TRADE_EVENT_STREAM = APIOperation( - static_schema=_SCHEMA_TRADE_EVENT_STREAM, - model_registry=_registry, - error_ids=[ShapeID("smithy.python.tests.handwritten#StreamServiceError")], - effective_auth_schemes=[ShapeID("smithy.api#noAuth")], +TRADE_EVENT_STREAM: APIOperation[TradeEventStreamInput, TradeEventStreamOutput] = ( + APIOperation( + static_schema=_SCHEMA_TRADE_EVENT_STREAM, + model_registry=_registry, + error_ids=[ShapeID("smithy.python.tests.handwritten#StreamServiceError")], + effective_auth_schemes=[ShapeID("smithy.api#noAuth")], + ) ) diff --git a/codegen-output/rest-json-1/src/restjson/client.py b/codegen-output/rest-json-1/src/restjson/client.py index 2f96fe9e8..9fe89ac5c 100644 --- a/codegen-output/rest-json-1/src/restjson/client.py +++ b/codegen-output/rest-json-1/src/restjson/client.py @@ -691,7 +691,7 @@ async def duplex_stream( invocations. Returns: - A `DuplexEventStream` for bidirectional streaming. + An `AsyncDuplexEventStream` for bidirectional streaming. """ pipeline, call = await self._prepare_call(input, DUPLEX_STREAM, [], plugins) return await pipeline.duplex_stream( @@ -716,7 +716,7 @@ async def duplex_stream_with_distinct_streams( invocations. Returns: - An `InputEventStream` for client-to-server streaming. + An `AsyncInputEventStream` for client-to-server streaming. """ pipeline, call = await self._prepare_call( input, DUPLEX_STREAM_WITH_DISTINCT_STREAMS, [], plugins @@ -743,7 +743,7 @@ async def duplex_stream_with_initial_messages( invocations. Returns: - A `DuplexEventStream` for bidirectional streaming. + An `AsyncDuplexEventStream` for bidirectional streaming. """ pipeline, call = await self._prepare_call( input, DUPLEX_STREAM_WITH_INITIAL_MESSAGES, [], plugins @@ -1377,7 +1377,7 @@ async def input_stream( invocations. Returns: - An `InputEventStream` for client-to-server streaming. + An `AsyncInputEventStream` for client-to-server streaming. """ pipeline, call = await self._prepare_call(input, INPUT_STREAM, [], plugins) return await pipeline.input_stream(call, EventStream) @@ -1400,7 +1400,7 @@ async def input_stream_with_initial_request( invocations. Returns: - An `InputEventStream` for client-to-server streaming. + An `AsyncInputEventStream` for client-to-server streaming. """ pipeline, call = await self._prepare_call( input, INPUT_STREAM_WITH_INITIAL_REQUEST, [], plugins @@ -2570,7 +2570,7 @@ async def output_stream( invocations. Returns: - An `OutputEventStream` for server-to-client streaming. + An `AsyncOutputEventStream` for server-to-client streaming. """ pipeline, call = await self._prepare_call(input, OUTPUT_STREAM, [], plugins) return await pipeline.output_stream( @@ -2595,7 +2595,7 @@ async def output_stream_with_initial_response( invocations. Returns: - An `OutputEventStream` for server-to-client streaming. + An `AsyncOutputEventStream` for server-to-client streaming. """ pipeline, call = await self._prepare_call( input, OUTPUT_STREAM_WITH_INITIAL_RESPONSE, [], plugins diff --git a/codegen-output/rest-json-1/src/restjson/models.py b/codegen-output/rest-json-1/src/restjson/models.py index 713560882..27798f6fb 100644 --- a/codegen-output/rest-json-1/src/restjson/models.py +++ b/codegen-output/rest-json-1/src/restjson/models.py @@ -1,5 +1,7 @@ # Code generated by smithy-python-codegen DO NOT EDIT. +from __future__ import annotations + from ._private import schemas as _schemas from smithy_core._dynamic_models import ModelRegistry from smithy_core.exceptions import ModeledError @@ -122,6 +124,238 @@ UNIT_INPUT_AND_OUTPUT as _SCHEMA_UNIT_INPUT_AND_OUTPUT, ) +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from .models import ( + AllQueryStringTypesInput, + AllQueryStringTypesOutput, + ConstantAndVariableQueryStringInput, + ConstantAndVariableQueryStringOutput, + ConstantQueryStringInput, + ConstantQueryStringOutput, + ContentTypeParametersInput, + ContentTypeParametersOutput, + DatetimeOffsetsInput, + DatetimeOffsetsOutput, + DocumentTypeAsMapValueInput, + DocumentTypeAsMapValueOutput, + DocumentTypeAsPayloadInput, + DocumentTypeAsPayloadOutput, + DocumentTypeInput, + DocumentTypeOutput, + DuplexStreamInput, + DuplexStreamOutput, + DuplexStreamWithDistinctStreamsInput, + DuplexStreamWithDistinctStreamsOutput, + DuplexStreamWithInitialMessagesInput, + DuplexStreamWithInitialMessagesOutput, + EmptyInputAndEmptyOutputInput, + EmptyInputAndEmptyOutputOutput, + EndpointOperationInput, + EndpointOperationOutput, + EndpointWithHostLabelOperationInput, + EndpointWithHostLabelOperationOutput, + FractionalSecondsInput, + FractionalSecondsOutput, + GreetingWithErrorsInput, + GreetingWithErrorsOutput, + HostWithPathOperationInput, + HostWithPathOperationOutput, + HttpChecksumRequiredInput, + HttpChecksumRequiredOutput, + HttpEmptyPrefixHeadersInput, + HttpEmptyPrefixHeadersOutput, + HttpEnumPayloadInput, + HttpEnumPayloadOutput, + HttpPayloadTraitsInput, + HttpPayloadTraitsOutput, + HttpPayloadTraitsWithMediaTypeInput, + HttpPayloadTraitsWithMediaTypeOutput, + HttpPayloadWithStructureInput, + HttpPayloadWithStructureOutput, + HttpPayloadWithUnionInput, + HttpPayloadWithUnionOutput, + HttpPrefixHeadersInResponseInput, + HttpPrefixHeadersInResponseOutput, + HttpPrefixHeadersInput, + HttpPrefixHeadersOutput, + HttpQueryParamsOnlyOperationInput, + HttpQueryParamsOnlyOperationOutput, + HttpRequestWithFloatLabelsInput, + HttpRequestWithFloatLabelsOutput, + HttpRequestWithGreedyLabelInPathInput, + HttpRequestWithGreedyLabelInPathOutput, + HttpRequestWithLabelsAndTimestampFormatInput, + HttpRequestWithLabelsAndTimestampFormatOutput, + HttpRequestWithLabelsInput, + HttpRequestWithLabelsOutput, + HttpRequestWithRegexLiteralInput, + HttpRequestWithRegexLiteralOutput, + HttpResponseCodeInput, + HttpResponseCodeOutput, + HttpStringPayloadInput, + HttpStringPayloadOutput, + IgnoreQueryParamsInResponseInput, + IgnoreQueryParamsInResponseOutput, + InputAndOutputWithHeadersInput, + InputAndOutputWithHeadersOutput, + InputStreamInput, + InputStreamOutput, + InputStreamWithInitialRequestInput, + InputStreamWithInitialRequestOutput, + JsonBlobsInput, + JsonBlobsOutput, + JsonEnumsInput, + JsonEnumsOutput, + JsonIntEnumsInput, + JsonIntEnumsOutput, + JsonListsInput, + JsonListsOutput, + JsonMapsInput, + JsonMapsOutput, + JsonTimestampsInput, + JsonTimestampsOutput, + JsonUnionsInput, + JsonUnionsOutput, + MalformedAcceptWithBodyInput, + MalformedAcceptWithBodyOutput, + MalformedAcceptWithGenericStringInput, + MalformedAcceptWithGenericStringOutput, + MalformedAcceptWithPayloadInput, + MalformedAcceptWithPayloadOutput, + MalformedBlobInput, + MalformedBlobOutput, + MalformedBooleanInput, + MalformedBooleanOutput, + MalformedByteInput, + MalformedByteOutput, + MalformedContentTypeWithBodyInput, + MalformedContentTypeWithBodyOutput, + MalformedContentTypeWithGenericStringInput, + MalformedContentTypeWithGenericStringOutput, + MalformedContentTypeWithPayloadInput, + MalformedContentTypeWithPayloadOutput, + MalformedContentTypeWithoutBodyEmptyInputInput, + MalformedContentTypeWithoutBodyEmptyInputOutput, + MalformedContentTypeWithoutBodyInput, + MalformedContentTypeWithoutBodyOutput, + MalformedDoubleInput, + MalformedDoubleOutput, + MalformedFloatInput, + MalformedFloatOutput, + MalformedIntegerInput, + MalformedIntegerOutput, + MalformedListInput, + MalformedListOutput, + MalformedLongInput, + MalformedLongOutput, + MalformedMapInput, + MalformedMapOutput, + MalformedRequestBodyInput, + MalformedRequestBodyOutput, + MalformedShortInput, + MalformedShortOutput, + MalformedStringInput, + MalformedStringOutput, + MalformedTimestampBodyDateTimeInput, + MalformedTimestampBodyDateTimeOutput, + MalformedTimestampBodyDefaultInput, + MalformedTimestampBodyDefaultOutput, + MalformedTimestampBodyHttpDateInput, + MalformedTimestampBodyHttpDateOutput, + MalformedTimestampHeaderDateTimeInput, + MalformedTimestampHeaderDateTimeOutput, + MalformedTimestampHeaderDefaultInput, + MalformedTimestampHeaderDefaultOutput, + MalformedTimestampHeaderEpochInput, + MalformedTimestampHeaderEpochOutput, + MalformedTimestampPathDefaultInput, + MalformedTimestampPathDefaultOutput, + MalformedTimestampPathEpochInput, + MalformedTimestampPathEpochOutput, + MalformedTimestampPathHttpDateInput, + MalformedTimestampPathHttpDateOutput, + MalformedTimestampQueryDefaultInput, + MalformedTimestampQueryDefaultOutput, + MalformedTimestampQueryEpochInput, + MalformedTimestampQueryEpochOutput, + MalformedTimestampQueryHttpDateInput, + MalformedTimestampQueryHttpDateOutput, + MalformedUnionInput, + MalformedUnionOutput, + MediaTypeHeaderInput, + MediaTypeHeaderOutput, + NoInputAndNoOutputInput, + NoInputAndNoOutputOutput, + NoInputAndOutputInput, + NoInputAndOutputOutput, + NullAndEmptyHeadersClientInput, + NullAndEmptyHeadersClientOutput, + NullAndEmptyHeadersServerInput, + NullAndEmptyHeadersServerOutput, + OmitsNullSerializesEmptyStringInput, + OmitsNullSerializesEmptyStringOutput, + OmitsSerializingEmptyListsInput, + OmitsSerializingEmptyListsOutput, + OperationWithDefaultsInput, + OperationWithDefaultsOutput, + OperationWithNestedStructureInput, + OperationWithNestedStructureOutput, + OutputStreamInput, + OutputStreamOutput, + OutputStreamWithInitialResponseInput, + OutputStreamWithInitialResponseOutput, + PostPlayerActionInput, + PostPlayerActionOutput, + PostUnionWithJsonNameInput, + PostUnionWithJsonNameOutput, + PutWithContentEncodingInput, + PutWithContentEncodingOutput, + QueryIdempotencyTokenAutoFillInput, + QueryIdempotencyTokenAutoFillOutput, + QueryParamsAsStringListMapInput, + QueryParamsAsStringListMapOutput, + QueryPrecedenceInput, + QueryPrecedenceOutput, + RecursiveShapesInput, + RecursiveShapesOutput, + ResponseCodeHttpFallbackInput, + ResponseCodeHttpFallbackOutput, + ResponseCodeRequiredInput, + ResponseCodeRequiredOutput, + SimpleScalarPropertiesInput, + SimpleScalarPropertiesOutput, + SparseJsonListsInput, + SparseJsonListsOutput, + SparseJsonMapsInput, + SparseJsonMapsOutput, + StreamingTraitsInput, + StreamingTraitsOutput, + StreamingTraitsRequireLengthInput, + StreamingTraitsRequireLengthOutput, + StreamingTraitsWithMediaTypeInput, + StreamingTraitsWithMediaTypeOutput, + TestBodyStructureInput, + TestBodyStructureOutput, + TestGetNoInputNoPayloadInput, + TestGetNoInputNoPayloadOutput, + TestGetNoPayloadInput, + TestGetNoPayloadOutput, + TestPayloadBlobInput, + TestPayloadBlobOutput, + TestPayloadStructureInput, + TestPayloadStructureOutput, + TestPostNoInputNoPayloadInput, + TestPostNoInputNoPayloadOutput, + TestPostNoPayloadInput, + TestPostNoPayloadOutput, + TimestampFormatHeadersInput, + TimestampFormatHeadersOutput, + UnitInputAndOutputInput, + UnitInputAndOutputOutput, + ) + class ServiceError(ModeledError): """ @@ -721,112 +955,140 @@ def __getattr__(name: str): return _registry.build(name) -ALL_QUERY_STRING_TYPES = APIOperation( +ALL_QUERY_STRING_TYPES: APIOperation[ + AllQueryStringTypesInput, AllQueryStringTypesOutput +] = APIOperation( static_schema=_SCHEMA_ALL_QUERY_STRING_TYPES, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -CONSTANT_AND_VARIABLE_QUERY_STRING = APIOperation( +CONSTANT_AND_VARIABLE_QUERY_STRING: APIOperation[ + ConstantAndVariableQueryStringInput, ConstantAndVariableQueryStringOutput +] = APIOperation( static_schema=_SCHEMA_CONSTANT_AND_VARIABLE_QUERY_STRING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -CONSTANT_QUERY_STRING = APIOperation( +CONSTANT_QUERY_STRING: APIOperation[ + ConstantQueryStringInput, ConstantQueryStringOutput +] = APIOperation( static_schema=_SCHEMA_CONSTANT_QUERY_STRING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -CONTENT_TYPE_PARAMETERS = APIOperation( +CONTENT_TYPE_PARAMETERS: APIOperation[ + ContentTypeParametersInput, ContentTypeParametersOutput +] = APIOperation( static_schema=_SCHEMA_CONTENT_TYPE_PARAMETERS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -DATETIME_OFFSETS = APIOperation( - static_schema=_SCHEMA_DATETIME_OFFSETS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +DATETIME_OFFSETS: APIOperation[DatetimeOffsetsInput, DatetimeOffsetsOutput] = ( + APIOperation( + static_schema=_SCHEMA_DATETIME_OFFSETS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -DOCUMENT_TYPE = APIOperation( +DOCUMENT_TYPE: APIOperation[DocumentTypeInput, DocumentTypeOutput] = APIOperation( static_schema=_SCHEMA_DOCUMENT_TYPE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -DOCUMENT_TYPE_AS_MAP_VALUE = APIOperation( +DOCUMENT_TYPE_AS_MAP_VALUE: APIOperation[ + DocumentTypeAsMapValueInput, DocumentTypeAsMapValueOutput +] = APIOperation( static_schema=_SCHEMA_DOCUMENT_TYPE_AS_MAP_VALUE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -DOCUMENT_TYPE_AS_PAYLOAD = APIOperation( +DOCUMENT_TYPE_AS_PAYLOAD: APIOperation[ + DocumentTypeAsPayloadInput, DocumentTypeAsPayloadOutput +] = APIOperation( static_schema=_SCHEMA_DOCUMENT_TYPE_AS_PAYLOAD, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -DUPLEX_STREAM = APIOperation( +DUPLEX_STREAM: APIOperation[DuplexStreamInput, DuplexStreamOutput] = APIOperation( static_schema=_SCHEMA_DUPLEX_STREAM, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -DUPLEX_STREAM_WITH_DISTINCT_STREAMS = APIOperation( +DUPLEX_STREAM_WITH_DISTINCT_STREAMS: APIOperation[ + DuplexStreamWithDistinctStreamsInput, DuplexStreamWithDistinctStreamsOutput +] = APIOperation( static_schema=_SCHEMA_DUPLEX_STREAM_WITH_DISTINCT_STREAMS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -DUPLEX_STREAM_WITH_INITIAL_MESSAGES = APIOperation( +DUPLEX_STREAM_WITH_INITIAL_MESSAGES: APIOperation[ + DuplexStreamWithInitialMessagesInput, DuplexStreamWithInitialMessagesOutput +] = APIOperation( static_schema=_SCHEMA_DUPLEX_STREAM_WITH_INITIAL_MESSAGES, model_registry=_registry, error_ids=[ShapeID("aws.protocoltests.restjson#ServiceUnavailableError")], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -EMPTY_INPUT_AND_EMPTY_OUTPUT = APIOperation( +EMPTY_INPUT_AND_EMPTY_OUTPUT: APIOperation[ + EmptyInputAndEmptyOutputInput, EmptyInputAndEmptyOutputOutput +] = APIOperation( static_schema=_SCHEMA_EMPTY_INPUT_AND_EMPTY_OUTPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -ENDPOINT_OPERATION = APIOperation( - static_schema=_SCHEMA_ENDPOINT_OPERATION, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +ENDPOINT_OPERATION: APIOperation[EndpointOperationInput, EndpointOperationOutput] = ( + APIOperation( + static_schema=_SCHEMA_ENDPOINT_OPERATION, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -ENDPOINT_WITH_HOST_LABEL_OPERATION = APIOperation( +ENDPOINT_WITH_HOST_LABEL_OPERATION: APIOperation[ + EndpointWithHostLabelOperationInput, EndpointWithHostLabelOperationOutput +] = APIOperation( static_schema=_SCHEMA_ENDPOINT_WITH_HOST_LABEL_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -FRACTIONAL_SECONDS = APIOperation( - static_schema=_SCHEMA_FRACTIONAL_SECONDS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +FRACTIONAL_SECONDS: APIOperation[FractionalSecondsInput, FractionalSecondsOutput] = ( + APIOperation( + static_schema=_SCHEMA_FRACTIONAL_SECONDS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -GREETING_WITH_ERRORS = APIOperation( +GREETING_WITH_ERRORS: APIOperation[ + GreetingWithErrorsInput, GreetingWithErrorsOutput +] = APIOperation( static_schema=_SCHEMA_GREETING_WITH_ERRORS, model_registry=_registry, error_ids=[ @@ -837,681 +1099,844 @@ def __getattr__(name: str): effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HOST_WITH_PATH_OPERATION = APIOperation( +HOST_WITH_PATH_OPERATION: APIOperation[ + HostWithPathOperationInput, HostWithPathOperationOutput +] = APIOperation( static_schema=_SCHEMA_HOST_WITH_PATH_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_CHECKSUM_REQUIRED = APIOperation( +HTTP_CHECKSUM_REQUIRED: APIOperation[ + HttpChecksumRequiredInput, HttpChecksumRequiredOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_CHECKSUM_REQUIRED, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_EMPTY_PREFIX_HEADERS = APIOperation( +HTTP_EMPTY_PREFIX_HEADERS: APIOperation[ + HttpEmptyPrefixHeadersInput, HttpEmptyPrefixHeadersOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_EMPTY_PREFIX_HEADERS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_ENUM_PAYLOAD = APIOperation( - static_schema=_SCHEMA_HTTP_ENUM_PAYLOAD, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +HTTP_ENUM_PAYLOAD: APIOperation[HttpEnumPayloadInput, HttpEnumPayloadOutput] = ( + APIOperation( + static_schema=_SCHEMA_HTTP_ENUM_PAYLOAD, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -HTTP_PAYLOAD_TRAITS = APIOperation( - static_schema=_SCHEMA_HTTP_PAYLOAD_TRAITS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +HTTP_PAYLOAD_TRAITS: APIOperation[HttpPayloadTraitsInput, HttpPayloadTraitsOutput] = ( + APIOperation( + static_schema=_SCHEMA_HTTP_PAYLOAD_TRAITS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -HTTP_PAYLOAD_TRAITS_WITH_MEDIA_TYPE = APIOperation( +HTTP_PAYLOAD_TRAITS_WITH_MEDIA_TYPE: APIOperation[ + HttpPayloadTraitsWithMediaTypeInput, HttpPayloadTraitsWithMediaTypeOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_PAYLOAD_TRAITS_WITH_MEDIA_TYPE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_PAYLOAD_WITH_STRUCTURE = APIOperation( +HTTP_PAYLOAD_WITH_STRUCTURE: APIOperation[ + HttpPayloadWithStructureInput, HttpPayloadWithStructureOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_PAYLOAD_WITH_STRUCTURE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_PAYLOAD_WITH_UNION = APIOperation( +HTTP_PAYLOAD_WITH_UNION: APIOperation[ + HttpPayloadWithUnionInput, HttpPayloadWithUnionOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_PAYLOAD_WITH_UNION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_PREFIX_HEADERS = APIOperation( - static_schema=_SCHEMA_HTTP_PREFIX_HEADERS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +HTTP_PREFIX_HEADERS: APIOperation[HttpPrefixHeadersInput, HttpPrefixHeadersOutput] = ( + APIOperation( + static_schema=_SCHEMA_HTTP_PREFIX_HEADERS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -HTTP_PREFIX_HEADERS_IN_RESPONSE = APIOperation( +HTTP_PREFIX_HEADERS_IN_RESPONSE: APIOperation[ + HttpPrefixHeadersInResponseInput, HttpPrefixHeadersInResponseOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_PREFIX_HEADERS_IN_RESPONSE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_QUERY_PARAMS_ONLY_OPERATION = APIOperation( +HTTP_QUERY_PARAMS_ONLY_OPERATION: APIOperation[ + HttpQueryParamsOnlyOperationInput, HttpQueryParamsOnlyOperationOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_QUERY_PARAMS_ONLY_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_REQUEST_WITH_FLOAT_LABELS = APIOperation( +HTTP_REQUEST_WITH_FLOAT_LABELS: APIOperation[ + HttpRequestWithFloatLabelsInput, HttpRequestWithFloatLabelsOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_REQUEST_WITH_FLOAT_LABELS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_REQUEST_WITH_GREEDY_LABEL_IN_PATH = APIOperation( +HTTP_REQUEST_WITH_GREEDY_LABEL_IN_PATH: APIOperation[ + HttpRequestWithGreedyLabelInPathInput, HttpRequestWithGreedyLabelInPathOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_REQUEST_WITH_GREEDY_LABEL_IN_PATH, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_REQUEST_WITH_LABELS = APIOperation( +HTTP_REQUEST_WITH_LABELS: APIOperation[ + HttpRequestWithLabelsInput, HttpRequestWithLabelsOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_REQUEST_WITH_LABELS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_REQUEST_WITH_LABELS_AND_TIMESTAMP_FORMAT = APIOperation( +HTTP_REQUEST_WITH_LABELS_AND_TIMESTAMP_FORMAT: APIOperation[ + HttpRequestWithLabelsAndTimestampFormatInput, + HttpRequestWithLabelsAndTimestampFormatOutput, +] = APIOperation( static_schema=_SCHEMA_HTTP_REQUEST_WITH_LABELS_AND_TIMESTAMP_FORMAT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_REQUEST_WITH_REGEX_LITERAL = APIOperation( +HTTP_REQUEST_WITH_REGEX_LITERAL: APIOperation[ + HttpRequestWithRegexLiteralInput, HttpRequestWithRegexLiteralOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_REQUEST_WITH_REGEX_LITERAL, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_RESPONSE_CODE = APIOperation( - static_schema=_SCHEMA_HTTP_RESPONSE_CODE, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +HTTP_RESPONSE_CODE: APIOperation[HttpResponseCodeInput, HttpResponseCodeOutput] = ( + APIOperation( + static_schema=_SCHEMA_HTTP_RESPONSE_CODE, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -HTTP_STRING_PAYLOAD = APIOperation( - static_schema=_SCHEMA_HTTP_STRING_PAYLOAD, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +HTTP_STRING_PAYLOAD: APIOperation[HttpStringPayloadInput, HttpStringPayloadOutput] = ( + APIOperation( + static_schema=_SCHEMA_HTTP_STRING_PAYLOAD, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -IGNORE_QUERY_PARAMS_IN_RESPONSE = APIOperation( +IGNORE_QUERY_PARAMS_IN_RESPONSE: APIOperation[ + IgnoreQueryParamsInResponseInput, IgnoreQueryParamsInResponseOutput +] = APIOperation( static_schema=_SCHEMA_IGNORE_QUERY_PARAMS_IN_RESPONSE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -INPUT_AND_OUTPUT_WITH_HEADERS = APIOperation( +INPUT_AND_OUTPUT_WITH_HEADERS: APIOperation[ + InputAndOutputWithHeadersInput, InputAndOutputWithHeadersOutput +] = APIOperation( static_schema=_SCHEMA_INPUT_AND_OUTPUT_WITH_HEADERS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -INPUT_STREAM = APIOperation( +INPUT_STREAM: APIOperation[InputStreamInput, InputStreamOutput] = APIOperation( static_schema=_SCHEMA_INPUT_STREAM, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -INPUT_STREAM_WITH_INITIAL_REQUEST = APIOperation( +INPUT_STREAM_WITH_INITIAL_REQUEST: APIOperation[ + InputStreamWithInitialRequestInput, InputStreamWithInitialRequestOutput +] = APIOperation( static_schema=_SCHEMA_INPUT_STREAM_WITH_INITIAL_REQUEST, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -JSON_BLOBS = APIOperation( +JSON_BLOBS: APIOperation[JsonBlobsInput, JsonBlobsOutput] = APIOperation( static_schema=_SCHEMA_JSON_BLOBS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -JSON_ENUMS = APIOperation( +JSON_ENUMS: APIOperation[JsonEnumsInput, JsonEnumsOutput] = APIOperation( static_schema=_SCHEMA_JSON_ENUMS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -JSON_INT_ENUMS = APIOperation( +JSON_INT_ENUMS: APIOperation[JsonIntEnumsInput, JsonIntEnumsOutput] = APIOperation( static_schema=_SCHEMA_JSON_INT_ENUMS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -JSON_LISTS = APIOperation( +JSON_LISTS: APIOperation[JsonListsInput, JsonListsOutput] = APIOperation( static_schema=_SCHEMA_JSON_LISTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -JSON_MAPS = APIOperation( +JSON_MAPS: APIOperation[JsonMapsInput, JsonMapsOutput] = APIOperation( static_schema=_SCHEMA_JSON_MAPS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -JSON_TIMESTAMPS = APIOperation( +JSON_TIMESTAMPS: APIOperation[JsonTimestampsInput, JsonTimestampsOutput] = APIOperation( static_schema=_SCHEMA_JSON_TIMESTAMPS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -JSON_UNIONS = APIOperation( +JSON_UNIONS: APIOperation[JsonUnionsInput, JsonUnionsOutput] = APIOperation( static_schema=_SCHEMA_JSON_UNIONS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_ACCEPT_WITH_BODY = APIOperation( +MALFORMED_ACCEPT_WITH_BODY: APIOperation[ + MalformedAcceptWithBodyInput, MalformedAcceptWithBodyOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_ACCEPT_WITH_BODY, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_ACCEPT_WITH_GENERIC_STRING = APIOperation( +MALFORMED_ACCEPT_WITH_GENERIC_STRING: APIOperation[ + MalformedAcceptWithGenericStringInput, MalformedAcceptWithGenericStringOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_ACCEPT_WITH_GENERIC_STRING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_ACCEPT_WITH_PAYLOAD = APIOperation( +MALFORMED_ACCEPT_WITH_PAYLOAD: APIOperation[ + MalformedAcceptWithPayloadInput, MalformedAcceptWithPayloadOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_ACCEPT_WITH_PAYLOAD, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_BLOB = APIOperation( +MALFORMED_BLOB: APIOperation[MalformedBlobInput, MalformedBlobOutput] = APIOperation( static_schema=_SCHEMA_MALFORMED_BLOB, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_BOOLEAN = APIOperation( - static_schema=_SCHEMA_MALFORMED_BOOLEAN, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +MALFORMED_BOOLEAN: APIOperation[MalformedBooleanInput, MalformedBooleanOutput] = ( + APIOperation( + static_schema=_SCHEMA_MALFORMED_BOOLEAN, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -MALFORMED_BYTE = APIOperation( +MALFORMED_BYTE: APIOperation[MalformedByteInput, MalformedByteOutput] = APIOperation( static_schema=_SCHEMA_MALFORMED_BYTE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_CONTENT_TYPE_WITH_BODY = APIOperation( +MALFORMED_CONTENT_TYPE_WITH_BODY: APIOperation[ + MalformedContentTypeWithBodyInput, MalformedContentTypeWithBodyOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_CONTENT_TYPE_WITH_BODY, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_CONTENT_TYPE_WITH_GENERIC_STRING = APIOperation( +MALFORMED_CONTENT_TYPE_WITH_GENERIC_STRING: APIOperation[ + MalformedContentTypeWithGenericStringInput, + MalformedContentTypeWithGenericStringOutput, +] = APIOperation( static_schema=_SCHEMA_MALFORMED_CONTENT_TYPE_WITH_GENERIC_STRING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_CONTENT_TYPE_WITHOUT_BODY = APIOperation( +MALFORMED_CONTENT_TYPE_WITHOUT_BODY: APIOperation[ + MalformedContentTypeWithoutBodyInput, MalformedContentTypeWithoutBodyOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_CONTENT_TYPE_WITHOUT_BODY, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_CONTENT_TYPE_WITHOUT_BODY_EMPTY_INPUT = APIOperation( +MALFORMED_CONTENT_TYPE_WITHOUT_BODY_EMPTY_INPUT: APIOperation[ + MalformedContentTypeWithoutBodyEmptyInputInput, + MalformedContentTypeWithoutBodyEmptyInputOutput, +] = APIOperation( static_schema=_SCHEMA_MALFORMED_CONTENT_TYPE_WITHOUT_BODY_EMPTY_INPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_CONTENT_TYPE_WITH_PAYLOAD = APIOperation( +MALFORMED_CONTENT_TYPE_WITH_PAYLOAD: APIOperation[ + MalformedContentTypeWithPayloadInput, MalformedContentTypeWithPayloadOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_CONTENT_TYPE_WITH_PAYLOAD, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_DOUBLE = APIOperation( - static_schema=_SCHEMA_MALFORMED_DOUBLE, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +MALFORMED_DOUBLE: APIOperation[MalformedDoubleInput, MalformedDoubleOutput] = ( + APIOperation( + static_schema=_SCHEMA_MALFORMED_DOUBLE, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -MALFORMED_FLOAT = APIOperation( +MALFORMED_FLOAT: APIOperation[MalformedFloatInput, MalformedFloatOutput] = APIOperation( static_schema=_SCHEMA_MALFORMED_FLOAT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_INTEGER = APIOperation( - static_schema=_SCHEMA_MALFORMED_INTEGER, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +MALFORMED_INTEGER: APIOperation[MalformedIntegerInput, MalformedIntegerOutput] = ( + APIOperation( + static_schema=_SCHEMA_MALFORMED_INTEGER, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -MALFORMED_LIST = APIOperation( +MALFORMED_LIST: APIOperation[MalformedListInput, MalformedListOutput] = APIOperation( static_schema=_SCHEMA_MALFORMED_LIST, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_LONG = APIOperation( +MALFORMED_LONG: APIOperation[MalformedLongInput, MalformedLongOutput] = APIOperation( static_schema=_SCHEMA_MALFORMED_LONG, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_MAP = APIOperation( +MALFORMED_MAP: APIOperation[MalformedMapInput, MalformedMapOutput] = APIOperation( static_schema=_SCHEMA_MALFORMED_MAP, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_REQUEST_BODY = APIOperation( +MALFORMED_REQUEST_BODY: APIOperation[ + MalformedRequestBodyInput, MalformedRequestBodyOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_REQUEST_BODY, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_SHORT = APIOperation( +MALFORMED_SHORT: APIOperation[MalformedShortInput, MalformedShortOutput] = APIOperation( static_schema=_SCHEMA_MALFORMED_SHORT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_STRING = APIOperation( - static_schema=_SCHEMA_MALFORMED_STRING, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +MALFORMED_STRING: APIOperation[MalformedStringInput, MalformedStringOutput] = ( + APIOperation( + static_schema=_SCHEMA_MALFORMED_STRING, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -MALFORMED_TIMESTAMP_BODY_DATE_TIME = APIOperation( +MALFORMED_TIMESTAMP_BODY_DATE_TIME: APIOperation[ + MalformedTimestampBodyDateTimeInput, MalformedTimestampBodyDateTimeOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_TIMESTAMP_BODY_DATE_TIME, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_TIMESTAMP_BODY_DEFAULT = APIOperation( +MALFORMED_TIMESTAMP_BODY_DEFAULT: APIOperation[ + MalformedTimestampBodyDefaultInput, MalformedTimestampBodyDefaultOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_TIMESTAMP_BODY_DEFAULT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_TIMESTAMP_BODY_HTTP_DATE = APIOperation( +MALFORMED_TIMESTAMP_BODY_HTTP_DATE: APIOperation[ + MalformedTimestampBodyHttpDateInput, MalformedTimestampBodyHttpDateOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_TIMESTAMP_BODY_HTTP_DATE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_TIMESTAMP_HEADER_DATE_TIME = APIOperation( +MALFORMED_TIMESTAMP_HEADER_DATE_TIME: APIOperation[ + MalformedTimestampHeaderDateTimeInput, MalformedTimestampHeaderDateTimeOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_TIMESTAMP_HEADER_DATE_TIME, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_TIMESTAMP_HEADER_DEFAULT = APIOperation( +MALFORMED_TIMESTAMP_HEADER_DEFAULT: APIOperation[ + MalformedTimestampHeaderDefaultInput, MalformedTimestampHeaderDefaultOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_TIMESTAMP_HEADER_DEFAULT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_TIMESTAMP_HEADER_EPOCH = APIOperation( +MALFORMED_TIMESTAMP_HEADER_EPOCH: APIOperation[ + MalformedTimestampHeaderEpochInput, MalformedTimestampHeaderEpochOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_TIMESTAMP_HEADER_EPOCH, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_TIMESTAMP_PATH_DEFAULT = APIOperation( +MALFORMED_TIMESTAMP_PATH_DEFAULT: APIOperation[ + MalformedTimestampPathDefaultInput, MalformedTimestampPathDefaultOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_TIMESTAMP_PATH_DEFAULT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_TIMESTAMP_PATH_EPOCH = APIOperation( +MALFORMED_TIMESTAMP_PATH_EPOCH: APIOperation[ + MalformedTimestampPathEpochInput, MalformedTimestampPathEpochOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_TIMESTAMP_PATH_EPOCH, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_TIMESTAMP_PATH_HTTP_DATE = APIOperation( +MALFORMED_TIMESTAMP_PATH_HTTP_DATE: APIOperation[ + MalformedTimestampPathHttpDateInput, MalformedTimestampPathHttpDateOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_TIMESTAMP_PATH_HTTP_DATE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_TIMESTAMP_QUERY_DEFAULT = APIOperation( +MALFORMED_TIMESTAMP_QUERY_DEFAULT: APIOperation[ + MalformedTimestampQueryDefaultInput, MalformedTimestampQueryDefaultOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_TIMESTAMP_QUERY_DEFAULT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_TIMESTAMP_QUERY_EPOCH = APIOperation( +MALFORMED_TIMESTAMP_QUERY_EPOCH: APIOperation[ + MalformedTimestampQueryEpochInput, MalformedTimestampQueryEpochOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_TIMESTAMP_QUERY_EPOCH, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_TIMESTAMP_QUERY_HTTP_DATE = APIOperation( +MALFORMED_TIMESTAMP_QUERY_HTTP_DATE: APIOperation[ + MalformedTimestampQueryHttpDateInput, MalformedTimestampQueryHttpDateOutput +] = APIOperation( static_schema=_SCHEMA_MALFORMED_TIMESTAMP_QUERY_HTTP_DATE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MALFORMED_UNION = APIOperation( +MALFORMED_UNION: APIOperation[MalformedUnionInput, MalformedUnionOutput] = APIOperation( static_schema=_SCHEMA_MALFORMED_UNION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -MEDIA_TYPE_HEADER = APIOperation( - static_schema=_SCHEMA_MEDIA_TYPE_HEADER, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +MEDIA_TYPE_HEADER: APIOperation[MediaTypeHeaderInput, MediaTypeHeaderOutput] = ( + APIOperation( + static_schema=_SCHEMA_MEDIA_TYPE_HEADER, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -NO_INPUT_AND_NO_OUTPUT = APIOperation( +NO_INPUT_AND_NO_OUTPUT: APIOperation[ + NoInputAndNoOutputInput, NoInputAndNoOutputOutput +] = APIOperation( static_schema=_SCHEMA_NO_INPUT_AND_NO_OUTPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NO_INPUT_AND_OUTPUT = APIOperation( - static_schema=_SCHEMA_NO_INPUT_AND_OUTPUT, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +NO_INPUT_AND_OUTPUT: APIOperation[NoInputAndOutputInput, NoInputAndOutputOutput] = ( + APIOperation( + static_schema=_SCHEMA_NO_INPUT_AND_OUTPUT, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -NULL_AND_EMPTY_HEADERS_CLIENT = APIOperation( +NULL_AND_EMPTY_HEADERS_CLIENT: APIOperation[ + NullAndEmptyHeadersClientInput, NullAndEmptyHeadersClientOutput +] = APIOperation( static_schema=_SCHEMA_NULL_AND_EMPTY_HEADERS_CLIENT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NULL_AND_EMPTY_HEADERS_SERVER = APIOperation( +NULL_AND_EMPTY_HEADERS_SERVER: APIOperation[ + NullAndEmptyHeadersServerInput, NullAndEmptyHeadersServerOutput +] = APIOperation( static_schema=_SCHEMA_NULL_AND_EMPTY_HEADERS_SERVER, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -OMITS_NULL_SERIALIZES_EMPTY_STRING = APIOperation( +OMITS_NULL_SERIALIZES_EMPTY_STRING: APIOperation[ + OmitsNullSerializesEmptyStringInput, OmitsNullSerializesEmptyStringOutput +] = APIOperation( static_schema=_SCHEMA_OMITS_NULL_SERIALIZES_EMPTY_STRING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -OMITS_SERIALIZING_EMPTY_LISTS = APIOperation( +OMITS_SERIALIZING_EMPTY_LISTS: APIOperation[ + OmitsSerializingEmptyListsInput, OmitsSerializingEmptyListsOutput +] = APIOperation( static_schema=_SCHEMA_OMITS_SERIALIZING_EMPTY_LISTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -OPERATION_WITH_DEFAULTS = APIOperation( +OPERATION_WITH_DEFAULTS: APIOperation[ + OperationWithDefaultsInput, OperationWithDefaultsOutput +] = APIOperation( static_schema=_SCHEMA_OPERATION_WITH_DEFAULTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -OPERATION_WITH_NESTED_STRUCTURE = APIOperation( +OPERATION_WITH_NESTED_STRUCTURE: APIOperation[ + OperationWithNestedStructureInput, OperationWithNestedStructureOutput +] = APIOperation( static_schema=_SCHEMA_OPERATION_WITH_NESTED_STRUCTURE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -OUTPUT_STREAM = APIOperation( +OUTPUT_STREAM: APIOperation[OutputStreamInput, OutputStreamOutput] = APIOperation( static_schema=_SCHEMA_OUTPUT_STREAM, model_registry=_registry, error_ids=[ShapeID("aws.protocoltests.restjson#ServiceUnavailableError")], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -OUTPUT_STREAM_WITH_INITIAL_RESPONSE = APIOperation( +OUTPUT_STREAM_WITH_INITIAL_RESPONSE: APIOperation[ + OutputStreamWithInitialResponseInput, OutputStreamWithInitialResponseOutput +] = APIOperation( static_schema=_SCHEMA_OUTPUT_STREAM_WITH_INITIAL_RESPONSE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -POST_PLAYER_ACTION = APIOperation( - static_schema=_SCHEMA_POST_PLAYER_ACTION, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +POST_PLAYER_ACTION: APIOperation[PostPlayerActionInput, PostPlayerActionOutput] = ( + APIOperation( + static_schema=_SCHEMA_POST_PLAYER_ACTION, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -POST_UNION_WITH_JSON_NAME = APIOperation( +POST_UNION_WITH_JSON_NAME: APIOperation[ + PostUnionWithJsonNameInput, PostUnionWithJsonNameOutput +] = APIOperation( static_schema=_SCHEMA_POST_UNION_WITH_JSON_NAME, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -PUT_WITH_CONTENT_ENCODING = APIOperation( +PUT_WITH_CONTENT_ENCODING: APIOperation[ + PutWithContentEncodingInput, PutWithContentEncodingOutput +] = APIOperation( static_schema=_SCHEMA_PUT_WITH_CONTENT_ENCODING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL = APIOperation( +QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL: APIOperation[ + QueryIdempotencyTokenAutoFillInput, QueryIdempotencyTokenAutoFillOutput +] = APIOperation( static_schema=_SCHEMA_QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_PARAMS_AS_STRING_LIST_MAP = APIOperation( +QUERY_PARAMS_AS_STRING_LIST_MAP: APIOperation[ + QueryParamsAsStringListMapInput, QueryParamsAsStringListMapOutput +] = APIOperation( static_schema=_SCHEMA_QUERY_PARAMS_AS_STRING_LIST_MAP, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_PRECEDENCE = APIOperation( - static_schema=_SCHEMA_QUERY_PRECEDENCE, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +QUERY_PRECEDENCE: APIOperation[QueryPrecedenceInput, QueryPrecedenceOutput] = ( + APIOperation( + static_schema=_SCHEMA_QUERY_PRECEDENCE, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -RESPONSE_CODE_HTTP_FALLBACK = APIOperation( +RESPONSE_CODE_HTTP_FALLBACK: APIOperation[ + ResponseCodeHttpFallbackInput, ResponseCodeHttpFallbackOutput +] = APIOperation( static_schema=_SCHEMA_RESPONSE_CODE_HTTP_FALLBACK, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -RESPONSE_CODE_REQUIRED = APIOperation( +RESPONSE_CODE_REQUIRED: APIOperation[ + ResponseCodeRequiredInput, ResponseCodeRequiredOutput +] = APIOperation( static_schema=_SCHEMA_RESPONSE_CODE_REQUIRED, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -SIMPLE_SCALAR_PROPERTIES = APIOperation( +SIMPLE_SCALAR_PROPERTIES: APIOperation[ + SimpleScalarPropertiesInput, SimpleScalarPropertiesOutput +] = APIOperation( static_schema=_SCHEMA_SIMPLE_SCALAR_PROPERTIES, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -SPARSE_JSON_LISTS = APIOperation( - static_schema=_SCHEMA_SPARSE_JSON_LISTS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +SPARSE_JSON_LISTS: APIOperation[SparseJsonListsInput, SparseJsonListsOutput] = ( + APIOperation( + static_schema=_SCHEMA_SPARSE_JSON_LISTS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -SPARSE_JSON_MAPS = APIOperation( - static_schema=_SCHEMA_SPARSE_JSON_MAPS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +SPARSE_JSON_MAPS: APIOperation[SparseJsonMapsInput, SparseJsonMapsOutput] = ( + APIOperation( + static_schema=_SCHEMA_SPARSE_JSON_MAPS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -STREAMING_TRAITS = APIOperation( - static_schema=_SCHEMA_STREAMING_TRAITS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +STREAMING_TRAITS: APIOperation[StreamingTraitsInput, StreamingTraitsOutput] = ( + APIOperation( + static_schema=_SCHEMA_STREAMING_TRAITS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -STREAMING_TRAITS_REQUIRE_LENGTH = APIOperation( +STREAMING_TRAITS_REQUIRE_LENGTH: APIOperation[ + StreamingTraitsRequireLengthInput, StreamingTraitsRequireLengthOutput +] = APIOperation( static_schema=_SCHEMA_STREAMING_TRAITS_REQUIRE_LENGTH, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -STREAMING_TRAITS_WITH_MEDIA_TYPE = APIOperation( +STREAMING_TRAITS_WITH_MEDIA_TYPE: APIOperation[ + StreamingTraitsWithMediaTypeInput, StreamingTraitsWithMediaTypeOutput +] = APIOperation( static_schema=_SCHEMA_STREAMING_TRAITS_WITH_MEDIA_TYPE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -TEST_BODY_STRUCTURE = APIOperation( - static_schema=_SCHEMA_TEST_BODY_STRUCTURE, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +TEST_BODY_STRUCTURE: APIOperation[TestBodyStructureInput, TestBodyStructureOutput] = ( + APIOperation( + static_schema=_SCHEMA_TEST_BODY_STRUCTURE, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -TEST_GET_NO_INPUT_NO_PAYLOAD = APIOperation( +TEST_GET_NO_INPUT_NO_PAYLOAD: APIOperation[ + TestGetNoInputNoPayloadInput, TestGetNoInputNoPayloadOutput +] = APIOperation( static_schema=_SCHEMA_TEST_GET_NO_INPUT_NO_PAYLOAD, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -TEST_GET_NO_PAYLOAD = APIOperation( - static_schema=_SCHEMA_TEST_GET_NO_PAYLOAD, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +TEST_GET_NO_PAYLOAD: APIOperation[TestGetNoPayloadInput, TestGetNoPayloadOutput] = ( + APIOperation( + static_schema=_SCHEMA_TEST_GET_NO_PAYLOAD, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -TEST_PAYLOAD_BLOB = APIOperation( - static_schema=_SCHEMA_TEST_PAYLOAD_BLOB, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +TEST_PAYLOAD_BLOB: APIOperation[TestPayloadBlobInput, TestPayloadBlobOutput] = ( + APIOperation( + static_schema=_SCHEMA_TEST_PAYLOAD_BLOB, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -TEST_PAYLOAD_STRUCTURE = APIOperation( +TEST_PAYLOAD_STRUCTURE: APIOperation[ + TestPayloadStructureInput, TestPayloadStructureOutput +] = APIOperation( static_schema=_SCHEMA_TEST_PAYLOAD_STRUCTURE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -TEST_POST_NO_INPUT_NO_PAYLOAD = APIOperation( +TEST_POST_NO_INPUT_NO_PAYLOAD: APIOperation[ + TestPostNoInputNoPayloadInput, TestPostNoInputNoPayloadOutput +] = APIOperation( static_schema=_SCHEMA_TEST_POST_NO_INPUT_NO_PAYLOAD, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -TEST_POST_NO_PAYLOAD = APIOperation( - static_schema=_SCHEMA_TEST_POST_NO_PAYLOAD, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +TEST_POST_NO_PAYLOAD: APIOperation[TestPostNoPayloadInput, TestPostNoPayloadOutput] = ( + APIOperation( + static_schema=_SCHEMA_TEST_POST_NO_PAYLOAD, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -TIMESTAMP_FORMAT_HEADERS = APIOperation( +TIMESTAMP_FORMAT_HEADERS: APIOperation[ + TimestampFormatHeadersInput, TimestampFormatHeadersOutput +] = APIOperation( static_schema=_SCHEMA_TIMESTAMP_FORMAT_HEADERS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -UNIT_INPUT_AND_OUTPUT = APIOperation( +UNIT_INPUT_AND_OUTPUT: APIOperation[ + UnitInputAndOutputInput, UnitInputAndOutputOutput +] = APIOperation( static_schema=_SCHEMA_UNIT_INPUT_AND_OUTPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -RECURSIVE_SHAPES = APIOperation( - static_schema=_SCHEMA_RECURSIVE_SHAPES, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +RECURSIVE_SHAPES: APIOperation[RecursiveShapesInput, RecursiveShapesOutput] = ( + APIOperation( + static_schema=_SCHEMA_RECURSIVE_SHAPES, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) diff --git a/codegen-output/rest-json-1/src/restjson/models.pyi b/codegen-output/rest-json-1/src/restjson/models.pyi index 029a5f51e..4e09abb6d 100644 --- a/codegen-output/rest-json-1/src/restjson/models.pyi +++ b/codegen-output/rest-json-1/src/restjson/models.pyi @@ -76,7 +76,7 @@ class BlobPayloadEvent(_SerdeShape): class ClientOptionalDefaults(_SerdeShape): """Dataclass for ClientOptionalDefaults structure.""" - member: int | None = ... + member: int = ... @dataclass(kw_only=True) class ComplexError(ServiceError, _SerdeShape): @@ -175,41 +175,41 @@ class DatetimeOffsetsOutput(_SerdeShape): 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 = ... + default_string: str = ... + default_boolean: bool = ... + default_list: list[str] = ... + default_document_map: Document = ... + default_document_string: Document = ... + default_document_boolean: Document = ... + default_document_list: Document = ... + default_null_document: Document = ... + default_timestamp: datetime = ... + default_blob: bytes = ... + default_byte: int = ... + default_short: int = ... + default_integer: int = ... + default_long: int = ... + default_float: float = ... + default_double: float = ... + default_map: dict[str, str] = ... + default_enum: str = ... + default_int_enum: int = ... + empty_string: str = ... + false_boolean: bool = ... + empty_blob: bytes = ... + zero_byte: int = ... + zero_short: int = ... + zero_integer: int = ... + zero_long: int = ... + zero_float: float = ... + zero_double: float = ... @dataclass(kw_only=True) class Dialog(_SerdeShape): """Dataclass for Dialog structure.""" language: str | None = ... - greeting: str | None = ... + greeting: str = ... farewell: Farewell | None = ... @dataclass(kw_only=True) @@ -446,7 +446,7 @@ class _EventStreamDeserializer: class Farewell(_SerdeShape): """Dataclass for Farewell structure.""" - phrase: str | None = ... + phrase: str = ... @dataclass(kw_only=True) class FooError(ServiceError, _SerdeShape): @@ -2049,41 +2049,41 @@ class OperationWithDefaultsInput(_SerdeShape): defaults: Defaults | None = ... client_optional_defaults: ClientOptionalDefaults | None = ... - top_level_default: str | None = ... - other_top_level_default: int | None = ... + top_level_default: str = ... + other_top_level_default: int = ... @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 = ... + default_string: str = ... + default_boolean: bool = ... + default_list: list[str] = ... + default_document_map: Document = ... + default_document_string: Document = ... + default_document_boolean: Document = ... + default_document_list: Document = ... + default_null_document: Document = ... + default_timestamp: datetime = ... + default_blob: bytes = ... + default_byte: int = ... + default_short: int = ... + default_integer: int = ... + default_long: int = ... + default_float: float = ... + default_double: float = ... + default_map: dict[str, str] = ... + default_enum: str = ... + default_int_enum: int = ... + empty_string: str = ... + false_boolean: bool = ... + empty_blob: bytes = ... + zero_byte: int = ... + zero_short: int = ... + zero_integer: int = ... + zero_long: int = ... + zero_float: float = ... + zero_double: float = ... response_metadata: ResponseMetadata = ... """ Metadata about the response that produced this output. Use this to @@ -2103,8 +2103,8 @@ class OperationWithNestedStructureOutput(_SerdeShape): """Dataclass for OperationWithNestedStructureOutput structure.""" dialog: Dialog - dialog_list: list[Dialog] | None = ... - dialog_map: dict[str, Dialog] | None = ... + dialog_list: list[Dialog] = ... + dialog_map: dict[str, Dialog] = ... response_metadata: ResponseMetadata = ... """ Metadata about the response that produced this output. Use this to @@ -2529,14 +2529,14 @@ class StreamingTraitsInput(_SerdeShape): """Dataclass for StreamingTraitsInput structure.""" foo: str | None = ... - blob: StreamingBlob | None = ... + blob: StreamingBlob = ... @dataclass(kw_only=True) class StreamingTraitsOutput(_SerdeShape): """Dataclass for StreamingTraitsOutput structure.""" foo: str | None = ... - blob: StreamingBlob | None = ... + blob: StreamingBlob = ... response_metadata: ResponseMetadata = ... """ Metadata about the response that produced this output. Use this to @@ -2550,7 +2550,7 @@ class StreamingTraitsRequireLengthInput(_SerdeShape): """Dataclass for StreamingTraitsRequireLengthInput structure.""" foo: str | None = ... - blob: StreamingBlob | None = ... + blob: StreamingBlob = ... @dataclass(kw_only=True) class StreamingTraitsRequireLengthOutput(_SerdeShape): @@ -2569,14 +2569,14 @@ class StreamingTraitsWithMediaTypeInput(_SerdeShape): """Dataclass for StreamingTraitsWithMediaTypeInput structure.""" foo: str | None = ... - blob: StreamingBlob | None = ... + blob: StreamingBlob = ... @dataclass(kw_only=True) class StreamingTraitsWithMediaTypeOutput(_SerdeShape): """Dataclass for StreamingTraitsWithMediaTypeOutput structure.""" foo: str | None = ... - blob: StreamingBlob | None = ... + blob: StreamingBlob = ... response_metadata: ResponseMetadata = ... """ Metadata about the response that produced this output. Use this to @@ -2793,8 +2793,8 @@ class TopLevel(_SerdeShape): """Dataclass for TopLevel structure.""" dialog: Dialog - dialog_list: list[Dialog] | None = ... - dialog_map: dict[str, Dialog] | None = ... + dialog_list: list[Dialog] = ... + dialog_map: dict[str, Dialog] = ... @dataclass class UnionPayloadGreeting(_SerdeShape): diff --git a/codegen-output/rest-xml-with-namespace/src/restxmlwithnamespace/models.py b/codegen-output/rest-xml-with-namespace/src/restxmlwithnamespace/models.py index 9ba209ae7..0c78546ff 100644 --- a/codegen-output/rest-xml-with-namespace/src/restxmlwithnamespace/models.py +++ b/codegen-output/rest-xml-with-namespace/src/restxmlwithnamespace/models.py @@ -1,5 +1,7 @@ # Code generated by smithy-python-codegen DO NOT EDIT. +from __future__ import annotations + from ._private import schemas as _schemas from smithy_core._dynamic_models import ModelRegistry from smithy_core.exceptions import ModeledError @@ -10,6 +12,11 @@ SIMPLE_SCALAR_PROPERTIES as _SCHEMA_SIMPLE_SCALAR_PROPERTIES, ) +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from .models import SimpleScalarPropertiesInput, SimpleScalarPropertiesOutput + class ServiceError(ModeledError): """ @@ -43,7 +50,9 @@ def __getattr__(name: str): return _registry.build(name) -SIMPLE_SCALAR_PROPERTIES = APIOperation( +SIMPLE_SCALAR_PROPERTIES: APIOperation[ + SimpleScalarPropertiesInput, SimpleScalarPropertiesOutput +] = APIOperation( static_schema=_SCHEMA_SIMPLE_SCALAR_PROPERTIES, model_registry=_registry, error_ids=[], diff --git a/codegen-output/rest-xml/src/restxml/models.py b/codegen-output/rest-xml/src/restxml/models.py index 4c37c3979..58a214a4c 100644 --- a/codegen-output/rest-xml/src/restxml/models.py +++ b/codegen-output/rest-xml/src/restxml/models.py @@ -1,5 +1,7 @@ # Code generated by smithy-python-codegen DO NOT EDIT. +from __future__ import annotations + from ._private import schemas as _schemas from smithy_core._dynamic_models import ModelRegistry from smithy_core.exceptions import ModeledError @@ -74,6 +76,142 @@ XML_UNIONS as _SCHEMA_XML_UNIONS, ) +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from .models import ( + AllQueryStringTypesInput, + AllQueryStringTypesOutput, + BodyWithXmlNameInput, + BodyWithXmlNameOutput, + ConstantAndVariableQueryStringInput, + ConstantAndVariableQueryStringOutput, + ConstantQueryStringInput, + ConstantQueryStringOutput, + ContentTypeParametersInput, + ContentTypeParametersOutput, + DatetimeOffsetsInput, + DatetimeOffsetsOutput, + EmptyInputAndEmptyOutputInput, + EmptyInputAndEmptyOutputOutput, + EndpointOperationInput, + EndpointOperationOutput, + EndpointWithHostLabelHeaderOperationInput, + EndpointWithHostLabelHeaderOperationOutput, + EndpointWithHostLabelOperationInput, + EndpointWithHostLabelOperationOutput, + FlattenedXmlMapInput, + FlattenedXmlMapOutput, + FlattenedXmlMapWithXmlNameInput, + FlattenedXmlMapWithXmlNameOutput, + FlattenedXmlMapWithXmlNamespaceInput, + FlattenedXmlMapWithXmlNamespaceOutput, + FractionalSecondsInput, + FractionalSecondsOutput, + GreetingWithErrorsInput, + GreetingWithErrorsOutput, + HttpEmptyPrefixHeadersInput, + HttpEmptyPrefixHeadersOutput, + HttpEnumPayloadInput, + HttpEnumPayloadOutput, + HttpPayloadTraitsInput, + HttpPayloadTraitsOutput, + HttpPayloadTraitsWithMediaTypeInput, + HttpPayloadTraitsWithMediaTypeOutput, + HttpPayloadWithMemberXmlNameInput, + HttpPayloadWithMemberXmlNameOutput, + HttpPayloadWithStructureInput, + HttpPayloadWithStructureOutput, + HttpPayloadWithUnionInput, + HttpPayloadWithUnionOutput, + HttpPayloadWithXmlNameInput, + HttpPayloadWithXmlNameOutput, + HttpPayloadWithXmlNamespaceAndPrefixInput, + HttpPayloadWithXmlNamespaceAndPrefixOutput, + HttpPayloadWithXmlNamespaceInput, + HttpPayloadWithXmlNamespaceOutput, + HttpPrefixHeadersInput, + HttpPrefixHeadersOutput, + HttpRequestWithFloatLabelsInput, + HttpRequestWithFloatLabelsOutput, + HttpRequestWithGreedyLabelInPathInput, + HttpRequestWithGreedyLabelInPathOutput, + HttpRequestWithLabelsAndTimestampFormatInput, + HttpRequestWithLabelsAndTimestampFormatOutput, + HttpRequestWithLabelsInput, + HttpRequestWithLabelsOutput, + HttpResponseCodeInput, + HttpResponseCodeOutput, + HttpStringPayloadInput, + HttpStringPayloadOutput, + IgnoreQueryParamsInResponseInput, + IgnoreQueryParamsInResponseOutput, + InputAndOutputWithHeadersInput, + InputAndOutputWithHeadersOutput, + NestedXmlMapWithXmlNameInput, + NestedXmlMapWithXmlNameOutput, + NestedXmlMapsInput, + NestedXmlMapsOutput, + NoInputAndNoOutputInput, + NoInputAndNoOutputOutput, + NoInputAndOutputInput, + NoInputAndOutputOutput, + NullAndEmptyHeadersClientInput, + NullAndEmptyHeadersClientOutput, + NullAndEmptyHeadersServerInput, + NullAndEmptyHeadersServerOutput, + OmitsNullSerializesEmptyStringInput, + OmitsNullSerializesEmptyStringOutput, + PutWithContentEncodingInput, + PutWithContentEncodingOutput, + QueryIdempotencyTokenAutoFillInput, + QueryIdempotencyTokenAutoFillOutput, + QueryParamsAsStringListMapInput, + QueryParamsAsStringListMapOutput, + QueryPrecedenceInput, + QueryPrecedenceOutput, + RecursiveShapesInput, + RecursiveShapesOutput, + SimpleScalarPropertiesInput, + SimpleScalarPropertiesOutput, + TimestampFormatHeadersInput, + TimestampFormatHeadersOutput, + XmlAttributesInMiddleInput, + XmlAttributesInMiddleOutput, + XmlAttributesInput, + XmlAttributesOnPayloadInput, + XmlAttributesOnPayloadOutput, + XmlAttributesOutput, + XmlBlobsInput, + XmlBlobsOutput, + XmlEmptyBlobsInput, + XmlEmptyBlobsOutput, + XmlEmptyListsInput, + XmlEmptyListsOutput, + XmlEmptyMapsInput, + XmlEmptyMapsOutput, + XmlEmptyStringsInput, + XmlEmptyStringsOutput, + XmlEnumsInput, + XmlEnumsOutput, + XmlIntEnumsInput, + XmlIntEnumsOutput, + XmlListsInput, + XmlListsOutput, + XmlMapWithXmlNamespaceInput, + XmlMapWithXmlNamespaceOutput, + XmlMapsInput, + XmlMapsOutput, + XmlMapsXmlNameInput, + XmlMapsXmlNameOutput, + XmlNamespacesInput, + XmlNamespacesOutput, + XmlTimestampsInput, + XmlTimestampsOutput, + XmlUnionsInput, + XmlUnionsOutput, + ) + class ServiceError(ModeledError): """ @@ -418,105 +556,136 @@ def __getattr__(name: str): return _registry.build(name) -ALL_QUERY_STRING_TYPES = APIOperation( +ALL_QUERY_STRING_TYPES: APIOperation[ + AllQueryStringTypesInput, AllQueryStringTypesOutput +] = APIOperation( static_schema=_SCHEMA_ALL_QUERY_STRING_TYPES, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -BODY_WITH_XML_NAME = APIOperation( - static_schema=_SCHEMA_BODY_WITH_XML_NAME, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +BODY_WITH_XML_NAME: APIOperation[BodyWithXmlNameInput, BodyWithXmlNameOutput] = ( + APIOperation( + static_schema=_SCHEMA_BODY_WITH_XML_NAME, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -CONSTANT_AND_VARIABLE_QUERY_STRING = APIOperation( +CONSTANT_AND_VARIABLE_QUERY_STRING: APIOperation[ + ConstantAndVariableQueryStringInput, ConstantAndVariableQueryStringOutput +] = APIOperation( static_schema=_SCHEMA_CONSTANT_AND_VARIABLE_QUERY_STRING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -CONSTANT_QUERY_STRING = APIOperation( +CONSTANT_QUERY_STRING: APIOperation[ + ConstantQueryStringInput, ConstantQueryStringOutput +] = APIOperation( static_schema=_SCHEMA_CONSTANT_QUERY_STRING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -CONTENT_TYPE_PARAMETERS = APIOperation( +CONTENT_TYPE_PARAMETERS: APIOperation[ + ContentTypeParametersInput, ContentTypeParametersOutput +] = APIOperation( static_schema=_SCHEMA_CONTENT_TYPE_PARAMETERS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -DATETIME_OFFSETS = APIOperation( - static_schema=_SCHEMA_DATETIME_OFFSETS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +DATETIME_OFFSETS: APIOperation[DatetimeOffsetsInput, DatetimeOffsetsOutput] = ( + APIOperation( + static_schema=_SCHEMA_DATETIME_OFFSETS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -EMPTY_INPUT_AND_EMPTY_OUTPUT = APIOperation( +EMPTY_INPUT_AND_EMPTY_OUTPUT: APIOperation[ + EmptyInputAndEmptyOutputInput, EmptyInputAndEmptyOutputOutput +] = APIOperation( static_schema=_SCHEMA_EMPTY_INPUT_AND_EMPTY_OUTPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -ENDPOINT_OPERATION = APIOperation( - static_schema=_SCHEMA_ENDPOINT_OPERATION, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +ENDPOINT_OPERATION: APIOperation[EndpointOperationInput, EndpointOperationOutput] = ( + APIOperation( + static_schema=_SCHEMA_ENDPOINT_OPERATION, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -ENDPOINT_WITH_HOST_LABEL_HEADER_OPERATION = APIOperation( +ENDPOINT_WITH_HOST_LABEL_HEADER_OPERATION: APIOperation[ + EndpointWithHostLabelHeaderOperationInput, + EndpointWithHostLabelHeaderOperationOutput, +] = APIOperation( static_schema=_SCHEMA_ENDPOINT_WITH_HOST_LABEL_HEADER_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -ENDPOINT_WITH_HOST_LABEL_OPERATION = APIOperation( +ENDPOINT_WITH_HOST_LABEL_OPERATION: APIOperation[ + EndpointWithHostLabelOperationInput, EndpointWithHostLabelOperationOutput +] = APIOperation( static_schema=_SCHEMA_ENDPOINT_WITH_HOST_LABEL_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -FLATTENED_XML_MAP = APIOperation( - static_schema=_SCHEMA_FLATTENED_XML_MAP, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +FLATTENED_XML_MAP: APIOperation[FlattenedXmlMapInput, FlattenedXmlMapOutput] = ( + APIOperation( + static_schema=_SCHEMA_FLATTENED_XML_MAP, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -FLATTENED_XML_MAP_WITH_XML_NAME = APIOperation( +FLATTENED_XML_MAP_WITH_XML_NAME: APIOperation[ + FlattenedXmlMapWithXmlNameInput, FlattenedXmlMapWithXmlNameOutput +] = APIOperation( static_schema=_SCHEMA_FLATTENED_XML_MAP_WITH_XML_NAME, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -FLATTENED_XML_MAP_WITH_XML_NAMESPACE = APIOperation( +FLATTENED_XML_MAP_WITH_XML_NAMESPACE: APIOperation[ + FlattenedXmlMapWithXmlNamespaceInput, FlattenedXmlMapWithXmlNamespaceOutput +] = APIOperation( static_schema=_SCHEMA_FLATTENED_XML_MAP_WITH_XML_NAMESPACE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -FRACTIONAL_SECONDS = APIOperation( - static_schema=_SCHEMA_FRACTIONAL_SECONDS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +FRACTIONAL_SECONDS: APIOperation[FractionalSecondsInput, FractionalSecondsOutput] = ( + APIOperation( + static_schema=_SCHEMA_FRACTIONAL_SECONDS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -GREETING_WITH_ERRORS = APIOperation( +GREETING_WITH_ERRORS: APIOperation[ + GreetingWithErrorsInput, GreetingWithErrorsOutput +] = APIOperation( static_schema=_SCHEMA_GREETING_WITH_ERRORS, model_registry=_registry, error_ids=[ @@ -526,352 +695,428 @@ def __getattr__(name: str): effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_EMPTY_PREFIX_HEADERS = APIOperation( +HTTP_EMPTY_PREFIX_HEADERS: APIOperation[ + HttpEmptyPrefixHeadersInput, HttpEmptyPrefixHeadersOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_EMPTY_PREFIX_HEADERS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_ENUM_PAYLOAD = APIOperation( - static_schema=_SCHEMA_HTTP_ENUM_PAYLOAD, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +HTTP_ENUM_PAYLOAD: APIOperation[HttpEnumPayloadInput, HttpEnumPayloadOutput] = ( + APIOperation( + static_schema=_SCHEMA_HTTP_ENUM_PAYLOAD, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -HTTP_PAYLOAD_TRAITS = APIOperation( - static_schema=_SCHEMA_HTTP_PAYLOAD_TRAITS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +HTTP_PAYLOAD_TRAITS: APIOperation[HttpPayloadTraitsInput, HttpPayloadTraitsOutput] = ( + APIOperation( + static_schema=_SCHEMA_HTTP_PAYLOAD_TRAITS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -HTTP_PAYLOAD_TRAITS_WITH_MEDIA_TYPE = APIOperation( +HTTP_PAYLOAD_TRAITS_WITH_MEDIA_TYPE: APIOperation[ + HttpPayloadTraitsWithMediaTypeInput, HttpPayloadTraitsWithMediaTypeOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_PAYLOAD_TRAITS_WITH_MEDIA_TYPE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_PAYLOAD_WITH_MEMBER_XML_NAME = APIOperation( +HTTP_PAYLOAD_WITH_MEMBER_XML_NAME: APIOperation[ + HttpPayloadWithMemberXmlNameInput, HttpPayloadWithMemberXmlNameOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_PAYLOAD_WITH_MEMBER_XML_NAME, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_PAYLOAD_WITH_STRUCTURE = APIOperation( +HTTP_PAYLOAD_WITH_STRUCTURE: APIOperation[ + HttpPayloadWithStructureInput, HttpPayloadWithStructureOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_PAYLOAD_WITH_STRUCTURE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_PAYLOAD_WITH_UNION = APIOperation( +HTTP_PAYLOAD_WITH_UNION: APIOperation[ + HttpPayloadWithUnionInput, HttpPayloadWithUnionOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_PAYLOAD_WITH_UNION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_PAYLOAD_WITH_XML_NAME = APIOperation( +HTTP_PAYLOAD_WITH_XML_NAME: APIOperation[ + HttpPayloadWithXmlNameInput, HttpPayloadWithXmlNameOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_PAYLOAD_WITH_XML_NAME, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_PAYLOAD_WITH_XML_NAMESPACE = APIOperation( +HTTP_PAYLOAD_WITH_XML_NAMESPACE: APIOperation[ + HttpPayloadWithXmlNamespaceInput, HttpPayloadWithXmlNamespaceOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_PAYLOAD_WITH_XML_NAMESPACE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_PAYLOAD_WITH_XML_NAMESPACE_AND_PREFIX = APIOperation( +HTTP_PAYLOAD_WITH_XML_NAMESPACE_AND_PREFIX: APIOperation[ + HttpPayloadWithXmlNamespaceAndPrefixInput, + HttpPayloadWithXmlNamespaceAndPrefixOutput, +] = APIOperation( static_schema=_SCHEMA_HTTP_PAYLOAD_WITH_XML_NAMESPACE_AND_PREFIX, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_PREFIX_HEADERS = APIOperation( - static_schema=_SCHEMA_HTTP_PREFIX_HEADERS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +HTTP_PREFIX_HEADERS: APIOperation[HttpPrefixHeadersInput, HttpPrefixHeadersOutput] = ( + APIOperation( + static_schema=_SCHEMA_HTTP_PREFIX_HEADERS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -HTTP_REQUEST_WITH_FLOAT_LABELS = APIOperation( +HTTP_REQUEST_WITH_FLOAT_LABELS: APIOperation[ + HttpRequestWithFloatLabelsInput, HttpRequestWithFloatLabelsOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_REQUEST_WITH_FLOAT_LABELS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_REQUEST_WITH_GREEDY_LABEL_IN_PATH = APIOperation( +HTTP_REQUEST_WITH_GREEDY_LABEL_IN_PATH: APIOperation[ + HttpRequestWithGreedyLabelInPathInput, HttpRequestWithGreedyLabelInPathOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_REQUEST_WITH_GREEDY_LABEL_IN_PATH, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_REQUEST_WITH_LABELS = APIOperation( +HTTP_REQUEST_WITH_LABELS: APIOperation[ + HttpRequestWithLabelsInput, HttpRequestWithLabelsOutput +] = APIOperation( static_schema=_SCHEMA_HTTP_REQUEST_WITH_LABELS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_REQUEST_WITH_LABELS_AND_TIMESTAMP_FORMAT = APIOperation( +HTTP_REQUEST_WITH_LABELS_AND_TIMESTAMP_FORMAT: APIOperation[ + HttpRequestWithLabelsAndTimestampFormatInput, + HttpRequestWithLabelsAndTimestampFormatOutput, +] = APIOperation( static_schema=_SCHEMA_HTTP_REQUEST_WITH_LABELS_AND_TIMESTAMP_FORMAT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -HTTP_RESPONSE_CODE = APIOperation( - static_schema=_SCHEMA_HTTP_RESPONSE_CODE, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +HTTP_RESPONSE_CODE: APIOperation[HttpResponseCodeInput, HttpResponseCodeOutput] = ( + APIOperation( + static_schema=_SCHEMA_HTTP_RESPONSE_CODE, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -HTTP_STRING_PAYLOAD = APIOperation( - static_schema=_SCHEMA_HTTP_STRING_PAYLOAD, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +HTTP_STRING_PAYLOAD: APIOperation[HttpStringPayloadInput, HttpStringPayloadOutput] = ( + APIOperation( + static_schema=_SCHEMA_HTTP_STRING_PAYLOAD, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -IGNORE_QUERY_PARAMS_IN_RESPONSE = APIOperation( +IGNORE_QUERY_PARAMS_IN_RESPONSE: APIOperation[ + IgnoreQueryParamsInResponseInput, IgnoreQueryParamsInResponseOutput +] = APIOperation( static_schema=_SCHEMA_IGNORE_QUERY_PARAMS_IN_RESPONSE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -INPUT_AND_OUTPUT_WITH_HEADERS = APIOperation( +INPUT_AND_OUTPUT_WITH_HEADERS: APIOperation[ + InputAndOutputWithHeadersInput, InputAndOutputWithHeadersOutput +] = APIOperation( static_schema=_SCHEMA_INPUT_AND_OUTPUT_WITH_HEADERS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NESTED_XML_MAPS = APIOperation( +NESTED_XML_MAPS: APIOperation[NestedXmlMapsInput, NestedXmlMapsOutput] = APIOperation( static_schema=_SCHEMA_NESTED_XML_MAPS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NESTED_XML_MAP_WITH_XML_NAME = APIOperation( +NESTED_XML_MAP_WITH_XML_NAME: APIOperation[ + NestedXmlMapWithXmlNameInput, NestedXmlMapWithXmlNameOutput +] = APIOperation( static_schema=_SCHEMA_NESTED_XML_MAP_WITH_XML_NAME, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NO_INPUT_AND_NO_OUTPUT = APIOperation( +NO_INPUT_AND_NO_OUTPUT: APIOperation[ + NoInputAndNoOutputInput, NoInputAndNoOutputOutput +] = APIOperation( static_schema=_SCHEMA_NO_INPUT_AND_NO_OUTPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NO_INPUT_AND_OUTPUT = APIOperation( - static_schema=_SCHEMA_NO_INPUT_AND_OUTPUT, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +NO_INPUT_AND_OUTPUT: APIOperation[NoInputAndOutputInput, NoInputAndOutputOutput] = ( + APIOperation( + static_schema=_SCHEMA_NO_INPUT_AND_OUTPUT, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -NULL_AND_EMPTY_HEADERS_CLIENT = APIOperation( +NULL_AND_EMPTY_HEADERS_CLIENT: APIOperation[ + NullAndEmptyHeadersClientInput, NullAndEmptyHeadersClientOutput +] = APIOperation( static_schema=_SCHEMA_NULL_AND_EMPTY_HEADERS_CLIENT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -NULL_AND_EMPTY_HEADERS_SERVER = APIOperation( +NULL_AND_EMPTY_HEADERS_SERVER: APIOperation[ + NullAndEmptyHeadersServerInput, NullAndEmptyHeadersServerOutput +] = APIOperation( static_schema=_SCHEMA_NULL_AND_EMPTY_HEADERS_SERVER, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -OMITS_NULL_SERIALIZES_EMPTY_STRING = APIOperation( +OMITS_NULL_SERIALIZES_EMPTY_STRING: APIOperation[ + OmitsNullSerializesEmptyStringInput, OmitsNullSerializesEmptyStringOutput +] = APIOperation( static_schema=_SCHEMA_OMITS_NULL_SERIALIZES_EMPTY_STRING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -PUT_WITH_CONTENT_ENCODING = APIOperation( +PUT_WITH_CONTENT_ENCODING: APIOperation[ + PutWithContentEncodingInput, PutWithContentEncodingOutput +] = APIOperation( static_schema=_SCHEMA_PUT_WITH_CONTENT_ENCODING, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL = APIOperation( +QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL: APIOperation[ + QueryIdempotencyTokenAutoFillInput, QueryIdempotencyTokenAutoFillOutput +] = APIOperation( static_schema=_SCHEMA_QUERY_IDEMPOTENCY_TOKEN_AUTO_FILL, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_PARAMS_AS_STRING_LIST_MAP = APIOperation( +QUERY_PARAMS_AS_STRING_LIST_MAP: APIOperation[ + QueryParamsAsStringListMapInput, QueryParamsAsStringListMapOutput +] = APIOperation( static_schema=_SCHEMA_QUERY_PARAMS_AS_STRING_LIST_MAP, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -QUERY_PRECEDENCE = APIOperation( - static_schema=_SCHEMA_QUERY_PRECEDENCE, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +QUERY_PRECEDENCE: APIOperation[QueryPrecedenceInput, QueryPrecedenceOutput] = ( + APIOperation( + static_schema=_SCHEMA_QUERY_PRECEDENCE, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -SIMPLE_SCALAR_PROPERTIES = APIOperation( +SIMPLE_SCALAR_PROPERTIES: APIOperation[ + SimpleScalarPropertiesInput, SimpleScalarPropertiesOutput +] = APIOperation( static_schema=_SCHEMA_SIMPLE_SCALAR_PROPERTIES, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -TIMESTAMP_FORMAT_HEADERS = APIOperation( +TIMESTAMP_FORMAT_HEADERS: APIOperation[ + TimestampFormatHeadersInput, TimestampFormatHeadersOutput +] = APIOperation( static_schema=_SCHEMA_TIMESTAMP_FORMAT_HEADERS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_ATTRIBUTES = APIOperation( +XML_ATTRIBUTES: APIOperation[XmlAttributesInput, XmlAttributesOutput] = APIOperation( static_schema=_SCHEMA_XML_ATTRIBUTES, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_ATTRIBUTES_IN_MIDDLE = APIOperation( +XML_ATTRIBUTES_IN_MIDDLE: APIOperation[ + XmlAttributesInMiddleInput, XmlAttributesInMiddleOutput +] = APIOperation( static_schema=_SCHEMA_XML_ATTRIBUTES_IN_MIDDLE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_ATTRIBUTES_ON_PAYLOAD = APIOperation( +XML_ATTRIBUTES_ON_PAYLOAD: APIOperation[ + XmlAttributesOnPayloadInput, XmlAttributesOnPayloadOutput +] = APIOperation( static_schema=_SCHEMA_XML_ATTRIBUTES_ON_PAYLOAD, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_BLOBS = APIOperation( +XML_BLOBS: APIOperation[XmlBlobsInput, XmlBlobsOutput] = APIOperation( static_schema=_SCHEMA_XML_BLOBS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_EMPTY_BLOBS = APIOperation( +XML_EMPTY_BLOBS: APIOperation[XmlEmptyBlobsInput, XmlEmptyBlobsOutput] = APIOperation( static_schema=_SCHEMA_XML_EMPTY_BLOBS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_EMPTY_LISTS = APIOperation( +XML_EMPTY_LISTS: APIOperation[XmlEmptyListsInput, XmlEmptyListsOutput] = APIOperation( static_schema=_SCHEMA_XML_EMPTY_LISTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_EMPTY_MAPS = APIOperation( +XML_EMPTY_MAPS: APIOperation[XmlEmptyMapsInput, XmlEmptyMapsOutput] = APIOperation( static_schema=_SCHEMA_XML_EMPTY_MAPS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_EMPTY_STRINGS = APIOperation( - static_schema=_SCHEMA_XML_EMPTY_STRINGS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +XML_EMPTY_STRINGS: APIOperation[XmlEmptyStringsInput, XmlEmptyStringsOutput] = ( + APIOperation( + static_schema=_SCHEMA_XML_EMPTY_STRINGS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -XML_ENUMS = APIOperation( +XML_ENUMS: APIOperation[XmlEnumsInput, XmlEnumsOutput] = APIOperation( static_schema=_SCHEMA_XML_ENUMS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_INT_ENUMS = APIOperation( +XML_INT_ENUMS: APIOperation[XmlIntEnumsInput, XmlIntEnumsOutput] = APIOperation( static_schema=_SCHEMA_XML_INT_ENUMS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_LISTS = APIOperation( +XML_LISTS: APIOperation[XmlListsInput, XmlListsOutput] = APIOperation( static_schema=_SCHEMA_XML_LISTS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_MAPS = APIOperation( +XML_MAPS: APIOperation[XmlMapsInput, XmlMapsOutput] = APIOperation( static_schema=_SCHEMA_XML_MAPS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_MAPS_XML_NAME = APIOperation( - static_schema=_SCHEMA_XML_MAPS_XML_NAME, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +XML_MAPS_XML_NAME: APIOperation[XmlMapsXmlNameInput, XmlMapsXmlNameOutput] = ( + APIOperation( + static_schema=_SCHEMA_XML_MAPS_XML_NAME, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) -XML_MAP_WITH_XML_NAMESPACE = APIOperation( +XML_MAP_WITH_XML_NAMESPACE: APIOperation[ + XmlMapWithXmlNamespaceInput, XmlMapWithXmlNamespaceOutput +] = APIOperation( static_schema=_SCHEMA_XML_MAP_WITH_XML_NAMESPACE, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_NAMESPACES = APIOperation( +XML_NAMESPACES: APIOperation[XmlNamespacesInput, XmlNamespacesOutput] = APIOperation( static_schema=_SCHEMA_XML_NAMESPACES, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_TIMESTAMPS = APIOperation( +XML_TIMESTAMPS: APIOperation[XmlTimestampsInput, XmlTimestampsOutput] = APIOperation( static_schema=_SCHEMA_XML_TIMESTAMPS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -XML_UNIONS = APIOperation( +XML_UNIONS: APIOperation[XmlUnionsInput, XmlUnionsOutput] = APIOperation( static_schema=_SCHEMA_XML_UNIONS, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("aws.auth#sigv4")], ) -RECURSIVE_SHAPES = APIOperation( - static_schema=_SCHEMA_RECURSIVE_SHAPES, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("aws.auth#sigv4")], +RECURSIVE_SHAPES: APIOperation[RecursiveShapesInput, RecursiveShapesOutput] = ( + APIOperation( + static_schema=_SCHEMA_RECURSIVE_SHAPES, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("aws.auth#sigv4")], + ) ) diff --git a/codegen-output/rpcv2-cbor/src/rpcv2cbor/models.py b/codegen-output/rpcv2-cbor/src/rpcv2cbor/models.py index 0288e3664..cdc362257 100644 --- a/codegen-output/rpcv2-cbor/src/rpcv2cbor/models.py +++ b/codegen-output/rpcv2-cbor/src/rpcv2cbor/models.py @@ -1,5 +1,7 @@ # Code generated by smithy-python-codegen DO NOT EDIT. +from __future__ import annotations + from ._private import schemas as _schemas from smithy_core._dynamic_models import ModelRegistry from smithy_core.exceptions import ModeledError @@ -23,6 +25,40 @@ SPARSE_NULLS_OPERATION as _SCHEMA_SPARSE_NULLS_OPERATION, ) +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from .models import ( + EmptyInputOutputInput, + EmptyInputOutputOutput, + Float16Input, + Float16Output, + FractionalSecondsInput, + FractionalSecondsOutput, + GreetingWithErrorsInput, + GreetingWithErrorsOutput, + NoInputOutputInput, + NoInputOutputOutput, + OperationWithDefaultsInput, + OperationWithDefaultsOutput, + OptionalInputOutputInput, + OptionalInputOutputOutput, + RecursiveShapesInput, + RecursiveShapesOutput, + RpcV2CborDenseMapsInput, + RpcV2CborDenseMapsOutput, + RpcV2CborListsInput, + RpcV2CborListsOutput, + RpcV2CborSparseMapsInput, + RpcV2CborSparseMapsOutput, + RpcV2CborUnionsInput, + RpcV2CborUnionsOutput, + SimpleScalarPropertiesInput, + SimpleScalarPropertiesOutput, + SparseNullsOperationInput, + SparseNullsOperationOutput, + ) + class ServiceError(ModeledError): """ @@ -145,28 +181,34 @@ def __getattr__(name: str): return _registry.build(name) -EMPTY_INPUT_OUTPUT = APIOperation( - static_schema=_SCHEMA_EMPTY_INPUT_OUTPUT, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("smithy.api#noAuth")], +EMPTY_INPUT_OUTPUT: APIOperation[EmptyInputOutputInput, EmptyInputOutputOutput] = ( + APIOperation( + static_schema=_SCHEMA_EMPTY_INPUT_OUTPUT, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("smithy.api#noAuth")], + ) ) -FLOAT16 = APIOperation( +FLOAT16: APIOperation[Float16Input, Float16Output] = APIOperation( static_schema=_SCHEMA_FLOAT16, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("smithy.api#noAuth")], ) -FRACTIONAL_SECONDS = APIOperation( - static_schema=_SCHEMA_FRACTIONAL_SECONDS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("smithy.api#noAuth")], +FRACTIONAL_SECONDS: APIOperation[FractionalSecondsInput, FractionalSecondsOutput] = ( + APIOperation( + static_schema=_SCHEMA_FRACTIONAL_SECONDS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("smithy.api#noAuth")], + ) ) -GREETING_WITH_ERRORS = APIOperation( +GREETING_WITH_ERRORS: APIOperation[ + GreetingWithErrorsInput, GreetingWithErrorsOutput +] = APIOperation( static_schema=_SCHEMA_GREETING_WITH_ERRORS, model_registry=_registry, error_ids=[ @@ -176,72 +218,90 @@ def __getattr__(name: str): effective_auth_schemes=[ShapeID("smithy.api#noAuth")], ) -NO_INPUT_OUTPUT = APIOperation( +NO_INPUT_OUTPUT: APIOperation[NoInputOutputInput, NoInputOutputOutput] = APIOperation( static_schema=_SCHEMA_NO_INPUT_OUTPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("smithy.api#noAuth")], ) -OPERATION_WITH_DEFAULTS = APIOperation( +OPERATION_WITH_DEFAULTS: APIOperation[ + OperationWithDefaultsInput, OperationWithDefaultsOutput +] = APIOperation( static_schema=_SCHEMA_OPERATION_WITH_DEFAULTS, model_registry=_registry, error_ids=[ShapeID("smithy.framework#ValidationException")], effective_auth_schemes=[ShapeID("smithy.api#noAuth")], ) -OPTIONAL_INPUT_OUTPUT = APIOperation( +OPTIONAL_INPUT_OUTPUT: APIOperation[ + OptionalInputOutputInput, OptionalInputOutputOutput +] = APIOperation( static_schema=_SCHEMA_OPTIONAL_INPUT_OUTPUT, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("smithy.api#noAuth")], ) -RPC_V2_CBOR_DENSE_MAPS = APIOperation( +RPC_V2_CBOR_DENSE_MAPS: APIOperation[ + RpcV2CborDenseMapsInput, RpcV2CborDenseMapsOutput +] = APIOperation( static_schema=_SCHEMA_RPC_V2_CBOR_DENSE_MAPS, model_registry=_registry, error_ids=[ShapeID("smithy.framework#ValidationException")], effective_auth_schemes=[ShapeID("smithy.api#noAuth")], ) -RPC_V2_CBOR_LISTS = APIOperation( - static_schema=_SCHEMA_RPC_V2_CBOR_LISTS, - model_registry=_registry, - error_ids=[ShapeID("smithy.framework#ValidationException")], - effective_auth_schemes=[ShapeID("smithy.api#noAuth")], +RPC_V2_CBOR_LISTS: APIOperation[RpcV2CborListsInput, RpcV2CborListsOutput] = ( + APIOperation( + static_schema=_SCHEMA_RPC_V2_CBOR_LISTS, + model_registry=_registry, + error_ids=[ShapeID("smithy.framework#ValidationException")], + effective_auth_schemes=[ShapeID("smithy.api#noAuth")], + ) ) -RPC_V2_CBOR_SPARSE_MAPS = APIOperation( +RPC_V2_CBOR_SPARSE_MAPS: APIOperation[ + RpcV2CborSparseMapsInput, RpcV2CborSparseMapsOutput +] = APIOperation( static_schema=_SCHEMA_RPC_V2_CBOR_SPARSE_MAPS, model_registry=_registry, error_ids=[ShapeID("smithy.framework#ValidationException")], effective_auth_schemes=[ShapeID("smithy.api#noAuth")], ) -RPC_V2_CBOR_UNIONS = APIOperation( - static_schema=_SCHEMA_RPC_V2_CBOR_UNIONS, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("smithy.api#noAuth")], +RPC_V2_CBOR_UNIONS: APIOperation[RpcV2CborUnionsInput, RpcV2CborUnionsOutput] = ( + APIOperation( + static_schema=_SCHEMA_RPC_V2_CBOR_UNIONS, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("smithy.api#noAuth")], + ) ) -SIMPLE_SCALAR_PROPERTIES = APIOperation( +SIMPLE_SCALAR_PROPERTIES: APIOperation[ + SimpleScalarPropertiesInput, SimpleScalarPropertiesOutput +] = APIOperation( static_schema=_SCHEMA_SIMPLE_SCALAR_PROPERTIES, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("smithy.api#noAuth")], ) -SPARSE_NULLS_OPERATION = APIOperation( +SPARSE_NULLS_OPERATION: APIOperation[ + SparseNullsOperationInput, SparseNullsOperationOutput +] = APIOperation( static_schema=_SCHEMA_SPARSE_NULLS_OPERATION, model_registry=_registry, error_ids=[], effective_auth_schemes=[ShapeID("smithy.api#noAuth")], ) -RECURSIVE_SHAPES = APIOperation( - static_schema=_SCHEMA_RECURSIVE_SHAPES, - model_registry=_registry, - error_ids=[], - effective_auth_schemes=[ShapeID("smithy.api#noAuth")], +RECURSIVE_SHAPES: APIOperation[RecursiveShapesInput, RecursiveShapesOutput] = ( + APIOperation( + static_schema=_SCHEMA_RECURSIVE_SHAPES, + model_registry=_registry, + error_ids=[], + effective_auth_schemes=[ShapeID("smithy.api#noAuth")], + ) ) diff --git a/codegen-output/rpcv2-cbor/src/rpcv2cbor/models.pyi b/codegen-output/rpcv2-cbor/src/rpcv2cbor/models.pyi index aee7fd8ad..02208cb85 100644 --- a/codegen-output/rpcv2-cbor/src/rpcv2cbor/models.pyi +++ b/codegen-output/rpcv2-cbor/src/rpcv2cbor/models.pyi @@ -65,7 +65,7 @@ class ValidationExceptionField(_SerdeShape): class ClientOptionalDefaults(_SerdeShape): """Dataclass for ClientOptionalDefaults structure.""" - member: int | None = ... + member: int = ... @dataclass(kw_only=True) class ComplexError(ServiceError, _SerdeShape): @@ -92,29 +92,29 @@ class ComplexNestedErrorData(_SerdeShape): class Defaults(_SerdeShape): """Dataclass for Defaults structure.""" - default_string: str | None = ... - default_boolean: bool | None = ... - default_list: list[str] | None = ... - default_timestamp: datetime | None = ... - default_blob: bytes | None = ... - default_byte: int | None = ... - default_short: int | None = ... - default_integer: int | None = ... - default_long: int | None = ... - default_float: float | None = ... - default_double: float | None = ... - default_map: dict[str, str] | None = ... - default_enum: str | None = ... - default_int_enum: int | None = ... - empty_string: str | None = ... - false_boolean: bool | None = ... - empty_blob: bytes | None = ... - zero_byte: int | None = ... - zero_short: int | None = ... - zero_integer: int | None = ... - zero_long: int | None = ... - zero_float: float | None = ... - zero_double: float | None = ... + default_string: str = ... + default_boolean: bool = ... + default_list: list[str] = ... + default_timestamp: datetime = ... + default_blob: bytes = ... + default_byte: int = ... + default_short: int = ... + default_integer: int = ... + default_long: int = ... + default_float: float = ... + default_double: float = ... + default_map: dict[str, str] = ... + default_enum: str = ... + default_int_enum: int = ... + empty_string: str = ... + false_boolean: bool = ... + empty_blob: bytes = ... + zero_byte: int = ... + zero_short: int = ... + zero_integer: int = ... + zero_long: int = ... + zero_float: float = ... + zero_double: float = ... @dataclass(kw_only=True) class EmptyInputOutputInput(_SerdeShape): @@ -223,36 +223,36 @@ class OperationWithDefaultsInput(_SerdeShape): defaults: Defaults | None = ... client_optional_defaults: ClientOptionalDefaults | None = ... - top_level_default: str | None = ... - other_top_level_default: int | None = ... + top_level_default: str = ... + other_top_level_default: int = ... @dataclass(kw_only=True) class OperationWithDefaultsOutput(_SerdeShape): """Dataclass for OperationWithDefaultsOutput structure.""" - default_string: str | None = ... - default_boolean: bool | None = ... - default_list: list[str] | None = ... - default_timestamp: datetime | None = ... - default_blob: bytes | None = ... - default_byte: int | None = ... - default_short: int | None = ... - default_integer: int | None = ... - default_long: int | None = ... - default_float: float | None = ... - default_double: float | None = ... - default_map: dict[str, str] | None = ... - default_enum: str | None = ... - default_int_enum: int | None = ... - empty_string: str | None = ... - false_boolean: bool | None = ... - empty_blob: bytes | None = ... - zero_byte: int | None = ... - zero_short: int | None = ... - zero_integer: int | None = ... - zero_long: int | None = ... - zero_float: float | None = ... - zero_double: float | None = ... + default_string: str = ... + default_boolean: bool = ... + default_list: list[str] = ... + default_timestamp: datetime = ... + default_blob: bytes = ... + default_byte: int = ... + default_short: int = ... + default_integer: int = ... + default_long: int = ... + default_float: float = ... + default_double: float = ... + default_map: dict[str, str] = ... + default_enum: str = ... + default_int_enum: int = ... + empty_string: str = ... + false_boolean: bool = ... + empty_blob: bytes = ... + zero_byte: int = ... + zero_short: int = ... + zero_integer: int = ... + zero_long: int = ... + zero_float: float = ... + zero_double: float = ... response_metadata: ResponseMetadata = ... """ Metadata about the response that produced this output. diff --git a/codegen/core/src/main/java/software/amazon/smithy/python/codegen/ClientGenerator.java b/codegen/core/src/main/java/software/amazon/smithy/python/codegen/ClientGenerator.java index 45f2c1dcd..bb330be10 100644 --- a/codegen/core/src/main/java/software/amazon/smithy/python/codegen/ClientGenerator.java +++ b/codegen/core/src/main/java/software/amazon/smithy/python/codegen/ClientGenerator.java @@ -393,7 +393,7 @@ private void generateEventStreamOperation(PythonWriter writer, OperationShape op if (inputStreamSymbol.isPresent()) { if (outputStreamSymbol.isPresent()) { writer.putContext("duplexEventStream", RuntimeTypes.DUPLEX_EVENT_STREAM); - var outputDocs = "A `DuplexEventStream` for bidirectional streaming."; + var outputDocs = "An `AsyncDuplexEventStream` for bidirectional streaming."; writer.write(""" async def ${operationName:L}( self, @@ -420,7 +420,7 @@ private void generateEventStreamOperation(PythonWriter writer, OperationShape op writer.consumer(w -> writeDefaultOperationPlugins(w, operation))); } else { writer.putContext("inputEventStream", RuntimeTypes.INPUT_EVENT_STREAM); - var outputDocs = "An `InputEventStream` for client-to-server streaming."; + var outputDocs = "An `AsyncInputEventStream` for client-to-server streaming."; writer.write(""" async def ${operationName:L}( self, @@ -446,7 +446,7 @@ private void generateEventStreamOperation(PythonWriter writer, OperationShape op } } else { writer.putContext("outputEventStream", RuntimeTypes.OUTPUT_EVENT_STREAM); - var outputDocs = "An `OutputEventStream` for server-to-client streaming."; + var outputDocs = "An `AsyncOutputEventStream` for server-to-client streaming."; writer.write(""" async def ${operationName:L}( self, diff --git a/codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/ModelStubGenerator.java b/codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/ModelStubGenerator.java index 1f63795c8..ae846adfa 100644 --- a/codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/ModelStubGenerator.java +++ b/codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/ModelStubGenerator.java @@ -16,6 +16,7 @@ import software.amazon.smithy.model.shapes.Shape; import software.amazon.smithy.model.shapes.StructureShape; import software.amazon.smithy.model.shapes.UnionShape; +import software.amazon.smithy.model.traits.DefaultTrait; import software.amazon.smithy.model.traits.DocumentationTrait; import software.amazon.smithy.model.traits.EnumValueTrait; import software.amazon.smithy.model.traits.ErrorTrait; @@ -127,6 +128,8 @@ private void writeStruct(PythonWriter writer, StructureShape shape) { && !OperationIndex.of(model).isInputStructure(shape); if (mandatory) { writer.write("$L: $T", memberName, memberTypeSymbol(member)); + } else if (hasNonNullDefault(member)) { + writer.write("$L: $T = ...", memberName, memberTypeSymbol(member)); } else { writer.write("$L: $T | None = ...", memberName, memberTypeSymbol(member)); } @@ -145,6 +148,17 @@ private void writeStruct(PythonWriter writer, StructureShape shape) { writer.write(""); } + // Must agree with StructureGenerator: a defaulted member is never None at runtime, + // except a non-document `@default: null`; a document default is a Document(None). + private boolean hasNonNullDefault(MemberShape member) { + var defaultTrait = member.getTrait(DefaultTrait.class); + if (defaultTrait.isEmpty()) { + return false; + } + return model.expectShape(member.getTarget()).isDocumentShape() + || !defaultTrait.get().toNode().isNullNode(); + } + // The runtime attaches the DocumentationTrait text at build time; the stub is the // only surface IDEs/pyright read, so docstrings must be emitted here too. private void writeShapeDocs(PythonWriter writer, Shape shape, String fallback) { diff --git a/codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/OperationGenerator.java b/codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/OperationGenerator.java index 1480903b4..42d4d2b56 100644 --- a/codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/OperationGenerator.java +++ b/codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/OperationGenerator.java @@ -40,21 +40,30 @@ public void run() { writer.addLocallyDefinedSymbol(opSymbol); writer.addDependency(SmithyPythonDependency.SMITHY_CORE); + // The model classes exist only in the generated .pyi (models.py builds them + // lazily), so they are imported for type checking alone, which resolves to it. + var inputSymbol = symbolProvider.toSymbol(model.expectShape(shape.getInputShape())); + var outputSymbol = symbolProvider.toSymbol(model.expectShape(shape.getOutputShape())); + var imports = writer.getImportContainer(); + imports.addTypeCheckingImport(inputSymbol.getNamespace(), inputSymbol.getName(), inputSymbol.getName()); + imports.addTypeCheckingImport(outputSymbol.getNamespace(), outputSymbol.getName(), outputSymbol.getName()); writer.write(""" - $1L = $2T( - static_schema = $3T, + $1L: $2T[$3L, $4L] = $2T( + static_schema = $5T, model_registry = _registry, error_ids = [ - $4C + $6C ], effective_auth_schemes = [ - $5C + $7C ], ) """, opSymbol.getName(), RuntimeTypes.API_OPERATION, + inputSymbol.getName(), + outputSymbol.getName(), opSymbol.expectProperty(SymbolProperties.SCHEMA), writer.consumer(this::writeErrorIds), writer.consumer(this::writeAuthSchemes)); diff --git a/codegen/core/src/main/java/software/amazon/smithy/python/codegen/writer/ImportDeclarations.java b/codegen/core/src/main/java/software/amazon/smithy/python/codegen/writer/ImportDeclarations.java index 2c364fe69..430e1f387 100644 --- a/codegen/core/src/main/java/software/amazon/smithy/python/codegen/writer/ImportDeclarations.java +++ b/codegen/core/src/main/java/software/amazon/smithy/python/codegen/writer/ImportDeclarations.java @@ -77,6 +77,10 @@ public ImportDeclarations addTypeCheckingImport(String namespace, String name, S } private String relativize(String namespace) { + if (namespace.equals(localNamespace)) { + // A bare "." would name the package, not this module. + return "." + namespace.substring(namespace.lastIndexOf('.') + 1); + } if (namespace.startsWith(localNamespace)) { return "." + namespace.substring(localNamespace.length()); } diff --git a/packages/smithy-aws-core/src/smithy_aws_core/config/__init__.py b/packages/smithy-aws-core/src/smithy_aws_core/config/__init__.py index ded30f5fe..ce68a49f8 100644 --- a/packages/smithy-aws-core/src/smithy_aws_core/config/__init__.py +++ b/packages/smithy-aws-core/src/smithy_aws_core/config/__init__.py @@ -1,8 +1,6 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 -from typing import TYPE_CHECKING, Any - from .context import shared_config_files_exist from .exceptions import ( ConfigError, @@ -13,50 +11,12 @@ from .merged_config import MergedConfig from .types import ConfigSource -if TYPE_CHECKING: - from ..aio.config.aws_config import AsyncAwsConfig, AwsConfigOverrides - from ..aio.config.context import AsyncSharedConfigContext, load_config_async - from ..aio.config.filesystem import AsyncDefaultFileSystem, AsyncFileSystem - __all__ = [ - "AsyncAwsConfig", - "AsyncDefaultFileSystem", - "AsyncFileSystem", - "AsyncSharedConfigContext", - "AwsConfigOverrides", "ConfigError", "ConfigParseError", "ConfigSource", "ConfigValidationError", "MergedConfig", "ProfileNotFoundError", - "load_config_async", "shared_config_files_exist", ] - -# Preserve the pre-relocation public import path without an eager import cycle: -# aio.config.aws_config imports back into this package's exceptions during its own -# initialization, so these relocated symbols are resolved lazily on first access. -_RELOCATED = { - "AsyncAwsConfig": "aws_config", - "AwsConfigOverrides": "aws_config", - "AsyncSharedConfigContext": "context", - "load_config_async": "context", - "AsyncDefaultFileSystem": "filesystem", - "AsyncFileSystem": "filesystem", -} - - -def __getattr__(name: str) -> Any: - module = _RELOCATED.get(name) - if module is None: - raise AttributeError(f"module {__name__!r} has no attribute {name!r}") - import importlib - - return getattr(importlib.import_module(f"..aio.config.{module}", __name__), name) - - -# Keep the lazily relocated names reachable via dir() so the public surface is -# discoverable (and recorded by the api-snapshot), not just importable. -def __dir__() -> list[str]: - return [*globals(), *_RELOCATED] diff --git a/packages/smithy-aws-core/src/smithy_aws_core/identity/__init__.py b/packages/smithy-aws-core/src/smithy_aws_core/identity/__init__.py index 61e5025ba..a604dd9aa 100644 --- a/packages/smithy-aws-core/src/smithy_aws_core/identity/__init__.py +++ b/packages/smithy-aws-core/src/smithy_aws_core/identity/__init__.py @@ -2,18 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 from smithy_core.types import PropertyKey -# TODO(sync-api): The shipped public name smithy_aws_core.identity.EnvironmentCredentialsResolver -# TODO(sync-api): is the ASYNC resolver -- the async client pipeline awaits its get_identity, and -# TODO(sync-api): aws-sdk-python's hand-written integration harness imports it from this path and -# TODO(sync-api): passes it to an async client. The sync twin lives at .environment and is NOT -# TODO(sync-api): re-exported here to avoid shadowing that awaitable contract. -# TODO(sync-api): This re-export makes a non-aio module import aio, which the sync-renames design -# TODO(sync-api): forbids; it is the same pre-existing root->aio dependency the branch defers, not a -# TODO(sync-api): new one. Repoint this to the sync twin and drop the aio import once the SDK harness -# TODO(sync-api): imports an async-aware resolver from smithy_aws_core.aio.identity instead. -from ..aio.identity.environment import ( - AsyncEnvironmentCredentialsResolver as EnvironmentCredentialsResolver, -) from .chain import IdentityChainError, UnclaimedSource from .components import ( AWSCredentialsIdentity, @@ -21,6 +9,7 @@ AWSIdentityConfig, AWSIdentityProperties, ) +from .environment import EnvironmentCredentialsResolver from .static import StaticCredentialsResolver __all__ = ( diff --git a/packages/smithy-aws-core/src/smithy_aws_core/utils.py b/packages/smithy-aws-core/src/smithy_aws_core/utils.py index 662bc5444..444fe4bbf 100644 --- a/packages/smithy-aws-core/src/smithy_aws_core/utils.py +++ b/packages/smithy-aws-core/src/smithy_aws_core/utils.py @@ -5,6 +5,8 @@ from smithy_core.documents import Document from smithy_core.response import ResponseMetadata from smithy_core.shapes import ShapeID, ShapeType + +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from smithy_http.aio.interfaces import HTTPResponse from smithy_http.interfaces import Field diff --git a/packages/smithy-aws-event-stream/src/smithy_aws_event_stream/events.py b/packages/smithy-aws-event-stream/src/smithy_aws_event_stream/events.py index 24c858bab..8e11ccd34 100644 --- a/packages/smithy-aws-event-stream/src/smithy_aws_event_stream/events.py +++ b/packages/smithy-aws-event-stream/src/smithy_aws_event_stream/events.py @@ -18,6 +18,7 @@ from types import MappingProxyType from typing import Literal, Self +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from smithy_core.aio.interfaces import AsyncByteStream from smithy_core.interfaces import BytesReader from smithy_core.types import TimestampFormat diff --git a/packages/smithy-core/src/smithy_core/aio/eventstream.py b/packages/smithy-core/src/smithy_core/aio/eventstream.py index ceb163476..c8b5a5273 100644 --- a/packages/smithy-core/src/smithy_core/aio/eventstream.py +++ b/packages/smithy-core/src/smithy_core/aio/eventstream.py @@ -11,9 +11,6 @@ "AsyncDuplexEventStream", "AsyncInputEventStream", "AsyncOutputEventStream", - "DuplexEventStream", - "InputEventStream", - "OutputEventStream", ] @@ -240,10 +237,3 @@ async def __aenter__(self) -> Self: async def __aexit__(self, exc_type: Any, exc_value: Any, traceback: Any): await self.close() - - -# TODO(sync-renames): drop once aws-sdk-python's hand-written integration test -# harness imports the Async*-prefixed names instead of these pre-rename ones. -DuplexEventStream = AsyncDuplexEventStream -InputEventStream = AsyncInputEventStream -OutputEventStream = AsyncOutputEventStream diff --git a/packages/smithy-core/src/smithy_core/deserializers.py b/packages/smithy-core/src/smithy_core/deserializers.py index 376e20729..6e5f18b12 100644 --- a/packages/smithy-core/src/smithy_core/deserializers.py +++ b/packages/smithy-core/src/smithy_core/deserializers.py @@ -8,6 +8,7 @@ from .exceptions import SmithyError, UnsupportedStreamError if TYPE_CHECKING: + # TODO(sync-api): root module imports aio; move once a sync counterpart exists. from .aio.interfaces import StreamingBlob as _Stream from .documents import Document from .schemas import Schema diff --git a/packages/smithy-core/src/smithy_core/serializers.py b/packages/smithy-core/src/smithy_core/serializers.py index 77fb61ea3..c3872d4e7 100644 --- a/packages/smithy-core/src/smithy_core/serializers.py +++ b/packages/smithy-core/src/smithy_core/serializers.py @@ -10,6 +10,7 @@ from .exceptions import SmithyError, UnsupportedStreamError if TYPE_CHECKING: + # TODO(sync-api): root module imports aio; move once a sync counterpart exists. from .aio.interfaces import StreamingBlob as _Stream from .documents import Document from .schemas import Schema diff --git a/packages/smithy-http/README.md b/packages/smithy-http/README.md index 8b797f423..ab0bb6023 100644 --- a/packages/smithy-http/README.md +++ b/packages/smithy-http/README.md @@ -10,7 +10,7 @@ The `smithy_http.testing` module provides shared utilities for testing HTTP func ### MockHTTPClient -The `MockHTTPClient` allows you to test smithy-python clients without making actual network calls. It implements the `HTTPClient` interface and provides configurable responses for functional testing. +The `MockHTTPClient` allows you to test smithy-python clients without making actual network calls. It implements the `AsyncHTTPClient` interface and provides configurable responses for functional testing. #### Basic Usage diff --git a/packages/smithy-http/src/smithy_http/aio/__init__.py b/packages/smithy-http/src/smithy_http/aio/__init__.py index 6daa2e852..1db9641af 100644 --- a/packages/smithy-http/src/smithy_http/aio/__init__.py +++ b/packages/smithy-http/src/smithy_http/aio/__init__.py @@ -34,7 +34,7 @@ class HTTPRequest(http_aio_interfaces.HTTPRequest): class HTTPResponse: """Basic implementation of :py:class:`.interfaces.HTTPResponse`. - Implementations of :py:class:`.interfaces.HTTPClient` may return instances of this + Implementations of :py:class:`.interfaces.AsyncHTTPClient` may return instances of this class or of custom response implementations. """ diff --git a/packages/smithy-http/src/smithy_http/aio/interfaces/__init__.py b/packages/smithy-http/src/smithy_http/aio/interfaces/__init__.py index c38ab71b3..ed929ecc8 100644 --- a/packages/smithy-http/src/smithy_http/aio/interfaces/__init__.py +++ b/packages/smithy-http/src/smithy_http/aio/interfaces/__init__.py @@ -15,7 +15,6 @@ __all__ = [ "AsyncHTTPClient", - "HTTPClient", "HTTPErrorIdentifier", "HTTPRequest", "HTTPResponse", @@ -102,11 +101,6 @@ async def send( ... -# TODO(sync-renames): drop once aws-sdk-python's hand-written integration test -# harness imports AsyncHTTPClient instead of the pre-rename HTTPClient name. -HTTPClient = AsyncHTTPClient - - class HTTPErrorIdentifier: """A class that uses HTTP response metadata to identify errors. diff --git a/packages/smithy-http/src/smithy_http/deserializers.py b/packages/smithy-http/src/smithy_http/deserializers.py index 66e5b7f17..9e537c169 100644 --- a/packages/smithy-http/src/smithy_http/deserializers.py +++ b/packages/smithy-http/src/smithy_http/deserializers.py @@ -7,7 +7,10 @@ from inspect import iscoroutinefunction from typing import TYPE_CHECKING, Any, TypeGuard +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from smithy_core.aio.interfaces import AsyncByteStream + +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from smithy_core.aio.types import AsyncBytesReader from smithy_core.codecs import Codec from smithy_core.deserializers import ShapeDeserializer, SpecificShapeDeserializer @@ -23,6 +26,7 @@ from smithy_core.types import TimestampFormat from smithy_core.utils import ensure_utc, strict_parse_bool, strict_parse_float +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from .aio.interfaces import HTTPResponse from .bindings import Binding from .interfaces import Field, Fields @@ -30,6 +34,7 @@ from .utils import split_header if TYPE_CHECKING: + # TODO(sync-api): root module imports aio; move once a sync counterpart exists. from smithy_core.aio.interfaces import StreamingBlob as AsyncStreamingBlob from smithy_core.interfaces import StreamingBlob as SyncStreamingBlob diff --git a/packages/smithy-http/src/smithy_http/interceptors/user_agent.py b/packages/smithy-http/src/smithy_http/interceptors/user_agent.py index 4401db14a..81f8aff23 100644 --- a/packages/smithy-http/src/smithy_http/interceptors/user_agent.py +++ b/packages/smithy-http/src/smithy_http/interceptors/user_agent.py @@ -8,6 +8,8 @@ from smithy_core.types import PropertyKey from smithy_http import Field + +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from smithy_http.aio.interfaces import HTTPRequest from smithy_http.user_agent import UserAgent, UserAgentComponent diff --git a/packages/smithy-http/src/smithy_http/serializers.py b/packages/smithy-http/src/smithy_http/serializers.py index 182ae3562..9c135f5a0 100644 --- a/packages/smithy-http/src/smithy_http/serializers.py +++ b/packages/smithy-http/src/smithy_http/serializers.py @@ -12,6 +12,8 @@ from urllib.parse import quote as urlquote from smithy_core import URI + +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from smithy_core.aio.types import AsyncBytesProvider, AsyncBytesReader from smithy_core.codecs import Codec from smithy_core.exceptions import SerializationError @@ -35,8 +37,14 @@ from smithy_core.utils import serialize_float from . import Field, Fields, tuples_to_fields + +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from .aio import HTTPRequest as _HTTPRequest + +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from .aio import HTTPResponse as _HTTPResponse + +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from .aio.interfaces import HTTPRequest, HTTPResponse from .bindings import Binding, RequestBindingMatcher from .schema_extensions import ( @@ -48,6 +56,7 @@ from .utils import join_query_params if TYPE_CHECKING: + # TODO(sync-api): root module imports aio; move once a sync counterpart exists. from smithy_core.aio.interfaces import StreamingBlob as AsyncStreamingBlob diff --git a/packages/smithy-http/src/smithy_http/testing/mockhttp.py b/packages/smithy-http/src/smithy_http/testing/mockhttp.py index 37cb3ea84..be22061c0 100644 --- a/packages/smithy-http/src/smithy_http/testing/mockhttp.py +++ b/packages/smithy-http/src/smithy_http/testing/mockhttp.py @@ -5,10 +5,15 @@ from copy import copy from typing import Any +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from smithy_core.aio.utils import async_list from smithy_http import tuples_to_fields + +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from smithy_http.aio import HTTPResponse + +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from smithy_http.aio.interfaces import AsyncHTTPClient, HTTPRequest from smithy_http.interfaces import HTTPClientConfiguration, HTTPRequestConfiguration @@ -16,7 +21,7 @@ class MockHTTPClient(AsyncHTTPClient): - """Implementation of :py:class:`.interfaces.HTTPClient` solely for testing purposes. + """Implementation of :py:class:`.interfaces.AsyncHTTPClient` solely for testing purposes. Simulates HTTP request/response behavior. Responses are queued in FIFO order and requests are captured for inspection. diff --git a/packages/smithy-http/src/smithy_http/testing/utils.py b/packages/smithy-http/src/smithy_http/testing/utils.py index 62d4815e6..f103752cb 100644 --- a/packages/smithy-http/src/smithy_http/testing/utils.py +++ b/packages/smithy-http/src/smithy_http/testing/utils.py @@ -4,6 +4,8 @@ from smithy_core import URI from smithy_http import tuples_to_fields + +# TODO(sync-api): root module imports aio; move once a sync counterpart exists. from smithy_http.aio import HTTPRequest __all__ = ["create_test_request"] diff --git a/scripts/api-snapshot/api.json b/scripts/api-snapshot/api.json index b84b7ef58..aeee76c20 100644 --- a/scripts/api-snapshot/api.json +++ b/scripts/api-snapshot/api.json @@ -406,11 +406,6 @@ "SigV4AuthScheme": "class" }, "smithy_aws_core.config": { - "AsyncAwsConfig": "rex-class[async]", - "AsyncDefaultFileSystem": "rex-class[async]", - "AsyncFileSystem": "rex-protocol[async]", - "AsyncSharedConfigContext": "rex-class[async]", - "AwsConfigOverrides": "rex-class", "ConfigError": "rex-exception", "ConfigParseError": "rex-exception", "ConfigSource": "rex-class", @@ -420,7 +415,6 @@ "context": "rex-module", "exceptions": "rex-module", "file_parser": "rex-module", - "load_config_async": "rex-function[async]", "merged_config": "rex-module", "shared_config_files_exist": "rex-function", "types": "rex-module", @@ -482,7 +476,7 @@ "AWSIdentityConfig": "rex-protocol", "AWSIdentityProperties": "rex-class", "AWS_IDENTITY_CONFIG": "PropertyKey", - "EnvironmentCredentialsResolver": "rex-class[async]", + "EnvironmentCredentialsResolver": "rex-class", "IdentityChainError": "rex-exception", "PropertyKey": "rex-class", "StaticCredentialsResolver": "rex-class", @@ -766,9 +760,6 @@ "AsyncInputEventStream": "class[async]", "AsyncOutputEventStream": "class[async]", "DeserializeableShape": "rex-protocol", - "DuplexEventStream": "class[async]", - "InputEventStream": "class[async]", - "OutputEventStream": "class[async]", "SerializeableShape": "rex-protocol" }, "smithy_core.aio.identity": { @@ -1277,7 +1268,6 @@ "AsyncClientTransport": "rex-protocol[async]", "AsyncHTTPClient": "protocol[async]", "Fields": "rex-protocol", - "HTTPClient": "protocol[async]", "HTTPClientConfiguration": "rex-class", "HTTPErrorIdentifier": "class", "HTTPRequest": "protocol[async]",