from telethon.tl.mtproto_request import MTProtoRequest


class AccountDaysTTL(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    accountDaysTTL#b8d0afdf days:int = AccountDaysTTL"""

    # Telegram's constructor ID (and unique identifier) for this class
    constructor_id = 0xb8d0afdf

    def __init__(self, days):
        """
        :param days: Telegram type: «int».
        """
        super().__init__()

        self.days = days

    def on_send(self, writer):
        writer.write_int(AccountDaysTTL.constructor_id, signed=False)
        writer.write_int(self.days)

    @staticmethod
    def empty():
        """Returns an "empty" instance (all attributes are None)"""
        return AccountDaysTTL(None)

    def on_response(self, reader):
        self.days = reader.read_int()

    def __repr__(self):
        return 'accountDaysTTL#b8d0afdf days:int = AccountDaysTTL'

    def __str__(self):
        return '(accountDaysTTL (ID: 0xb8d0afdf) = (days={}))'.format(str(self.days))
