from typing import Tuple, Set, Iterable, List


class Field:
    @property
    def FieldName(self) -> str: ...
    @property
    def Schema(self) -> Schema: ...
    @property
    def SubSchemaGUID(self) -> Guid: ...
    @property
    def ContainerType(self) -> ContainerType: ...
    @property
    def Documentation(self) -> str: ...
    @property
    def ValueType(self) -> Type: ...
    @property
    def KeyType(self) -> Type: ...
    @property
    def SubSchema(self) -> Schema: ...
    @property
    def UnitType(self) -> UnitType: ...
    @property
    def IsValidObject(self) -> bool: ...
    def CompatibleDisplayUnitType(self, type: DisplayUnitType) -> bool: ...
    def CompatibleUnit(self, unitTypeId: ForgeTypeId) -> bool: ...
    def SubEntityReadAccessGranted(self) -> bool: ...
    def SubEntityWriteAccessGranted(self) -> bool: ...
    def GetSpecTypeId(self) -> ForgeTypeId: ...
    def Dispose(self) -> None: ...


class Entity:
    @overload
    def __init__(self, schemaGUID: Guid): ...
    @overload
    def __init__(self, schema: Schema): ...
    @overload
    def __init__(self): ...
    @overload
    def __init__(self, other: Entity): ...
    @overload
    def Get(self, fieldName: str, unitTypeId: ForgeTypeId) -> FieldType: ...
    @overload
    def Get(self, fieldName: str, displayUnits: DisplayUnitType) -> FieldType: ...
    @overload
    def Get(self, field: Field, unitTypeId: ForgeTypeId) -> FieldType: ...
    @overload
    def Get(self, field: Field, displayUnits: DisplayUnitType) -> FieldType: ...
    @overload
    def Get(self, fieldName: str) -> FieldType: ...
    @overload
    def Get(self, field: Field) -> FieldType: ...
    @overload
    def Set(self, fieldName: str, value: FieldType, unitTypeId: ForgeTypeId) -> None: ...
    @overload
    def Set(self, fieldName: str, value: FieldType, displayUnits: DisplayUnitType) -> None: ...
    @overload
    def Set(self, field: Field, value: FieldType, unitTypeId: ForgeTypeId) -> None: ...
    @overload
    def Set(self, field: Field, value: FieldType, displayUnits: DisplayUnitType) -> None: ...
    @overload
    def Set(self, fieldName: str, value: FieldType) -> None: ...
    @overload
    def Set(self, field: Field, value: FieldType) -> None: ...
    @property
    def Schema(self) -> Schema: ...
    @property
    def SchemaGUID(self) -> Guid: ...
    @property
    def IsValidObject(self) -> bool: ...
    def IsValid(self) -> bool: ...
    def ReadAccessGranted(self) -> bool: ...
    def WriteAccessGranted(self) -> bool: ...
    def RecognizedField(self, field: Field) -> bool: ...
    @overload
    def Clear(self, fieldName: str) -> None: ...
    @overload
    def Clear(self, field: Field) -> None: ...
    def Dispose(self) -> None: ...


class AccessLevel:
    Public = 1
    Vendor = 2
    Application = 3


class ContainerType:
    Simple = 0
    Array = 1
    Map = 2


class DataStorage(Element):
    def Create(doc: Document) -> DataStorage: ...


class Schema:
    @property
    def GUID(self) -> Guid: ...
    @property
    def SchemaName(self) -> str: ...
    @property
    def ReadAccessLevel(self) -> AccessLevel: ...
    @property
    def WriteAccessLevel(self) -> AccessLevel: ...
    @property
    def ApplicationGUID(self) -> Guid: ...
    @property
    def VendorId(self) -> str: ...
    @property
    def Documentation(self) -> str: ...
    @property
    def IsValidObject(self) -> bool: ...
    def Lookup(guid: Guid) -> Schema: ...
    def ListSchemas() -> List[Schema]: ...
    def EraseSchemaAndAllEntities(schema: Schema, overrideWriteAccessWithUserPermission: bool) -> None: ...
    def GetField(self, name: str) -> Field: ...
    def ListFields(self) -> List[Field]: ...
    def ReadAccessGranted(self) -> bool: ...
    def WriteAccessGranted(self) -> bool: ...
    def Dispose(self) -> None: ...


class FieldBuilder:
    @overload
    def __init__(self, field: Field, builder: SchemaBuilder): ...
    @overload
    def __init__(self, other: FieldBuilder): ...
    @property
    def IsValidObject(self) -> bool: ...
    def SetUnitType(self, units: UnitType) -> FieldBuilder: ...
    def SetSpec(self, specTypeId: ForgeTypeId) -> FieldBuilder: ...
    def SetSubSchemaGUID(self, guid: Guid) -> FieldBuilder: ...
    def SetDocumentation(self, documentation: str) -> FieldBuilder: ...
    def Ready(self) -> bool: ...
    def NeedsUnits(self) -> bool: ...
    def NeedsSubSchemaGUID(self) -> bool: ...
    def Dispose(self) -> None: ...


class SchemaBuilder:
    def __init__(self, guid: Guid): ...
    @property
    def IsValidObject(self) -> bool: ...
    def GUIDIsValid(guid: Guid) -> bool: ...
    def VendorIdIsValid(vendorId: str) -> bool: ...
    def AddSimpleField(self, fieldName: str, fieldType: Type) -> FieldBuilder: ...
    def AddArrayField(self, fieldName: str, fieldType: Type) -> FieldBuilder: ...
    def AddMapField(self, fieldName: str, keyType: Type, valueType: Type) -> FieldBuilder: ...
    def SetReadAccessLevel(self, readAccessLevel: AccessLevel) -> SchemaBuilder: ...
    def SetWriteAccessLevel(self, writeAccessLevel: AccessLevel) -> SchemaBuilder: ...
    def SetSchemaName(self, schemaName: str) -> SchemaBuilder: ...
    def SetDocumentation(self, documentation: str) -> SchemaBuilder: ...
    def SetApplicationGUID(self, applicationGUID: Guid) -> SchemaBuilder: ...
    def SetVendorId(self, vendorId: str) -> SchemaBuilder: ...
    def Finish(self) -> Schema: ...
    def Ready(self) -> bool: ...
    def AcceptableName(self, name: str) -> bool: ...
    def Dispose(self) -> None: ...


class ExtensibleStorageFilter(ElementQuickFilter):
    def __init__(self, schemaGuid: Guid): ...
    @property
    def SchemaGuid(self) -> Guid: ...
