from typing import Any, Optional

from pymongo import common as common
from pymongo import periodic_executor as periodic_executor
from pymongo.errors import ConfigurationError as ConfigurationError
from pymongo.errors import ServerSelectionTimeoutError as ServerSelectionTimeoutError
from pymongo.monitor import SrvMonitor as SrvMonitor
from pymongo.pool import PoolOptions as PoolOptions
from pymongo.server import Server as Server
from pymongo.server_selectors import Selection as Selection
from pymongo.server_selectors import any_server_selector as any_server_selector
from pymongo.server_selectors import arbiter_server_selector as arbiter_server_selector
from pymongo.server_selectors import readable_server_selector as readable_server_selector
from pymongo.server_selectors import secondary_server_selector as secondary_server_selector
from pymongo.server_selectors import writable_server_selector as writable_server_selector
from pymongo.topology_description import SRV_POLLING_TOPOLOGIES as SRV_POLLING_TOPOLOGIES
from pymongo.topology_description import TOPOLOGY_TYPE as TOPOLOGY_TYPE
from pymongo.topology_description import TopologyDescription as TopologyDescription
from pymongo.topology_description import updated_topology_description as updated_topology_description

def process_events_queue(queue_ref: Any): ...

class Topology:
    def __init__(self, topology_settings: Any): ...
    def open(self) -> None: ...
    def select_servers(
        self, selector: Any, server_selection_timeout: Optional[Any] = ..., address: Optional[Any] = ...
    ): ...
    def select_server(
        self, selector: Any, server_selection_timeout: Optional[Any] = ..., address: Optional[Any] = ...
    ): ...
    def select_server_by_address(self, address: Any, server_selection_timeout: Optional[Any] = ...): ...
    def on_change(self, server_description: Any) -> None: ...
    def on_srv_update(self, seedlist: Any) -> None: ...
    def get_server_by_address(self, address: Any): ...
    def has_server(self, address: Any): ...
    def get_primary(self): ...
    def get_secondaries(self): ...
    def get_arbiters(self): ...
    def max_cluster_time(self): ...
    def receive_cluster_time(self, cluster_time: Any) -> None: ...
    def request_check_all(self, wait_time: int = ...) -> None: ...
    def reset_pool(self, address: Any) -> None: ...
    def reset_server(self, address: Any) -> None: ...
    def reset_server_and_request_check(self, address: Any) -> None: ...
    def mark_server_unknown_and_request_check(self, address: Any) -> None: ...
    def update_pool(self) -> None: ...
    def close(self) -> None: ...
    @property
    def description(self): ...
    def pop_all_sessions(self): ...
    def get_server_session(self): ...
    def return_server_session(self, server_session: Any, lock: Any) -> None: ...

3ebcbfaefb62e873db0c746af0e53a1cf178671d
<mask token>


class Topology:

    def __init__(self, topology_settings: Any):
        ...

    def open(self) ->None:
        ...

    def select_servers(self, selector: Any, server_selection_timeout:
        Optional[Any]=..., address: Optional[Any]=...):
        ...

    def select_server(self, selector: Any, server_selection_timeout:
        Optional[Any]=..., address: Optional[Any]=...):
        ...

    def select_server_by_address(self, address: Any,
        server_selection_timeout: Optional[Any]=...):
        ...

    def on_change(self, server_description: Any) ->None:
        ...

    def on_srv_update(self, seedlist: Any) ->None:
        ...

    def get_server_by_address(self, address: Any):
        ...
    <mask token>

    def get_primary(self):
        ...

    def get_secondaries(self):
        ...
    <mask token>
    <mask token>
    <mask token>

    def request_check_all(self, wait_time: int=...) ->None:
        ...

    def reset_pool(self, address: Any) ->None:
        ...

    def reset_server(self, address: Any) ->None:
        ...

    def reset_server_and_request_check(self, address: Any) ->None:
        ...

    def mark_server_unknown_and_request_check(self, address: Any) ->None:
        ...
    <mask token>
    <mask token>

    @property
    def description(self):
        ...

    def pop_all_sessions(self):
        ...

    def get_server_session(self):
        ...

    def return_server_session(self, server_session: Any, lock: Any) ->None:
        ...

<mask token>


class Topology:

    def __init__(self, topology_settings: Any):
        ...

    def open(self) ->None:
        ...

    def select_servers(self, selector: Any, server_selection_timeout:
        Optional[Any]=..., address: Optional[Any]=...):
        ...

    def select_server(self, selector: Any, server_selection_timeout:
        Optional[Any]=..., address: Optional[Any]=...):
        ...

    def select_server_by_address(self, address: Any,
        server_selection_timeout: Optional[Any]=...):
        ...

    def on_change(self, server_description: Any) ->None:
        ...

    def on_srv_update(self, seedlist: Any) ->None:
        ...

    def get_server_by_address(self, address: Any):
        ...

    def has_server(self, address: Any):
        ...

    def get_primary(self):
        ...

    def get_secondaries(self):
        ...

    def get_arbiters(self):
        ...
    <mask token>
    <mask token>

    def request_check_all(self, wait_time: int=...) ->None:
        ...

    def reset_pool(self, address: Any) ->None:
        ...

    def reset_server(self, address: Any) ->None:
        ...

    def reset_server_and_request_check(self, address: Any) ->None:
        ...

    def mark_server_unknown_and_request_check(self, address: Any) ->None:
        ...

    def update_pool(self) ->None:
        ...

    def close(self) ->None:
        ...

    @property
    def description(self):
        ...

    def pop_all_sessions(self):
        ...

    def get_server_session(self):
        ...

    def return_server_session(self, server_session: Any, lock: Any) ->None:
        ...

<mask token>


class Topology:

    def __init__(self, topology_settings: Any):
        ...

    def open(self) ->None:
        ...

    def select_servers(self, selector: Any, server_selection_timeout:
        Optional[Any]=..., address: Optional[Any]=...):
        ...

    def select_server(self, selector: Any, server_selection_timeout:
        Optional[Any]=..., address: Optional[Any]=...):
        ...

    def select_server_by_address(self, address: Any,
        server_selection_timeout: Optional[Any]=...):
        ...

    def on_change(self, server_description: Any) ->None:
        ...

    def on_srv_update(self, seedlist: Any) ->None:
        ...

    def get_server_by_address(self, address: Any):
        ...

    def has_server(self, address: Any):
        ...

    def get_primary(self):
        ...

    def get_secondaries(self):
        ...

    def get_arbiters(self):
        ...

    def max_cluster_time(self):
        ...
    <mask token>

    def request_check_all(self, wait_time: int=...) ->None:
        ...

    def reset_pool(self, address: Any) ->None:
        ...

    def reset_server(self, address: Any) ->None:
        ...

    def reset_server_and_request_check(self, address: Any) ->None:
        ...

    def mark_server_unknown_and_request_check(self, address: Any) ->None:
        ...

    def update_pool(self) ->None:
        ...

    def close(self) ->None:
        ...

    @property
    def description(self):
        ...

    def pop_all_sessions(self):
        ...

    def get_server_session(self):
        ...

    def return_server_session(self, server_session: Any, lock: Any) ->None:
        ...

<mask token>


class Topology:

    def __init__(self, topology_settings: Any):
        ...

    def open(self) ->None:
        ...

    def select_servers(self, selector: Any, server_selection_timeout:
        Optional[Any]=..., address: Optional[Any]=...):
        ...

    def select_server(self, selector: Any, server_selection_timeout:
        Optional[Any]=..., address: Optional[Any]=...):
        ...

    def select_server_by_address(self, address: Any,
        server_selection_timeout: Optional[Any]=...):
        ...

    def on_change(self, server_description: Any) ->None:
        ...

    def on_srv_update(self, seedlist: Any) ->None:
        ...

    def get_server_by_address(self, address: Any):
        ...

    def has_server(self, address: Any):
        ...

    def get_primary(self):
        ...

    def get_secondaries(self):
        ...

    def get_arbiters(self):
        ...

    def max_cluster_time(self):
        ...

    def receive_cluster_time(self, cluster_time: Any) ->None:
        ...

    def request_check_all(self, wait_time: int=...) ->None:
        ...

    def reset_pool(self, address: Any) ->None:
        ...

    def reset_server(self, address: Any) ->None:
        ...

    def reset_server_and_request_check(self, address: Any) ->None:
        ...

    def mark_server_unknown_and_request_check(self, address: Any) ->None:
        ...

    def update_pool(self) ->None:
        ...

    def close(self) ->None:
        ...

    @property
    def description(self):
        ...

    def pop_all_sessions(self):
        ...

    def get_server_session(self):
        ...

    def return_server_session(self, server_session: Any, lock: Any) ->None:
        ...

from typing import Any, Optional

from pymongo import common as common
from pymongo import periodic_executor as periodic_executor
from pymongo.errors import ConfigurationError as ConfigurationError
from pymongo.errors import ServerSelectionTimeoutError as ServerSelectionTimeoutError
from pymongo.monitor import SrvMonitor as SrvMonitor
from pymongo.pool import PoolOptions as PoolOptions
from pymongo.server import Server as Server
from pymongo.server_selectors import Selection as Selection
from pymongo.server_selectors import any_server_selector as any_server_selector
from pymongo.server_selectors import arbiter_server_selector as arbiter_server_selector
from pymongo.server_selectors import readable_server_selector as readable_server_selector
from pymongo.server_selectors import secondary_server_selector as secondary_server_selector
from pymongo.server_selectors import writable_server_selector as writable_server_selector
from pymongo.topology_description import SRV_POLLING_TOPOLOGIES as SRV_POLLING_TOPOLOGIES
from pymongo.topology_description import TOPOLOGY_TYPE as TOPOLOGY_TYPE
from pymongo.topology_description import TopologyDescription as TopologyDescription
from pymongo.topology_description import updated_topology_description as updated_topology_description

def process_events_queue(queue_ref: Any): ...

class Topology:
    def __init__(self, topology_settings: Any): ...
    def open(self) -> None: ...
    def select_servers(
        self, selector: Any, server_selection_timeout: Optional[Any] = ..., address: Optional[Any] = ...
    ): ...
    def select_server(
        self, selector: Any, server_selection_timeout: Optional[Any] = ..., address: Optional[Any] = ...
    ): ...
    def select_server_by_address(self, address: Any, server_selection_timeout: Optional[Any] = ...): ...
    def on_change(self, server_description: Any) -> None: ...
    def on_srv_update(self, seedlist: Any) -> None: ...
    def get_server_by_address(self, address: Any): ...
    def has_server(self, address: Any): ...
    def get_primary(self): ...
    def get_secondaries(self): ...
    def get_arbiters(self): ...
    def max_cluster_time(self): ...
    def receive_cluster_time(self, cluster_time: Any) -> None: ...
    def request_check_all(self, wait_time: int = ...) -> None: ...
    def reset_pool(self, address: Any) -> None: ...
    def reset_server(self, address: Any) -> None: ...
    def reset_server_and_request_check(self, address: Any) -> None: ...
    def mark_server_unknown_and_request_check(self, address: Any) -> None: ...
    def update_pool(self) -> None: ...
    def close(self) -> None: ...
    @property
    def description(self): ...
    def pop_all_sessions(self): ...
    def get_server_session(self): ...
    def return_server_session(self, server_session: Any, lock: Any) -> None: ...
