from typing import Any, Dict, Optional

from botocore.compat import OrderedDict as OrderedDict
from botocore.exceptions import MissingServiceIdError as MissingServiceIdError
from botocore.exceptions import (
    UndefinedModelAttributeError as UndefinedModelAttributeError,
)
from botocore.utils import CachedProperty as CachedProperty
from botocore.utils import hyphenize_service_id as hyphenize_service_id
from botocore.utils import instance_cache as instance_cache

NOT_SET: object

class NoShapeFoundError(Exception): ...
class InvalidShapeError(Exception): ...
class OperationNotFoundError(Exception): ...
class InvalidShapeReferenceError(Exception): ...

class ServiceId(str):
    def hyphenize(self) -> str: ...

class Shape:
    SERIALIZED_ATTRS: Any = ...
    METADATA_ATTRS: Any = ...
    MAP_TYPE: Any = ...
    name: Any = ...
    type_name: Any = ...
    documentation: Any = ...
    def __init__(
        self, shape_name: Any, shape_model: Any, shape_resolver: Optional[Any] = ...
    ) -> None: ...
    def serialization(self) -> Any: ...
    def metadata(self) -> Any: ...
    def required_members(self) -> Any: ...
    @property
    def event_stream_name(self) -> None: ...

class StructureShape(Shape):
    def members(self) -> Any: ...
    def event_stream_name(self) -> Any: ...
    def error_code(self) -> Any: ...

class ListShape(Shape):
    def member(self) -> Any: ...

class MapShape(Shape):
    def key(self) -> Any: ...
    def value(self) -> Any: ...

class StringShape(Shape):
    def enum(self) -> Any: ...

class ServiceModel:
    metadata: Any = ...
    def __init__(
        self, service_description: Dict[Any, Any], service_name: Optional[str] = ...
    ) -> None: ...
    def shape_for(self, shape_name: Any, member_traits: Optional[Any] = ...) -> Any: ...
    def shape_for_error_code(self, error_code: Any) -> Any: ...
    def resolve_shape_ref(self, shape_ref: Any) -> Any: ...
    def shape_names(self) -> Any: ...
    def error_shapes(self) -> Any: ...
    def operation_model(self, operation_name: Any) -> Any: ...
    def documentation(self) -> Any: ...
    def operation_names(self) -> Any: ...
    def service_name(self) -> Any: ...
    def service_id(self) -> Any: ...
    def signing_name(self) -> Any: ...
    def api_version(self) -> Any: ...
    def protocol(self) -> Any: ...
    def endpoint_prefix(self) -> Any: ...
    def endpoint_discovery_operation(self) -> Any: ...
    def endpoint_discovery_required(self) -> Any: ...
    @property
    def signature_version(self) -> Any: ...
    @signature_version.setter
    def signature_version(self, value: Any) -> None: ...

class OperationModel:
    metadata: Any = ...
    http: Any = ...
    def __init__(
        self, operation_model: Any, service_model: Any, name: Optional[Any] = ...
    ) -> None: ...
    def name(self) -> Any: ...
    @property
    def wire_name(self) -> Any: ...
    @property
    def service_model(self) -> Any: ...
    def documentation(self) -> Any: ...
    def deprecated(self) -> Any: ...
    def endpoint_discovery(self) -> Any: ...
    def is_endpoint_discovery_operation(self) -> Any: ...
    def input_shape(self) -> Any: ...
    def output_shape(self) -> Any: ...
    def idempotent_members(self) -> Any: ...
    def auth_type(self) -> Any: ...
    def error_shapes(self) -> Any: ...
    def endpoint(self) -> Any: ...
    def http_checksum_required(self) -> Any: ...
    def has_event_stream_input(self) -> Any: ...
    def has_event_stream_output(self) -> Any: ...
    def get_event_stream_input(self) -> Any: ...
    def get_event_stream_output(self) -> Any: ...
    def has_streaming_input(self) -> Any: ...
    def has_streaming_output(self) -> Any: ...
    def get_streaming_input(self) -> Any: ...
    def get_streaming_output(self) -> Any: ...

class ShapeResolver:
    SHAPE_CLASSES: Any = ...
    def __init__(self, shape_map: Any) -> None: ...
    def get_shape_by_name(
        self, shape_name: Any, member_traits: Optional[Any] = ...
    ) -> Any: ...
    def resolve_shape_ref(self, shape_ref: Any) -> Any: ...

class UnresolvableShapeMap:
    def get_shape_by_name(
        self, shape_name: Any, member_traits: Optional[Any] = ...
    ) -> None: ...
    def resolve_shape_ref(self, shape_ref: Any) -> None: ...

class DenormalizedStructureBuilder:
    members: Any = ...
    name: Any = ...
    def __init__(self, name: Optional[Any] = ...) -> None: ...
    def with_members(self, members: Any) -> Any: ...
    def build_model(self) -> Any: ...

class ShapeNameGenerator:
    def __init__(self) -> None: ...
    def new_shape_name(self, type_name: Any) -> Any: ...
