from telethon.tl.mtproto_request import MTProtoRequest


class GetAttachedStickersRequest(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    messages.getAttachedStickers#cc5b67cc media:InputStickeredMedia = Vector<StickerSetCovered>"""

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

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

        self.media = media

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

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

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

    def __repr__(self):
        return 'messages.getAttachedStickers#cc5b67cc media:InputStickeredMedia = Vector<StickerSetCovered>'

    def __str__(self):
        return '(messages.getAttachedStickers (ID: 0xcc5b67cc) = (media={}))'.format(str(self.media))
