import datetime
from typing import Any, List, Mapping, Optional, Tuple

from bson.objectid import ObjectId

class IsMaster:
    def __init__(self, doc: Mapping[str, Any], awaitable: bool = ...) -> None: ...
    @property
    def document(self) -> Mapping[str, Any]: ...
    @property
    def server_type(self) -> int: ...
    @property
    def all_hosts(self) -> List[Tuple[str, int]]: ...
    @property
    def tags(self) -> Mapping[str, Any]: ...
    @property
    def primary(self) -> Optional[Tuple[str, int]]: ...
    @property
    def replica_set_name(self) -> Optional[str]: ...
    @property
    def max_bson_size(self) -> int: ...
    @property
    def max_message_size(self) -> int: ...
    @property
    def max_write_batch_size(self) -> int: ...
    @property
    def min_wire_version(self) -> int: ...
    @property
    def max_wire_version(self) -> int: ...
    @property
    def set_version(self) -> Optional[int]: ...
    @property
    def election_id(self) -> Optional[ObjectId]: ...
    @property
    def cluster_time(self) -> Optional[Mapping[str, Any]]: ...
    @property
    def logical_session_timeout_minutes(self) -> Optional[int]: ...
    @property
    def is_writable(self) -> bool: ...
    @property
    def is_readable(self) -> bool: ...
    @property
    def me(self) -> Optional[Tuple[str, int]]: ...
    @property
    def last_write_date(self) -> Optional[datetime.datetime]: ...
    @property
    def compressors(self) -> Optional[List[str]]: ...
    @property
    def sasl_supported_mechs(self) -> List[str]: ...
    @property
    def speculative_authenticate(self) -> Optional[Mapping[str, Any]]: ...
    @property
    def topology_version(self) -> Optional[Mapping[str, Any]]: ...
    @property
    def awaitable(self) -> bool: ...
