from ...tl.mtproto_request import MTProtoRequest


class StickerSetCovered(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    stickerSetCovered#6410a5d2 set:StickerSet cover:Document = StickerSetCovered"""

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

    def __init__(self, set, cover):
        """
        :param set: Telegram type: «StickerSet».
        :param cover: Telegram type: «Document».

        Constructor for StickerSetCovered: Instance of either StickerSetCovered, StickerSetMultiCovered.
        """
        super().__init__()

        self.set = set
        self.cover = cover

    def on_send(self, writer):
        writer.write_int(StickerSetCovered.constructor_id, signed=False)
        self.set.on_send(writer)
        self.cover.on_send(writer)

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

    def on_response(self, reader):
        self.set = reader.tgread_object()
        self.cover = reader.tgread_object()

    def __repr__(self):
        return 'stickerSetCovered#6410a5d2 set:StickerSet cover:Document = StickerSetCovered'

    def __str__(self):
        return '(stickerSetCovered (ID: 0x6410a5d2) = (set={}, cover={}))'.format(str(self.set), str(self.cover))
