from ...tl.tlobject import TLObject


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

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

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

        Constructor for AccountDaysTTL: Instance of AccountDaysTTL.
        """
        super().__init__()

        self.days = days

    def to_dict(self):
        return {
            'days': self.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 (attributes=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 TLObject.pretty_format(self)

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