o
    Zzjð  ã                   @   st   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
mZ ddlmZ er0ddlmZ G d	d
„ d
eƒZdS )zNThis module contains an object that represents a Telegram Bot Access Settings.é    )ÚSequence)ÚTYPE_CHECKING)ÚTelegramObject)ÚUser)Úde_list_optionalÚparse_sequence_arg)ÚJSONDict)ÚBotc                	       sh   e Zd ZdZdZ	dddœdedee dB dedB f‡ fdd	„Z	e
dd
edddd f‡ fdd„ƒZ‡  ZS )ÚBotAccessSettingsaš  
    This object describes the access settings of a bot.

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

    .. versionadded:: 22.8

    Args:
        is_access_restricted (:obj:`bool`): :obj:`True`, if only selected users can access the bot.
            The bot's owner can always access it.
        added_users (Sequence[:class:`telegram.User`], optional): The list of other users who
            have access to the bot if the access is restricted.

    Attributes:
        is_access_restricted (:obj:`bool`): :obj:`True`, if only selected users can access the bot.
            The bot's owner can always access it.
        added_users (Sequence[:class:`telegram.User`]): Optional. The list of other users who
            have access to the bot if the access is restricted.
    )Úadded_usersÚis_access_restrictedN©Ú
api_kwargsr   r   r   c                   s8   t ƒ j|d� || _t|ƒ| _| j| jf| _|  ¡  d S )Nr   )ÚsuperÚ__init__r   r   r   Ú	_id_attrsÚ_freeze)Úselfr   r   r   ©Ú	__class__© úV/var/www/kodo/tsheker/venv/lib/python3.10/site-packages/telegram/_botaccesssettings.pyr   9   s
   
zBotAccessSettings.__init__ÚdataÚbotz
Bot | NoneÚreturnc                    s0   |   |¡}t| d¡t|ƒ|d< tƒ j||d�S )z,See :meth:`telegram.TelegramObject.de_json`.r   )r   r   )Ú_parse_datar   Úgetr   r   Úde_json)Úclsr   r   r   r   r   r   G   s   
zBotAccessSettings.de_json)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__Úboolr   r   r   r   Úclassmethodr   Ú__classcell__r   r   r   r   r
   !   s    ýûþ
ýû&r
   N)r"   Úcollections.abcr   Útypingr   Útelegram._telegramobjectr   Útelegram._userr   Útelegram._utils.argumentparsingr   r   Útelegram._utils.typesr   Útelegramr	   r
   r   r   r   r   Ú<module>   s   