
    Ii+                         S r SSKJrJrJr  SSKJr  SSKJr  SSK	J
r
  SSKJrJr  SSKJr   " S S	\5      r " S
 S\5      r " S S\5      rg)zOThis module contains two objects used for request chats/users service messages.    )OptionalSequenceTuple)TelegramObject)JSONDict)warn)!build_deprecation_warning_message&warn_about_deprecated_attr_in_property)PTBDeprecationWarningc                   T   ^  \ rS rSrSrSrSS.S\S\\   S\\	   4U 4S	 jjjr
S
rU =r$ )UsersShared    a  
This object contains information about the user whose identifier was shared with the bot
using a :class:`telegram.KeyboardButtonRequestUsers` button.

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

.. versionadded:: 20.8
   Bot API 7.0 replaces :class:`UserShared` with this class. The only difference is that now
   the :attr:`user_ids` is a sequence instead of a single integer.

Args:
    request_id (:obj:`int`): Identifier of the request.
    user_ids (Sequence[:obj:`int`]): Identifiers of the shared users. These numbers may have
        more than 32 significant bits and some programming languages may have difficulty/silent
        defects in interpreting them. But they have at most 52 significant bits, so 64-bit
        integers or double-precision float types are safe for storing these identifiers. The
        bot may not have access to the users and could be unable to use these identifiers,
        unless the users are already known to the bot by some other means.

Attributes:
    request_id (:obj:`int`): Identifier of the request.
    user_ids (Tuple[:obj:`int`]): Identifiers of the shared users. These numbers may have
        more than 32 significant bits and some programming languages may have difficulty/silent
        defects in interpreting them. But they have at most 52 significant bits, so 64-bit
        integers or double-precision float types are safe for storing these identifiers. The
        bot may not have access to the users and could be unable to use these identifiers,
        unless the users are already known to the bot by some other means.
)
request_iduser_idsN
api_kwargsr   r   r   c                   > [         TU ]  US9  Xl        [        U5      U l        U R                  U R                  4U l        U R                  5         g Nr   )super__init__r   tupler   	_id_attrs_freeze)selfr   r   r   	__class__s       6/venv/lib/python3.13/site-packages/telegram/_shared.pyr   UsersShared.__init__A   sB     	J/)).x//4==9    )r   r   r   )__name__
__module____qualname____firstlineno____doc__	__slots__intr   r   r   r   __static_attributes____classcell__r   s   @r   r   r       sC    < +I *. 3-
 X& r   r   c                   f   ^  \ rS rSrSrSrSS.S\S\S\\   4U 4S	 jjjr	\
S
\4S j5       rSrU =r$ )
UserSharedQ   zAlias for :class:`UsersShared`, kept for backward compatibility.

.. versionadded:: 20.1

.. deprecated:: 20.8
    Use :class:`UsersShared` instead.

 Nr   r   user_idr   c          	      v   > [         TU ]  X4US9  [        [        SSSSS9[        SS9  U R                  5         g )	Nr   r*   r   class7.0)deprecated_namenew_nameobject_typebot_api_version   )
stacklevel)r   r   r   r	   r   r   )r   r   r-   r   r   s       r   r   UserShared.__init__]   sH     	ZJG- ,&# %	 "		
 	r   returnc                 6    [        SSSS9  U R                  S   $ )zAlias for the first entry of :attr:`UsersShared.user_ids`.

.. deprecated:: 20.8
   Bot API 7.0 deprecates this attribute in favor of :attr:`UsersShared.user_ids`.
r-   r   r0   )deprecated_attr_namenew_attr_namer4   r   )r
   r   )r   s    r   r-   UserShared.user_ids   s&     	/!*$!	

 }}Qr   )r   r    r!   r"   r#   r$   r%   r   r   r   propertyr-   r&   r'   r(   s   @r   r*   r*   Q   sZ     I *. 
 X& ,      r   r*   c                   N   ^  \ rS rSrSrSrSS.S\S\S\\   4U 4S	 jjjr	S
r
U =r$ )
ChatShared   aw  
This object contains information about the chat whose identifier was shared with the bot
using a :class:`telegram.KeyboardButtonRequestChat` button.

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

.. versionadded:: 20.1

Args:
    request_id (:obj:`int`): Identifier of the request.
    chat_id (:obj:`int`): Identifier of the shared user. This number may be greater than 32
        bits and some programming languages may have difficulty/silent defects in interpreting
        it. But it is smaller than 52 bits, so a signed 64-bit integer or double-precision
        float type are safe for storing this identifier.

Attributes:
    request_id (:obj:`int`): Identifier of the request.
    chat_id (:obj:`int`): Identifier of the shared user. This number may be greater than 32
        bits and some programming languages may have difficulty/silent defects in interpreting
        it. But it is smaller than 52 bits, so a signed 64-bit integer or double-precision
        float type are safe for storing this identifier.
)chat_idr   Nr   r   rA   r   c                   > [         TU ]  US9  Xl        X l        U R                  U R                  4U l        U R                  5         g r   )r   r   r   rA   r   r   )r   r   rA   r   r   s       r   r   ChatShared.__init__   s<     	J/)#//4<<8r   )r   rA   r   )r   r    r!   r"   r#   r$   r%   r   r   r   r&   r'   r(   s   @r   r?   r?      s?    0 *I *. 
 X& r   r?   N)r#   typingr   r   r   telegram._telegramobjectr   telegram._utils.typesr   telegram._utils.warningsr   #telegram._utils.warnings_transitionr	   r
   telegram.warningsr   r   r*   r?   r,   r   r   <module>rJ      sJ   & V , , 3 * ) 4.. .b.  . b( (r   