from __future__ import annotations

from typing import Any, Callable

from nexuscore.core.uuid import UUID4


class Command:
    id: UUID4
    ts_init: int
    correlation_id: UUID4 | None
    def __init__(self, command_id: UUID4, ts_init: int, correlation_id: UUID4 | None = ...) -> None: ...
    def __getstate__(self) -> tuple[str, int, str | None]: ...
    def __setstate__(self, state: tuple[str, int, str | None]) -> None: ...
    def __eq__(self, other: object) -> bool: ...
    def __hash__(self) -> int: ...
    def __repr__(self) -> str: ...


class Document:
    id: UUID4
    ts_init: int
    def __init__(self, document_id: UUID4, ts_init: int) -> None: ...
    def __getstate__(self) -> tuple[str, int]: ...
    def __setstate__(self, state: tuple[str, int]) -> None: ...
    def __eq__(self, other: object) -> bool: ...
    def __hash__(self) -> int: ...
    def __repr__(self) -> str: ...


class Event:
    @property
    def id(self) -> UUID4: ...
    @property
    def ts_event(self) -> int: ...
    @property
    def ts_init(self) -> int: ...


class Request:
    callback: Callable[[Any], None] | None
    id: UUID4
    ts_init: int
    correlation_id: UUID4 | None
    def __init__(
        self,
        callback: Callable[[Any], None] | None,
        request_id: UUID4,
        ts_init: int,
        correlation_id: UUID4 | None = ...,
    ) -> None: ...
    def __getstate__(self) -> tuple[Callable[[Any], None] | None, str, int, str | None]: ...
    def __setstate__(self, state: tuple[Callable[[Any], None] | None, str, int, str | None]) -> None: ...
    def __eq__(self, other: object) -> bool: ...
    def __hash__(self) -> int: ...
    def __repr__(self) -> str: ...


class Response:
    correlation_id: UUID4
    id: UUID4
    ts_init: int
    def __init__(self, correlation_id: UUID4, response_id: UUID4, ts_init: int) -> None: ...
    def __getstate__(self) -> tuple[str, str, int]: ...
    def __setstate__(self, state: tuple[str, str, int]) -> None: ...
    def __eq__(self, other: object) -> bool: ...
    def __hash__(self) -> int: ...
    def __repr__(self) -> str: ...
