from ....tl.tlobject import TLObject


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

    # Telegram's constructor (U)ID for this class
    constructor_id = 0xec22cfcd
    # Also the ID of its resulting type for fast checks
    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():
        """Returns an "empty" instance (attributes=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 TLObject.pretty_format(self)

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