from ....tl.tlobject import TLObject


class GetDifferenceRequest(TLObject):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    langpack.getDifference#0b2e4d7d from_version:int = LangPackDifference"""

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

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

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

        self.from_version = from_version

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

    def on_send(self, writer):
        writer.write_int(GetDifferenceRequest.constructor_id, signed=False)
        writer.write_int(self.from_version)

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

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

    def __repr__(self):
        return 'langpack.getDifference#0b2e4d7d from_version:int = LangPackDifference'

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

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