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

from typing import Any, Optional

logger = ...  # type: Any
DEBUG_VERBOSE = ...  # type: int
NULL = ...  # type: str
BOOLEAN = ...  # type: str
STRING = ...  # type: str
BYTES = ...  # type: str
INT = ...  # type: str
LONG = ...  # type: str
FLOAT = ...  # type: str
DOUBLE = ...  # type: str
FIXED = ...  # type: str
ENUM = ...  # type: str
RECORD = ...  # type: str
ERROR = ...  # type: str
ARRAY = ...  # type: str
MAP = ...  # type: str
UNION = ...  # type: str
REQUEST = ...  # type: str
ERROR_UNION = ...  # type: str
PRIMITIVE_TYPES = ...  # type: Any
NAMED_TYPES = ...  # type: Any
VALID_TYPES = ...  # type: Any
SCHEMA_RESERVED_PROPS = ...  # type: Any
FIELD_RESERVED_PROPS = ...  # type: Any
VALID_FIELD_SORT_ORDERS = ...  # type: Any

class Error(Exception): ...
class AvroException(Error): ...
class SchemaParseException(AvroException): ...

class ImmutableDict(dict):
    def __init__(self, items: Optional[Any] = ..., **kwargs) -> None: ...
    def __setitem__(self, key, value): ...
    def __delitem__(self, key): ...
    def clear(self): ...
    def update(self, **kwargs): ...
    def pop(self, key, default: Optional[Any] = ...): ...
    def popitem(self): ...

class Schema:
    def __init__(self, type, other_props: Optional[Any] = ...) -> None: ...
    @property
    def name(self): ...
    @property
    def fullname(self): ...
    @property
    def namespace(self): ...
    @property
    def type(self): ...
    @property
    def doc(self): ...
    @property
    def props(self): ...
    @property
    def other_props(self): ...
    def to_json(self, names): ...

class Name:
    def __init__(self, name, namespace: Optional[Any] = ...) -> None: ...
    def __eq__(self, other): ...
    @property
    def simple_name(self): ...
    @property
    def namespace(self): ...
    @property
    def fullname(self): ...

class Names:
    def __init__(self, default_namespace: Optional[Any] = ..., names: Optional[Any] = ...) -> None: ...
    @property
    def names(self): ...
    @property
    def default_namespace(self): ...
    def NewWithDefaultNamespace(self, namespace): ...
    def GetName(self, name, namespace: Optional[Any] = ...): ...
    def has_name(self, name, namespace: Optional[Any] = ...): ...
    def get_name(self, name, namespace: Optional[Any] = ...): ...
    def GetSchema(self, name, namespace: Optional[Any] = ...): ...
    def prune_namespace(self, properties): ...
    def Register(self, schema): ...

class NamedSchema(Schema):
    def __init__(self, type, name, namespace: Optional[Any] = ..., names: Optional[Any] = ..., other_props: Optional[Any] = ...) -> None: ...
    @property
    def avro_name(self): ...
    @property
    def name(self): ...
    @property
    def namespace(self): ...
    @property
    def fullname(self): ...
    def name_ref(self, names): ...

class Field:
    def __init__(self, type, name, index, has_default, default: Any = ..., order: Optional[Any] = ..., names: Optional[Any] = ..., doc: Optional[Any] = ..., other_props: Optional[Any] = ...) -> None: ...
    @property
    def type(self): ...
    @property
    def name(self): ...
    @property
    def index(self): ...
    @property
    def default(self): ...
    @property
    def has_default(self): ...
    @property
    def order(self): ...
    @property
    def doc(self): ...
    @property
    def props(self): ...
    @property
    def other_props(self): ...
    def to_json(self, names: Optional[Any] = ...): ...
    def __eq__(self, that): ...

class PrimitiveSchema(Schema):
    def __init__(self, type, other_props: Optional[Any] = ...) -> None: ...
    @property
    def name(self): ...
    def to_json(self, names: Optional[Any] = ...): ...
    def __eq__(self, that): ...

class FixedSchema(NamedSchema):
    def __init__(self, name, namespace, size, names: Optional[Any] = ..., other_props: Optional[Any] = ...) -> None: ...
    @property
    def size(self): ...
    def to_json(self, names: Optional[Any] = ...): ...
    def __eq__(self, that): ...

class EnumSchema(NamedSchema):
    def __init__(self, name, namespace, symbols, names: Optional[Any] = ..., doc: Optional[Any] = ..., other_props: Optional[Any] = ...) -> None: ...
    @property
    def symbols(self): ...
    def to_json(self, names: Optional[Any] = ...): ...
    def __eq__(self, that): ...

class ArraySchema(Schema):
    def __init__(self, items, other_props: Optional[Any] = ...) -> None: ...
    @property
    def items(self): ...
    def to_json(self, names: Optional[Any] = ...): ...
    def __eq__(self, that): ...

class MapSchema(Schema):
    def __init__(self, values, other_props: Optional[Any] = ...) -> None: ...
    @property
    def values(self): ...
    def to_json(self, names: Optional[Any] = ...): ...
    def __eq__(self, that): ...

class UnionSchema(Schema):
    def __init__(self, schemas) -> None: ...
    @property
    def schemas(self): ...
    def to_json(self, names: Optional[Any] = ...): ...
    def __eq__(self, that): ...

class ErrorUnionSchema(UnionSchema):
    def __init__(self, schemas) -> None: ...
    def to_json(self, names: Optional[Any] = ...): ...

class RecordSchema(NamedSchema):
    def __init__(self, name, namespace, fields: Optional[Any] = ..., make_fields: Optional[Any] = ..., names: Optional[Any] = ..., record_type: Any = ..., doc: Optional[Any] = ..., other_props: Optional[Any] = ...) -> None: ...
    @property
    def fields(self): ...
    @property
    def field_map(self): ...
    def to_json(self, names: Optional[Any] = ...): ...
    def __eq__(self, that): ...

def FilterKeysOut(items, keys): ...
def SchemaFromJSONData(json_data, names: Optional[Any] = ...): ...
def Parse(json_string): ...
