# Stubs for schema (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any
from typing import Optional as _Optional

class SchemaError(Exception):
    autos: Any = ...
    errors: Any = ...
    def __init__(self, autos: Any, errors: _Optional[Any] = ...) -> None: ...
    @property
    def code(self): ...

class SchemaWrongKeyError(SchemaError): ...
class SchemaMissingKeyError(SchemaError): ...
class SchemaOnlyOneAllowedError(SchemaError): ...
class SchemaForbiddenKeyError(SchemaError): ...
class SchemaUnexpectedTypeError(SchemaError): ...

class And:
    def __init__(self, *args: Any, **kw: Any) -> None: ...
    @property
    def args(self): ...
    def validate(self, data: Any): ...

class Or(And):
    only_one: Any = ...
    match_count: int = ...
    def __init__(self, *args: Any, **kwargs: Any) -> None: ...
    def reset(self) -> None: ...
    def validate(self, data: Any): ...

class Regex:
    NAMES: Any = ...
    def __init__(
        self, pattern_str: Any, flags: int = ..., error: _Optional[Any] = ...
    ) -> None: ...
    @property
    def pattern_str(self): ...
    def validate(self, data: Any): ...

class Use:
    def __init__(self, callable_: Any, error: _Optional[Any] = ...) -> None: ...
    def validate(self, data: Any): ...

class Schema:
    as_reference: Any = ...
    def __init__(
        self,
        schema: Any,
        error: _Optional[Any] = ...,
        ignore_extra_keys: bool = ...,
        name: _Optional[Any] = ...,
        description: _Optional[Any] = ...,
        as_reference: bool = ...,
    ) -> None: ...
    @property
    def schema(self): ...
    @property
    def description(self): ...
    @property
    def name(self): ...
    @property
    def ignore_extra_keys(self): ...
    def is_valid(self, data: Any): ...
    def validate(self, data: Any): ...
    def json_schema(self, schema_id: Any, use_refs: bool = ...): ...

class Optional(Schema):
    default: Any = ...
    key: Any = ...
    def __init__(self, *args: Any, **kwargs: Any) -> None: ...
    def __hash__(self): ...
    def __eq__(self, other: Any): ...
    def reset(self) -> None: ...

class Hook(Schema):
    handler: Any = ...
    key: Any = ...
    def __init__(self, *args: Any, **kwargs: Any) -> None: ...

class Forbidden(Hook):
    def __init__(self, *args: Any, **kwargs: Any) -> None: ...

class Literal:
    def __init__(self, value: Any, description: _Optional[Any] = ...) -> None: ...
    @property
    def description(self): ...
    @property
    def schema(self): ...

class Const(Schema):
    def validate(self, data: Any): ...
