from typing import Any, Mapping

from pymongo.collection import Collection
from pymongo.database import Database

class SONManipulator:
    def will_copy(self) -> bool: ...
    def transform_incoming(self, son: Mapping[str, Any], collection: Collection) -> Any: ...
    def transform_outgoing(self, son: Mapping[str, Any], collection: Collection) -> Any: ...

class ObjectIdInjector(SONManipulator):
    def transform_incoming(self, son: Mapping[str, Any], collection: Collection) -> Any: ...

class ObjectIdShuffler(SONManipulator):
    def will_copy(self) -> bool: ...
    def transform_incoming(self, son: Mapping[str, Any], collection: Collection) -> Any: ...

class NamespaceInjector(SONManipulator):
    def transform_incoming(self, son: Mapping[str, Any], collection: Collection) -> Any: ...

class AutoReference(SONManipulator):
    database: Database = ...
    def __init__(self, db: Database) -> None: ...
    def will_copy(self) -> bool: ...
    def transform_incoming(self, son: Mapping[str, Any], collection: Collection) -> Any: ...
    def transform_outgoing(self, son: Mapping[str, Any], collection: Collection) -> Any: ...
