U
    gz                     @   sd   d Z ddlmZmZmZmZ ddlmZ ddlm	Z	 ddl
mZ erPddlmZ G dd de	Zd	S )
zLThis module contains an object that represents a Telegram UserProfilePhotos.    )TYPE_CHECKINGOptionalSequenceTuple)	PhotoSize)TelegramObject)JSONDict)Botc                       sh   e Zd ZdZdZdde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 )UserProfilePhotosa.  This object represents 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 (Sequence[Sequence[:class:`telegram.PhotoSize`]]): Requested profile pictures (in up
            to 4 sizes each).

            .. versionchanged:: 20.0
                |sequenceclassargs|

    Attributes:
        total_count (:obj:`int`): Total number of profile pictures.
        photos (Tuple[Tuple[:class:`telegram.PhotoSize`]]): Requested profile pictures (in up to 4
            sizes each).

            .. versionchanged:: 20.0
                |tupleclassattrs|

    )photostotal_countN
api_kwargs)r   r   r   c                   sB   t  j|d || _tdd |D | _| j| jf| _|   d S )Nr   c                 s   s   | ]}t |V  qd S )N)tuple).0Zsizes r   ?/tmp/pip-unpacked-wheel-swnnwir2/telegram/_userprofilephotos.py	<genexpr>B   s     z-UserProfilePhotos.__init__.<locals>.<genexpr>)super__init__r   r   r   Z	_id_attrsZ_freeze)selfr   r   r   	__class__r   r   r   8   s
    zUserProfilePhotos.__init__r	   )databotreturnc                    s<   |  |}|sdS  fdd|d D |d< t j| dS )z,See :meth:`telegram.TelegramObject.de_json`.Nc                    s   g | ]}t | qS r   )r   Zde_list)r   Zphotor   r   r   
<listcomp>R   s     z-UserProfilePhotos.de_json.<locals>.<listcomp>r   )r   r   )Z_parse_datar   de_json)clsr   r   r   r   r   r   H   s
    
zUserProfilePhotos.de_json)N)__name__
__module____qualname____doc__	__slots__intr   r   r   r   r   classmethodr   __classcell__r   r   r   r   r
      s   
  r
   N)r#   typingr   r   r   r   Ztelegram._files.photosizer   Ztelegram._telegramobjectr   Ztelegram._utils.typesr   Ztelegramr	   r
   r   r   r   r   <module>   s   