from ...tl.mtproto_request import MTProtoRequest


class InputBotInlineResultGame(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    inputBotInlineResultGame#4fa417f2 id:string short_name:string send_message:InputBotInlineMessage = InputBotInlineResult"""

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

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

        Constructor for InputBotInlineResult: Instance of either InputBotInlineResult, InputBotInlineResultPhoto, InputBotInlineResultDocument, InputBotInlineResultGame.
        """
        super().__init__()

        self.id = id
        self.short_name = short_name
        self.send_message = send_message

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

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

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

    def __repr__(self):
        return 'inputBotInlineResultGame#4fa417f2 id:string short_name:string send_message:InputBotInlineMessage = InputBotInlineResult'

    def __str__(self):
        return '(inputBotInlineResultGame (ID: 0x4fa417f2) = (id={}, short_name={}, send_message={}))'.format(str(self.id), str(self.short_name), str(self.send_message))
