"""File generated by TLObjects' generator. All changes will be ERASED"""
from ...tl.tlobject import TLObject
from ...utils import get_input_peer, get_input_channel, get_input_user, get_input_media
import os
import struct


class GetDifferenceRequest(TLObject):
    CONSTRUCTOR_ID = 0xb2e4d7d
    SUBCLASS_OF_ID = 0x52662d55

    def __init__(self, from_version):
        """
        :param int from_version:

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

        self.from_version = from_version

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

    def to_bytes(self):
        return b''.join((
            b'}M.\x0b',
            struct.pack('<i', self.from_version),
        ))

    @staticmethod
    def empty():
        return GetDifferenceRequest(None)

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

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

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


class GetLangPackRequest(TLObject):
    CONSTRUCTOR_ID = 0x9ab5c58e
    SUBCLASS_OF_ID = 0x52662d55

    def __init__(self, lang_code):
        """
        :param str lang_code:

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

        self.lang_code = lang_code

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

    def to_bytes(self):
        return b''.join((
            b'\x8e\xc5\xb5\x9a',
            TLObject.serialize_bytes(self.lang_code),
        ))

    @staticmethod
    def empty():
        return GetLangPackRequest(None)

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

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

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


class GetLanguagesRequest(TLObject):
    CONSTRUCTOR_ID = 0x800fd57d
    SUBCLASS_OF_ID = 0x280912c9

    def __init__(self):
        super().__init__()
        self.result = None
        self.content_related = True

    def to_dict(self, recursive=True):
        return {}

    def to_bytes(self):
        return b''.join((
            b'}\xd5\x0f\x80',
        ))

    @staticmethod
    def empty():
        return GetLanguagesRequest()

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

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

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


class GetStringsRequest(TLObject):
    CONSTRUCTOR_ID = 0x2e1ee318
    SUBCLASS_OF_ID = 0xc7b7353d

    def __init__(self, lang_code, keys):
        """
        :param str lang_code:
        :param list[str] keys:

        :returns Vector<LangPackString>: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.lang_code = lang_code
        self.keys = keys

    def to_dict(self, recursive=True):
        return {
            'lang_code': self.lang_code,
            'keys': [] if self.keys is None else self.keys[:],
        }

    def to_bytes(self):
        return b''.join((
            b'\x18\xe3\x1e.',
            TLObject.serialize_bytes(self.lang_code),
            b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.keys)),b''.join(TLObject.serialize_bytes(x) for x in self.keys),
        ))

    @staticmethod
    def empty():
        return GetStringsRequest(None, None)

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

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

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