U
    h	                     @   s\   d Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	 erHddl
mZ G dd deZd	S )
zHThis module contains an object that represents a Telegram GameHighScore.    )TYPE_CHECKINGOptional)TelegramObject)User)JSONDict)Botc                       sb   e Zd ZdZdZddeeeee d fddZ	e
dee ed ed  d	 fd
dZ  ZS )GameHighScoreaR  This object represents one row of the high scores table for a game.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`position`, :attr:`user` and :attr:`score` are equal.

    Args:
        position (:obj:`int`): Position in high score table for the game.
        user (:class:`telegram.User`): User.
        score (:obj:`int`): Score.

    Attributes:
        position (:obj:`int`): Position in high score table for the game.
        user (:class:`telegram.User`): User.
        score (:obj:`int`): Score.

    )positionscoreuserN
api_kwargs)r	   r   r
   r   c                   s>   t  j|d || _|| _|| _| j| j| jf| _|   d S )Nr   )super__init__r	   r   r
   Z	_id_attrsZ_freeze)selfr	   r   r
   r   	__class__ A/tmp/pip-unpacked-wheel-6scrnegd/telegram/_games/gamehighscore.pyr   3   s    zGameHighScore.__init__r   )databotreturnc                    s8   |  |}|sdS t|d||d< t j||dS )z,See :meth:`telegram.TelegramObject.de_json`.Nr   )r   r   )Z_parse_datar   de_jsongetr   )clsr   r   r   r   r   r   ?   s
    
zGameHighScore.de_json)N)__name__
__module____qualname____doc__	__slots__intr   r   r   r   classmethodr   __classcell__r   r   r   r   r      s         r   N)r   typingr   r   Ztelegram._telegramobjectr   Ztelegram._userr   Ztelegram._utils.typesr   Ztelegramr   r   r   r   r   r   <module>   s   