from typing import Optional


class DatabaseSettings:
    r"""Represents settings for the database connection"""

    def __init__(
        self,
        host: str = None,
        port: int = 3306,
        user: str = None,
        password: str = None,
        database: str = None,
        charset: str = "utf8mb4",
        use_unicode: bool = False,
        buffered: bool = False,
        auth_plugin: str = "caching_sha2_password",
        ssl_disabled: bool = False,
    ):
        self._host: Optional[str] = host
        self._port: Optional[int] = port
        self._user: Optional[str] = user
        self._password: Optional[str] = password
        self._database: Optional[str] = database
        self._charset: Optional[str] = charset
        self._use_unicode: Optional[bool] = use_unicode
        self._buffered: Optional[bool] = buffered
        self._auth_plugin: Optional[str] = auth_plugin
        self._ssl_disabled: Optional[bool] = ssl_disabled

    @property
    def host(self) -> Optional[str]:
        return self._host

    @property
    def port(self) -> Optional[int]:
        return self._port

    @property
    def user(self) -> Optional[str]:
        return self._user

    @property
    def password(self) -> Optional[str]:
        return self._password

    @property
    def database(self) -> Optional[str]:
        return self._database

    @property
    def charset(self) -> Optional[str]:
        return self._charset

    @property
    def use_unicode(self) -> Optional[bool]:
        return self._use_unicode

    @property
    def buffered(self) -> Optional[bool]:
        return self._buffered

    @property
    def auth_plugin(self) -> Optional[str]:
        return self._auth_plugin

    @property
    def ssl_disabled(self) -> Optional[bool]:
        return self._ssl_disabled
