from ....tl.mtproto_request import MTProtoRequest


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

    # Telegram's constructor (U)ID for this class
    constructor_id = 0xcc5b67cc
    # Also the ID of its resulting type for fast checks
    subclass_of_id = 0xcc125f6b

    def __init__(self, media):
        """
        :param media: Telegram type: "InputStickeredMedia".

        :returns Vector<StickerSetCovered>: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.confirmed = True  # Confirmed by default

        self.media = media

    def to_dict(self):
        return {
            'media': None if self.media is None else self.media.to_dict(),
        }

    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 (attributes=None)"""
        return GetAttachedStickersRequest(None)

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

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

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