from ....tl.mtproto_request import MTProtoRequest


class GetInlineGameHighScoresRequest(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    messages.getInlineGameHighScores#0f635e1b id:InputBotInlineMessageID user_id:InputUser = messages.HighScores"""

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

    def __init__(self, id, user_id):
        """
        :param id: Telegram type: "InputBotInlineMessageID".
        :param user_id: Telegram type: "InputUser".

        :returns messages.HighScores: Instance of HighScores.
        """
        super().__init__()
        self.result = None
        self.confirmed = True  # Confirmed by default

        self.id = id
        self.user_id = user_id

    def to_dict(self):
        return {
            'id': None if self.id is None else self.id.to_dict(),
            'user_id': None if self.user_id is None else self.user_id.to_dict(),
        }

    def on_send(self, writer):
        writer.write_int(GetInlineGameHighScoresRequest.constructor_id, signed=False)
        self.id.on_send(writer)
        self.user_id.on_send(writer)

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

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'messages.getInlineGameHighScores#0f635e1b id:InputBotInlineMessageID user_id:InputUser = messages.HighScores'

    def __str__(self):
        return '(messages.getInlineGameHighScores (ID: 0xf635e1b) = (id={}, user_id={}))'.format(str(self.id), str(self.user_id))
