
    /j                     z    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rddlmZ  G d	 d
e      Zy)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            	       t     e Zd ZdZdZ	 ddddedee   dz  dedz  f fdZ	e
dd	ed
ddd f fd       Z x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                    t         |   |       || _        t        |      | _        | j                  | j                  f| _        | j                          y )Nr   )super__init__r   r   r   	_id_attrs_freeze)selfr   r   r   	__class__s       Y/var/www/html/maxservice/venv/lib/python3.12/site-packages/telegram/_botaccesssettings.pyr   zBotAccessSettings.__init__9   sK     	J/*>!-?-L33T5E5EF    databotz
Bot | Nonereturnc                     | j                  |      }t        |j                  d      t        |      |d<   t        |   ||      S )z,See :meth:`telegram.TelegramObject.de_json`.r   )r   r   )_parse_datar   getr   r   de_json)clsr   r   r   s      r   r    zBotAccessSettings.de_jsonG   sB     t$.txx/FcR]wDc22r   )N)__name__
__module____qualname____doc__	__slots__boolr   r   r	   r   classmethodr    __classcell__)r   s   @r   r   r   !   sv    * 8I
 .2
 '+" d^d*
 tO 38 3, 3BU 3 3r   r   N)r%   collections.abcr   typingr   telegram._telegramobjectr   telegram._userr   telegram._utils.argumentparsingr   r   telegram._utils.typesr	   telegramr
   r    r   r   <module>r2      s/   & U $   3  P *,3 ,3r   