from telethon.tl.mtproto_request import MTProtoRequest


class HideReportSpamRequest(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    messages.hideReportSpam#a8f1709b peer:InputPeer = Bool"""

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

    def __init__(self, peer):
        """
        :param peer: Telegram type: «InputPeer».
        """
        super().__init__()
        self.result = None
        self.confirmed = True  # Confirmed by default

        self.peer = peer

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

    @staticmethod
    def empty():
        """Returns an "empty" instance (all attributes are None)"""
        return HideReportSpamRequest(None)

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

    def __repr__(self):
        return 'messages.hideReportSpam#a8f1709b peer:InputPeer = Bool'

    def __str__(self):
        return '(messages.hideReportSpam (ID: 0xa8f1709b) = (peer={}))'.format(str(self.peer))
