from _typeshed import Incomplete
from collections.abc import Callable as Callable, Mapping, MutableMapping, MutableSequence, MutableSet, Sequence, Set
from rcheck.exceptions import BaseException as BaseException, BoolException as BoolException, BytesException as BytesException, FloatException as FloatException, IntException as IntException, MappingException as MappingException, MutableMappingException as MutableMappingException, MutableSequenceException as MutableSequenceException, MutableSequenceOfException as MutableSequenceOfException, MutableSetException as MutableSetException, MutableSetOfException as MutableSetOfException, OptBoolException as OptBoolException, OptBytesException as OptBytesException, OptFloatException as OptFloatException, OptIntException as OptIntException, OptStrException as OptStrException, SequenceException as SequenceException, SequenceOfException as SequenceOfException, SetException as SetException, SetOfException as SetOfException, StrException as StrException
from rcheck.type_utils import convert_tuple_to_union as convert_tuple_to_union, is_optional as is_optional, remove_optional as remove_optional
from typing import Any, Optional, Type, TypeVar, overload

AnyType: Incomplete
T = TypeVar('T')
KT = TypeVar('KT')
VT = TypeVar('VT')

class Check:
    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, *, suppress_and_record: bool) -> None: ...
    def check_str(self, name: str, value: Any, *, description: Optional[str] = ...) -> str: ...
    @overload
    def check_opt_str(self, name: str, value: Any, *, description: Optional[str] = ...) -> str | None: ...
    @overload
    def check_opt_str(self, name: str, value: Any, *, default: str, description: Optional[str] = ...) -> str: ...
    def check_bytes(self, name: str, value: Any, *, description: Optional[str] = ...) -> bytes: ...
    @overload
    def check_opt_bytes(self, name: str, value: Any, *, description: Optional[str] = ...) -> bytes | None: ...
    @overload
    def check_opt_bytes(self, name: str, value: Any, *, default: bytes, description: Optional[str] = ...) -> bytes: ...
    def check_bool(self, name: str, value: Any, *, description: Optional[str] = ...) -> bool: ...
    @overload
    def check_opt_bool(self, name: str, value: Any, *, description: Optional[str] = ...) -> bool | None: ...
    @overload
    def check_opt_bool(self, name: str, value: Any, *, default: bool, description: Optional[str] = ...) -> bool: ...
    def check_int(self, name: str, value: Any, *, description: Optional[str] = ...) -> int: ...
    @overload
    def check_opt_int(self, name: str, value: Any, *, description: Optional[str] = ...) -> int | None: ...
    @overload
    def check_opt_int(self, name: str, value: Any, *, default: int, description: Optional[str] = ...) -> int: ...
    def check_float(self, name: str, value: Any, *, description: Optional[str] = ...) -> float: ...
    @overload
    def check_opt_float(self, name: str, value: Any, *, description: Optional[str] = ...) -> float | None: ...
    @overload
    def check_opt_float(self, name: str, value: Any, *, default: float, description: Optional[str] = ...) -> float: ...
    def check_sequence(self, name: str, value: Any, *, of: Type[T] = ..., custom_of_checker: Optional[Callable[[Any], bool]] = ..., description: Optional[str] = ...) -> Sequence[T]: ...
    @overload
    def check_opt_sequence(self, name: str, value: Any, *, of: Type[T] = ..., default_sequence: Callable[[], Sequence[T]] = ..., custom_of_checker: Optional[Callable[[Any], bool]] = ..., description: Optional[str] = ...) -> Sequence[T]: ...
    @overload
    def check_opt_sequence(self, name: str, value: Any, *, of: Type[T] = ..., default_sequence: Callable[[], Sequence[T] | None] = ..., custom_of_checker: Optional[Callable[[Any], bool]] = ..., description: Optional[str] = ...) -> Sequence[T] | None: ...
    @overload
    def check_mutable_sequence(self, name: str, value: Any, *, of: Type[T] = ..., default_element: Optional[Callable[[], T]] = ..., custom_of_checker: Optional[Callable[[Any], bool]] = ..., description: Optional[str] = ...) -> MutableSequence[T]: ...
    @overload
    def check_mutable_sequence(self, name: str, value: Any, *, default_element: Callable[[], Any], custom_of_checker: Optional[Callable[[Any], bool]] = ..., description: Optional[str] = ...) -> MutableSequence[Any]: ...
    @overload
    def check_opt_mutable_sequence(self, name: str, value: Any, *, of: Type[T] = ..., default_mutable_sequence: Callable[[], MutableSequence[T]] = ..., default_element: Optional[Callable[[], T]] = ..., custom_of_checker: Optional[Callable[[Any], bool]] = ..., description: Optional[str] = ...) -> MutableSequence[T]: ...
    @overload
    def check_opt_mutable_sequence(self, name: str, value: Any, *, of: Type[T] = ..., default_mutable_sequence: Callable[[], MutableSequence[T] | None] = ..., default_element: Optional[Callable[[], T]] = ..., custom_of_checker: Optional[Callable[[Any], bool]] = ..., description: Optional[str] = ...) -> MutableSequence[T] | None: ...
    def check_set(self, name: str, value: Any, *, of: Type[T] = ..., custom_of_checker: Optional[Callable[[Any], bool]] = ..., description: Optional[str] = ...) -> Set[T]: ...
    @overload
    def check_opt_set(self, name: str, value: Any, *, of: Type[T] = ..., default_set: Callable[[], Set[T]] = ..., custom_of_checker: Optional[Callable[[Any], bool]] = ..., description: Optional[str] = ...) -> Set[T]: ...
    @overload
    def check_opt_set(self, name: str, value: Any, *, of: Type[T] = ..., default_set: Callable[[], Set[T] | None] = ..., custom_of_checker: Optional[Callable[[Any], bool]] = ..., description: Optional[str] = ...) -> Set[T] | None: ...
    def check_mutable_set(self, name: str, value: Any, *, of: Type[T] = ..., custom_of_checker: Optional[Callable[[Any], bool]] = ..., description: Optional[str] = ...) -> MutableSet[T]: ...
    @overload
    def check_opt_mutable_set(self, name: str, value: Any, *, of: Type[T] = ..., default_mutable_set: Callable[[], MutableSet[T]] = ..., custom_of_checker: Optional[Callable[[Any], bool]] = ..., description: Optional[str] = ...) -> MutableSet[T]: ...
    @overload
    def check_opt_mutable_set(self, name: str, value: Any, *, of: Type[T] = ..., default_mutable_set: Callable[[], MutableSet[T] | None] = ..., custom_of_checker: Optional[Callable[[Any], bool]] = ..., description: Optional[str] = ...) -> MutableSet[T] | None: ...
    def check_mapping(self, name: str, value: Any, *, keys_of: Type[KT] = ..., values_of: Type[VT] = ..., description: Optional[str] = ...) -> Mapping[KT, VT]: ...
    @overload
    def check_opt_mapping(self, name: str, value: Any, *, default_mapping: Callable[[], Mapping[KT, VT]] = ..., keys_of: Type[KT] = ..., values_of: Type[VT] = ..., description: Optional[str] = ...) -> Mapping[KT, VT]: ...
    @overload
    def check_opt_mapping(self, name: str, value: Any, *, default_mapping: Callable[[], Mapping[KT, VT] | None] = ..., keys_of: Type[KT] = ..., values_of: Type[VT] = ..., description: Optional[str] = ...) -> Mapping[KT, VT] | None: ...
    def check_mutable_mapping(self, name: str, value: Any, *, keys_of: Type[KT] = ..., values_of: Type[VT] = ..., description: Optional[str] = ...) -> MutableMapping[KT, VT]: ...
    @overload
    def check_opt_mutable_mapping(self, name: str, value: Any, *, keys_of: Type[KT] = ..., values_of: Type[VT] = ..., default_mutable_mapping: Callable[[], MutableMapping[KT, VT]] = ..., description: Optional[str] = ...) -> MutableMapping[KT, VT]: ...
    @overload
    def check_opt_mutable_mapping(self, name: str, value: Any, *, keys_of: Type[KT] = ..., values_of: Type[VT] = ..., default_mutable_mapping: Callable[[], MutableMapping[KT, VT] | None] = ..., description: Optional[str] = ...) -> MutableMapping[KT, VT] | None: ...
    @property
    def check_all(self): ...
