from telethon.tl.mtproto_request import MTProtoRequest


class DifferenceEmpty(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    updates.differenceEmpty#5d75a138 date:date seq:int = updates.Difference"""

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

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

        self.date = date
        self.seq = seq

    def on_send(self, writer):
        writer.write_int(DifferenceEmpty.constructor_id, signed=False)
        writer.tgwrite_date(self.date)
        writer.write_int(self.seq)

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

    def on_response(self, reader):
        self.date = reader.tgread_date()
        self.seq = reader.read_int()

    def __repr__(self):
        return 'updates.differenceEmpty#5d75a138 date:date seq:int = updates.Difference'

    def __str__(self):
        return '(updates.differenceEmpty (ID: 0x5d75a138) = (date={}, seq={}))'.format(str(self.date), str(self.seq))
