from ....tl.tlobject import TLObject


class GetLangPackRequest(TLObject):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    langpack.getLangPack#9ab5c58e lang_code:string = LangPackDifference"""

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

    def __init__(self, lang_code):
        """
        :param lang_code: Telegram type: "string".

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

        self.lang_code = lang_code

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

    def on_send(self, writer):
        writer.write_int(GetLangPackRequest.constructor_id, signed=False)
        writer.tgwrite_string(self.lang_code)

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

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

    def __repr__(self):
        return 'langpack.getLangPack#9ab5c58e lang_code:string = LangPackDifference'

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

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