from ...tl.tlobject import TLObject


class InputStickerSetShortName(TLObject):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet"""

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

    def __init__(self, short_name):
        """
        :param short_name: Telegram type: "string".

        Constructor for InputStickerSet: Instance of either InputStickerSetEmpty, InputStickerSetID, InputStickerSetShortName.
        """
        super().__init__()

        self.short_name = short_name

    def to_dict(self):
        return {
            'short_name': self.short_name,
        }

    def on_send(self, writer):
        writer.write_int(InputStickerSetShortName.constructor_id, signed=False)
        writer.tgwrite_string(self.short_name)

    @staticmethod
    def empty():
        """Returns an "empty" instance (attributes=None)"""
        return InputStickerSetShortName(None)

    def on_response(self, reader):
        self.short_name = reader.tgread_string()

    def __repr__(self):
        return 'inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet'

    def __str__(self):
        return TLObject.pretty_format(self)

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