"""File generated by TLObjects' generator. All changes will be ERASED"""
from ...tl.tlobject import TLObject


class GetAppChangelogRequest(TLObject):
    constructor_id = 0x9010ef6f
    subclass_of_id = 0x8af52aac

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

        :returns Updates: Instance of either UpdatesTooLong, UpdateShortMessage, UpdateShortChatMessage, UpdateShort, UpdatesCombined, Updates, UpdateShortSentMessage.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.prev_app_version = prev_app_version

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

    def on_send(self, writer):
        writer.write_int(GetAppChangelogRequest.constructor_id, signed=False)
        writer.tgwrite_string(self.prev_app_version)

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

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

    def __repr__(self):
        return 'help.getAppChangelog#9010ef6f prev_app_version:string = Updates'

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

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



class GetAppUpdateRequest(TLObject):
    constructor_id = 0xae2de196
    subclass_of_id = 0x5897069e

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

    @staticmethod
    def to_dict():
        return {}

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

    @staticmethod
    def empty():
        return GetAppUpdateRequest()

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

    def __repr__(self):
        return 'help.getAppUpdate#ae2de196 = help.AppUpdate'

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

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



class GetCdnConfigRequest(TLObject):
    constructor_id = 0x52029342
    subclass_of_id = 0xecda397c

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

    @staticmethod
    def to_dict():
        return {}

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

    @staticmethod
    def empty():
        return GetCdnConfigRequest()

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

    def __repr__(self):
        return 'help.getCdnConfig#52029342 = CdnConfig'

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

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



class GetConfigRequest(TLObject):
    constructor_id = 0xc4f9186b
    subclass_of_id = 0xd3262a4a

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

    @staticmethod
    def to_dict():
        return {}

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

    @staticmethod
    def empty():
        return GetConfigRequest()

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

    def __repr__(self):
        return 'help.getConfig#c4f9186b = Config'

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

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



class GetInviteTextRequest(TLObject):
    constructor_id = 0x4d392343
    subclass_of_id = 0xcf70aa35

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

    @staticmethod
    def to_dict():
        return {}

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

    @staticmethod
    def empty():
        return GetInviteTextRequest()

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

    def __repr__(self):
        return 'help.getInviteText#4d392343 = help.InviteText'

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

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



class GetNearestDcRequest(TLObject):
    constructor_id = 0x1fb33026
    subclass_of_id = 0x3877045f

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

    @staticmethod
    def to_dict():
        return {}

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

    @staticmethod
    def empty():
        return GetNearestDcRequest()

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

    def __repr__(self):
        return 'help.getNearestDc#1fb33026 = NearestDc'

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

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



class GetSupportRequest(TLObject):
    constructor_id = 0x9cdf08cd
    subclass_of_id = 0x7159bceb

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

    @staticmethod
    def to_dict():
        return {}

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

    @staticmethod
    def empty():
        return GetSupportRequest()

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

    def __repr__(self):
        return 'help.getSupport#9cdf08cd = help.Support'

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

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



class GetTermsOfServiceRequest(TLObject):
    constructor_id = 0x350170f3
    subclass_of_id = 0x20ee8312

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

    @staticmethod
    def to_dict():
        return {}

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

    @staticmethod
    def empty():
        return GetTermsOfServiceRequest()

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

    def __repr__(self):
        return 'help.getTermsOfService#350170f3 = help.TermsOfService'

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

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



class SaveAppLogRequest(TLObject):
    constructor_id = 0x6f02f748
    subclass_of_id = 0xf5b399ac

    def __init__(self, events):
        """
        :param events: Telegram type: "InputAppEvent". Must be a list.

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.events = events

    def to_dict(self):
        return {
            'events': [] if self.events is None else [None if x is None else x.to_dict() for x in self.events],
        }

    def on_send(self, writer):
        writer.write_int(SaveAppLogRequest.constructor_id, signed=False)
        writer.write_int(0x1cb5c415, signed=False)  # Vector's constructor ID
        writer.write_int(len(self.events))
        for _x in self.events:
            _x.on_send(writer)

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

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

    def __repr__(self):
        return 'help.saveAppLog#6f02f748 events:Vector<InputAppEvent> = Bool'

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

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



class SetBotUpdatesStatusRequest(TLObject):
    constructor_id = 0xec22cfcd
    subclass_of_id = 0xf5b399ac

    def __init__(self, pending_updates_count, message):
        """
        :param pending_updates_count: Telegram type: "int".
        :param message: Telegram type: "string".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.pending_updates_count = pending_updates_count
        self.message = message

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

    def on_send(self, writer):
        writer.write_int(SetBotUpdatesStatusRequest.constructor_id, signed=False)
        writer.write_int(self.pending_updates_count)
        writer.tgwrite_string(self.message)

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

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

    def __repr__(self):
        return 'help.setBotUpdatesStatus#ec22cfcd pending_updates_count:int message:string = Bool'

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

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

