# mypy: disable-error-code="misc, override, attr-defined, no-redef, assignment"

import typing
from . import Util as Util
from collections.abc import abstractmethod
from typing import Any, Generic, Set, Tuple, TypeVar, overload
T = TypeVar("T")

GroupBuilderBuildAndFlush: int
GroupBuilderBuildAndRetain: int
GroupBuilderModeNormal: int
GroupBuilderModeStrict: int

class Attribute:
    def __init__(self) -> None: ...
    def getBinary(self) -> bytes: ...
    def getHash(self) -> str: ...
    def getHash64(self) -> int: ...
    def getSize(self) -> int: ...
    def getXML(self) -> str: ...
    @classmethod
    def parseBinary(cls, binary: object) -> Attribute: ...
    @classmethod
    def parseXML(cls, xml: str) -> Attribute: ...
    def writePython(self, stream: object) -> Any: ...
    @overload
    def __eq__(self, other: object) -> bool: ...
    @overload
    def __eq__(self, other: object) -> bool: ...
    def __hash__(self) -> int: ...
    def __le__(self, other: object) -> bool: ...
    def __lt__(self, other: object) -> bool: ...
    @overload
    def __ne__(self, other: object) -> bool: ...
    @overload
    def __ne__(self, other: object) -> bool: ...

class ConstVector(Generic[T]):
    def __init__(self) -> None: ...
    def count(self, object: object) -> int: ...
    def index(self, object: object) -> int: ...
    def toFnAttr(self, *args, **kwargs): ...
    def __eq__(self, other: object) -> bool: ...
    def __ge__(self, other: object) -> bool: ...
    @overload
    def __getitem__(self, index: int) -> T: ...
    @overload
    def __getitem__(self, index: slice) -> ConstVector[T]: ...
    def __iter__(self) -> typing.Iterator[T]: ...
    def __gt__(self, other: object) -> bool: ...
    def __iter__(self) -> typing.Iterator[T]: ...
    def __le__(self, other: object) -> bool: ...
    def __len__(self) -> int: ...
    def __lt__(self, other: object) -> bool: ...
    def __ne__(self, other: object) -> bool: ...

class DataAttribute(Attribute, Generic[T]):
    def __init__(self) -> None: ...
    def getBoundingSampleTimes(self, time: float) -> tuple: ...
    @abstractmethod
    def getData(self) -> ConstVector[T]: ...
    @abstractmethod
    def getNearestSample(self, sampleTime: float) -> ConstVector[T]: ...
    def getNumberOfTimeSamples(self) -> int: ...
    def getNumberOfTuples(self) -> int: ...
    def getNumberOfValues(self) -> int: ...
    def getSampleTime(self, index: int) -> float: ...
    def getSampleTimes(self) -> tuple: ...
    @abstractmethod
    def getSamples(self) -> dict[float, ConstVector[T]]: ...
    def getTupleSize(self) -> int: ...
    @abstractmethod
    def getValue(self, defaultValue: T = ..., throwOnError: bool = ...) -> T: ...

class DoubleAttribute(DataAttribute[float]):
    @overload
    def __init__(self, value: float, tupleSize: int = ...) -> None: ...
    @overload
    def __init__(self, data: dict, tupleSize: int = ...) -> None: ...
    @overload
    def __init__(self, data: typing.Sequence, tupleSize: int = ...) -> None: ...
    def getData(self) -> ConstVector[float]: ...
    def getNearestSample(self, sampleTime: float) -> ConstVector[float]: ...
    def getSamples(self) -> dict[float, ConstVector[float]]: ...
    def getValue(self, defaultValue: float = ..., throwOnError: bool = ...) -> float: ...

class FloatAttribute(DataAttribute[float]):
    @overload
    def __init__(self, value: float, tupleSize: int = ...) -> None: ...
    @overload
    def __init__(self, data: dict, tupleSize: int = ...) -> None: ...
    @overload
    def __init__(self, data: typing.Sequence, tupleSize: int = ...) -> None: ...
    def getData(self) -> ConstVector[float]: ...
    def getNearestSample(self, sampleTime: float) -> ConstVector[float]: ...
    def getSamples(self) -> dict[float, ConstVector[float]]: ...
    def getValue(self, defaultValue: float = ..., throwOnError: bool = ...) -> float: ...

class GroupAttribute(Attribute):
    @overload
    def __init__(self, groupInherit: bool = ...) -> None: ...
    @overload
    def __init__(self, children: typing.Sequence, groupInherit: bool = ...) -> None: ...
    @overload
    def __init__(self, children: dict, groupInherit: bool = ...) -> None: ...
    def childList(self) -> list[tuple[str, Attribute]]: ...
    def getChildByIndex(self, index: int) -> Attribute: ...
    def getChildByName(self, name: str) -> Attribute: ...
    def getChildName(self, index: int) -> str: ...
    def getGroupInherit(self) -> bool: ...
    def getNumberOfChildren(self) -> int: ...
    def writePython(self, stream: object) -> Any: ...

class GroupBuilder:
    def __init__(self, builderMode: int = ...) -> None: ...
    def build(self, builderMode: int = ...) -> GroupAttribute: ...
    def deepUpdate(self, attr: GroupAttribute) -> GroupBuilder: ...
    def delete(self, pathStr: str) -> GroupBuilder: ...
    def reserve(self, count: int) -> GroupBuilder: ...
    @overload
    def set(self, pathStr: str, attr: Attribute, groupInherit: bool = ...) -> GroupBuilder: ...
    @overload
    def set(self, pathStr: str, value: int, groupInherit: bool = ...) -> GroupBuilder: ...
    @overload
    def set(self, pathStr: str, value: float, groupInherit: bool = ...) -> GroupBuilder: ...
    @overload
    def set(self, pathStr: str, value: float, groupInherit: bool = ...) -> GroupBuilder: ...
    @overload
    def set(self, pathStr: str, value: str, groupInherit: bool = ...) -> GroupBuilder: ...
    def setGroupInherit(self, groupInherit: bool) -> GroupBuilder: ...
    @overload
    def setWithUniqueName(self, pathStr: str, attr: Attribute, groupInherit: bool = ...) -> GroupBuilder: ...
    @overload
    def setWithUniqueName(self, pathStr: str, value: int, groupInherit: bool = ...) -> GroupBuilder: ...
    @overload
    def setWithUniqueName(self, pathStr: str, value: float, groupInherit: bool = ...) -> GroupBuilder: ...
    @overload
    def setWithUniqueName(self, pathStr: str, value: float, groupInherit: bool = ...) -> GroupBuilder: ...
    @overload
    def setWithUniqueName(self, pathStr: str, value: str, groupInherit: bool = ...) -> GroupBuilder: ...
    def sort(self) -> GroupBuilder: ...
    def update(self, attr: GroupAttribute) -> GroupBuilder: ...

class IntAttribute(DataAttribute[int]):
    @overload
    def __init__(self, value: float, tupleSize: int = ...) -> None: ...
    @overload
    def __init__(self, data: dict, tupleSize: int = ...) -> None: ...
    @overload
    def __init__(self, data: typing.Sequence, tupleSize: int = ...) -> None: ...
    def getData(self) -> ConstVector[int]: ...
    def getNearestSample(self, sampleTime: float) -> ConstVector[int]: ...
    def getSamples(self) -> dict[float, ConstVector[int]]: ...
    def getValue(self, defaultValue: int = ..., throwOnError: bool = ...) -> int: ...

class NullAttribute(Attribute):
    def __init__(self) -> None: ...
    def writePython(self, stream: object) -> Any: ...

class StringAttribute(DataAttribute[str]):
    @overload
    def __init__(self, value: str, tupleSize: int = ...) -> None: ...
    @overload
    def __init__(self, data: dict, tupleSize: int = ...) -> None: ...
    @overload
    def __init__(self, data: typing.Sequence, tupleSize: int = ...) -> None: ...
    def getData(self) -> ConstVector[str]: ...
    def getNearestSample(self, sampleTime: float) -> ConstVector[str]: ...
    def getSamples(self) -> dict[float, ConstVector[str]]: ...
    def getValue(self, defaultValue: str = ..., throwOnError: bool = ...) -> str: ...
    @overload
    def __eq__(self, other: object) -> bool: ...
    @overload
    def __eq__(self, other: object) -> bool: ...
    @overload
    def __eq__(self, other: object) -> bool: ...
    @overload
    def __ne__(self, other: object) -> bool: ...
    @overload
    def __ne__(self, other: object) -> bool: ...
    @overload
    def __ne__(self, other: object) -> bool: ...

def DelimiterDecode(encodedNameOrLocationPath: str) -> str: ...
def DelimiterEncode(nameOrLocationPath: str) -> str: ...
def GetTotalSize() -> int: ...
