from telethon.tl.mtproto_request import MTProtoRequest


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

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

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

        self.short_name = 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 (all attributes are 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 '(inputStickerSetShortName (ID: 0x861cc8a0) = (short_name={}))'.format(str(self.short_name))
