from ....tl.tlobject import TLObject


class DifferenceTooLong(TLObject):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    updates.differenceTooLong#4afe8f6d pts:int = updates.Difference"""

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

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

        Constructor for updates.Difference: Instance of either DifferenceEmpty, Difference, DifferenceSlice, DifferenceTooLong.
        """
        super().__init__()

        self.pts = pts

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

    def on_send(self, writer):
        writer.write_int(DifferenceTooLong.constructor_id, signed=False)
        writer.write_int(self.pts)

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

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

    def __repr__(self):
        return 'updates.differenceTooLong#4afe8f6d pts:int = updates.Difference'

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

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