from ....tl.tlobject import TLObject


class GetPasswordSettingsRequest(TLObject):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    account.getPasswordSettings#bc8d11bb current_password_hash:bytes = account.PasswordSettings"""

    # Telegram's constructor (U)ID for this class
    constructor_id = 0xbc8d11bb
    # Also the ID of its resulting type for fast checks
    subclass_of_id = 0xd23fb078

    def __init__(self, current_password_hash):
        """
        :param current_password_hash: Telegram type: "bytes".

        :returns account.PasswordSettings: Instance of PasswordSettings.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.current_password_hash = current_password_hash

    def to_dict(self):
        return {
            'current_password_hash': self.current_password_hash,
        }

    def on_send(self, writer):
        writer.write_int(GetPasswordSettingsRequest.constructor_id, signed=False)
        writer.tgwrite_bytes(self.current_password_hash)

    @staticmethod
    def empty():
        """Returns an "empty" instance (attributes=None)"""
        return GetPasswordSettingsRequest(None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.getPasswordSettings#bc8d11bb current_password_hash:bytes = account.PasswordSettings'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)
