
    Yi%                         S r SSKrSSKJrJr  SSKJr  SSKJr  SSK	J
r
Jr  SSKJr  \(       a  SSKJr   " S	 S
\5      rg)zIThis module contains an object that represents an invite link for a chat.    N)TYPE_CHECKINGOptional)TelegramObject)User)extract_tzinfo_from_defaultsfrom_timestamp)JSONDict)Botc                      ^  \ rS rSrSrSr      SSS.S\S\S\S	\S
\S\	\
R                     S\	\   S\	\   S\	\   S\	\   S\	\   S\	\   4U 4S jjjjr\ SS\	\   S\	S   S\	S    4U 4S jjj5       rSrU =r$ )ChatInviteLink    u  This object represents an invite link for a chat.

Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`invite_link`, :attr:`creator`, :attr:`creates_join_request`,
:attr:`is_primary` and :attr:`is_revoked` are equal.

.. versionadded:: 13.4
.. versionchanged:: 20.0

   * The argument & attribute :attr:`creates_join_request` is now required to comply with the
     Bot API.
   * Comparing objects of this class now also takes :attr:`creates_join_request` into account.

Args:
    invite_link (:obj:`str`): The invite link.
    creator (:class:`telegram.User`): Creator of the link.
    creates_join_request (:obj:`bool`): :obj:`True`, if users joining the chat via
        the link need to be approved by chat administrators.

        .. versionadded:: 13.8
    is_primary (:obj:`bool`): :obj:`True`, if the link is primary.
    is_revoked (:obj:`bool`): :obj:`True`, if the link is revoked.
    expire_date (:class:`datetime.datetime`, optional): Date when the link will expire or
        has been expired.

        .. versionchanged:: 20.3
            |datetime_localization|
    member_limit (:obj:`int`, optional): Maximum number of users that can be members of the
        chat simultaneously after joining the chat via this invite link;
        :tg-const:`telegram.constants.ChatInviteLinkLimit.MIN_MEMBER_LIMIT`-
        :tg-const:`telegram.constants.ChatInviteLinkLimit.MAX_MEMBER_LIMIT`.
    name (:obj:`str`, optional): Invite link name.
        0-:tg-const:`telegram.constants.ChatInviteLinkLimit.NAME_LENGTH` characters.

        .. versionadded:: 13.8
    pending_join_request_count (:obj:`int`, optional): Number of pending join requests
        created using this link.

        .. versionadded:: 13.8
    subscription_period (:obj:`int`, optional): The number of seconds the subscription will be
        active for before the next payment.

        .. versionadded:: 21.5
    subscription_price (:obj:`int`, optional): The amount of Telegram Stars a user must pay
        initially and after each subsequent subscription period to be a member of the chat
        using the link.

        .. versionadded:: 21.5

Attributes:
    invite_link (:obj:`str`): The invite link. If the link was created by another chat
        administrator, then the second part of the link will be replaced with ``'…'``.
    creator (:class:`telegram.User`): Creator of the link.
    creates_join_request (:obj:`bool`): :obj:`True`, if users joining the chat via
        the link need to be approved by chat administrators.

        .. versionadded:: 13.8
    is_primary (:obj:`bool`): :obj:`True`, if the link is primary.
    is_revoked (:obj:`bool`): :obj:`True`, if the link is revoked.
    expire_date (:class:`datetime.datetime`): Optional. Date when the link will expire or
        has been expired.

        .. versionchanged:: 20.3
            |datetime_localization|
    member_limit (:obj:`int`): Optional. Maximum number of users that can be members
        of the chat simultaneously after joining the chat via this invite link;
        :tg-const:`telegram.constants.ChatInviteLinkLimit.MIN_MEMBER_LIMIT`-
        :tg-const:`telegram.constants.ChatInviteLinkLimit.MAX_MEMBER_LIMIT`.
    name (:obj:`str`): Optional. Invite link name.
        0-:tg-const:`telegram.constants.ChatInviteLinkLimit.NAME_LENGTH` characters.

        .. versionadded:: 13.8
    pending_join_request_count (:obj:`int`): Optional. Number of pending join requests
        created using this link.

        .. versionadded:: 13.8
    subscription_period (:obj:`int`): Optional. The number of seconds the subscription will be
        active for before the next payment.

        .. versionadded:: 21.5
    subscription_price (:obj:`int`): Optional. The amount of Telegram Stars a user must pay
        initially and after each subsequent subscription period to be a member of the chat
        using the link.

        .. versionadded:: 21.5

)creates_join_requestcreatorexpire_dateinvite_link
is_primary
is_revokedmember_limitnamepending_join_request_countsubscription_periodsubscription_priceN
api_kwargsr   r   r   r   r   r   r   r   r   r   r   r   c                ^  > [         TU ]  US9  Xl        X l        X0l        X@l        XPl        X`l        Xpl        Xl	        U	b  [        U	5      OS U l        Xl        Xl        U R                  U R                  U R                  U R
                  U R                  4U l        U R                  5         g )Nr   )super__init__r   r   r   r   r   r   r   r   intr   r   r   	_id_attrs_freeze)selfr   r   r   r   r   r   r   r   r   r   r   r   	__class__s                C/app/.venv/lib/python3.13/site-packages/telegram/_chatinvitelink.pyr   ChatInviteLink.__init__   s      	J/ +$*>! * * 9D+7#'	/I/UC*+[_ 	' 3F 1C %%LLOOOO
 	    databotr
   returnc                    > U R                  U5      nU(       d  g[        U5      n[        R                  " UR	                  S5      U5      US'   [        UR	                  SS5      US9US'   [        TU ]  XS9$ )z,See :meth:`telegram.TelegramObject.de_json`.Nr   r   )tzinfo)r&   r'   )_parse_datar   r   de_jsongetr   r   )clsr&   r'   
loc_tzinfor"   s       r#   r,   ChatInviteLink.de_json   sp    
 t$ 2#6
,,txx	':C@Y,TXXmT-JS]^]wD22r%   )r   r   r   r   r   r   r   r   r   r   r   r   )NNNNNN)N)__name__
__module____qualname____firstlineno____doc__	__slots__strr   boolr   datetimer   r	   r   classmethodr,   __static_attributes____classcell__)r"   s   @r#   r   r       s   VpI* 48&*"48-1,0* *.** * #	*
 * * h//0* sm* sm* %-SM* &c]* %SM* X&* *X >B3H%3,4UO3	"	#3 3r%   r   )r5   r9   typingr   r   telegram._telegramobjectr   telegram._userr   telegram._utils.datetimer   r   telegram._utils.typesr	   telegramr
   r    r%   r#   <module>rD      s1   & P  * 3  Q *c3^ c3r%   