from telethon.tl.mtproto_request import MTProtoRequest


class GetAllStickersRequest(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    messages.getAllStickers#1c9618b1 hash:int = messages.AllStickers"""

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

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

        self.hash = hash

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

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

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

    def __repr__(self):
        return 'messages.getAllStickers#1c9618b1 hash:int = messages.AllStickers'

    def __str__(self):
        return '(messages.getAllStickers (ID: 0x1c9618b1) = (hash={}))'.format(str(self.hash))
