import typing
from ._typing import UNASSIGNED as UNASSIGNED, UnassignedType as UnassignedType, check_type as check_type, is_classvar as is_classvar, is_nested_generic_alias as is_nested_generic_alias
from .exceptions import FieldTypeUnassignedError as FieldTypeUnassignedError, InvalidFieldError as InvalidFieldError
from .model import Model as Model
from _typeshed import Incomplete
from collections.abc import Callable as Callable, Mapping
from types import MappingProxyType
from typing import Self

CLASSVAR_PATTERN: Incomplete

def Field(default: typing.Any = ..., default_factory: Callable[[], typing.Any] | UnassignedType = ..., type: typing.Any = ..., init: bool | None = None, choices: list[typing.Any] | None = None, repr: bool = True, compare: bool = True, metadata: Mapping[typing.Any, typing.Any] | None = None) -> typing.Any: ...

class FieldInfo:
    def __init__(self, *, name: str | UnassignedType[str] = ..., default: typing.Any = ..., default_factory: Callable[[], typing.Any] | UnassignedType = ..., type: typing.Any = ..., const: bool = False, init: bool | None = None, choices: typing.Iterable[typing.Any] | None = None, repr: bool = True, compare: bool = True, metadata: Mapping[typing.Any, typing.Any] | None = None) -> None: ...
    @classmethod
    def from_annotation(cls, name: str, type: typing.Any) -> Self: ...
    @classmethod
    def from_namespace(cls, name: str, default: typing.Any, type: typing.Any) -> Self: ...
    @property
    def owner(self) -> type['Model[Self]'] | None: ...
    @property
    def name(self) -> str: ...
    @property
    def type(self) -> type: ...
    @property
    def default(self) -> typing.Any: ...
    @property
    def default_factory(self) -> Callable[[], typing.Any] | UnassignedType: ...
    @property
    def const(self) -> bool: ...
    @property
    def init(self) -> bool | None: ...
    @property
    def repr(self) -> bool: ...
    @property
    def compare(self) -> bool: ...
    @property
    def metadata(self) -> Mapping[typing.Any, typing.Any]: ...
    @property
    def choices(self) -> list[typing.Any]: ...
    @property
    def classfield(self) -> bool: ...
    def __get__(self, instance: Model[Self] | None, owner: type['Model[Self]']) -> typing.Any: ...
    def __set__(self, instance: Model[Self], value: typing.Any) -> None: ...
    def __set_name__(self, owner: type['Model[Self]'], name: str) -> None: ...
    def copy(self) -> FieldInfo: ...
FieldType = typing.TypeVar('FieldType', bound=FieldInfo)
ModelFieldMap = MappingProxyType[str, FieldType]
