import datetime
from email._policybase import Policy
from inspect import Traceback
from ssl import SSLContext
from typing import Optional, Union, Tuple, List


class Imbox:

    def __init__(self, hostname: str, username: Optional[str], password: Optional[str], ssl: bool,
                 port: Optional[int], ssl_context: Optional[SSLContext], policy: Optional[Policy], starttls: bool): ...

    def __enter__(self) -> 'Imbox': ...

    def __exit__(self, type: Exception, value: str, traceback: Traceback) -> None: ...

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

    def mark_seen(self, uid: bytes) -> None: ...

    def mark_flag(self, uid: bytes) -> None: ...

    def delete(self, uid: bytes) -> None: ...

    def copy(self, uid: bytes, destination_folder: Union[bytes, str]) -> Tuple[str, Union[list, List[None, bytes]]]: ...

    def move(self, uid: bytes, destination_folder: Union[bytes, str]) -> None: ...

    def messages(self, **kwargs: Union[bool, str, datetime.date]) -> 'Messages': ...

    def folders(self) -> Tuple[str, List[bytes]]: ...