from ...tl.tlobject import TLObject


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

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

    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 to_dict(self):
        return {
            'set': None if self.set is None else self.set.to_dict(),
            'cover': None if self.cover is None else self.cover.to_dict(),
        }

    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 (attributes=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 TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)
