U
    2Òtcø
  ã                   @   s\   d Z ddlmZmZmZmZ ddlmZmZ ddl	m
Z
 erHddlmZ G dd„ deƒZdS )	zLThis module contains an object that represents a Telegram UserProfilePhotos.é    )ÚTYPE_CHECKINGÚAnyÚListÚOptional)Ú	PhotoSizeÚTelegramObject)ÚJSONDict)ÚBotc                       sp   e Zd ZdZdZeeee  edœdd„Z	e
ee ded  dœdd	„ƒZed
œ‡ fdd„Zed
œdd„Z‡  ZS )ÚUserProfilePhotosam  This object represent a user's profile pictures.

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

    Args:
        total_count (:obj:`int`): Total number of profile pictures the target user has.
        photos (List[List[:class:`telegram.PhotoSize`]]): Requested profile pictures (in up to 4
            sizes each).

    Attributes:
        total_count (:obj:`int`): Total number of profile pictures.
        photos (List[List[:class:`telegram.PhotoSize`]]): Requested profile pictures.

    )ÚphotosÚtotal_countÚ	_id_attrs)r   r   Ú_kwargsc                 K   s"   t |ƒ| _|| _| j| jf| _d S ©N)Úintr   r   r   )Úselfr   r   r   © r   ú>/tmp/pip-unpacked-wheel-2u9rcp5s/telegram/userprofilephotos.pyÚ__init__1   s    
zUserProfilePhotos.__init__r	   )ÚdataÚbotÚreturnc                    s6   |   |¡}|sdS ‡ fdd„|d D ƒ|d< | f |ŽS )z,See :meth:`telegram.TelegramObject.de_json`.Nc                    s   g | ]}t  |ˆ ¡‘qS r   )r   Zde_list©Ú.0Úphoto©r   r   r   Ú
<listcomp>@   s     z-UserProfilePhotos.de_json.<locals>.<listcomp>r   )Z_parse_data)Úclsr   r   r   r   r   Úde_json8   s
    
zUserProfilePhotos.de_json)r   c                    s:   t ƒ  ¡ }g |d< | jD ]}|d  dd„ |D ƒ¡ q|S )z,See :meth:`telegram.TelegramObject.to_dict`.r   c                 S   s   g | ]}|  ¡ ‘qS r   )Úto_dict)r   Úxr   r   r   r   J   s     z-UserProfilePhotos.to_dict.<locals>.<listcomp>)Úsuperr   r   Úappend)r   r   r   ©Ú	__class__r   r   r   D   s
    

zUserProfilePhotos.to_dictc                 C   s   t tdd„ | jD ƒƒƒS )Nc                 s   s    | ]}t d d„ |D ƒƒV  qdS )c                 s   s   | ]
}|V  qd S r   r   )r   Úpr   r   r   Ú	<genexpr>O   s     z7UserProfilePhotos.__hash__.<locals>.<genexpr>.<genexpr>N)Útupler   r   r   r   r&   O   s     z-UserProfilePhotos.__hash__.<locals>.<genexpr>)Úhashr'   r   )r   r   r   r   Ú__hash__N   s    zUserProfilePhotos.__hash__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   r   r   r   Úclassmethodr   r   r   r   r)   Ú__classcell__r   r   r#   r   r
      s   
r
   N)r-   Útypingr   r   r   r   Ztelegramr   r   Ztelegram.utils.typesr   r	   r
   r   r   r   r   Ú<module>   s   