from ....tl.mtproto_request import MTProtoRequest


class SetBotUpdatesStatusRequest(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    help.setBotUpdatesStatus#ec22cfcd pending_updates_count:int message:string = Bool"""

    # Telegram's constructor ID (and unique identifier) for this class
    constructor_id = 0xec22cfcd

    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.confirmed = True  # Confirmed by default

        self.pending_updates_count = pending_updates_count
        self.message = 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():
        """Returns an "empty" instance (all attributes are None)"""
        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 '(help.setBotUpdatesStatus (ID: 0xec22cfcd) = (pending_updates_count={}, message={}))'.format(str(self.pending_updates_count), str(self.message))
