
    di+                         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
 erddlmZ  G d d	e          Z G d
 de          ZdS )zOThis module contains an object that represents a chat owner change in the chat.    )TYPE_CHECKING)TelegramObject)User)de_json_optional)JSONDict)Botc                   f     e Zd ZdZdZdddededz  f fdZedded	d
dd f fd            Z	 xZ
S )ChatOwnerChangeda  This object represents a service message about an ownership change in the chat.

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

    .. versionadded:: 22.7

    Args:
        new_owner (:class:`telegram.User`): The new owner of the chat

    Attributes:
        new_owner (:class:`telegram.User`): The new owner of the chat

    	new_ownerN
api_kwargsr   r   c                    t                                          |           || _        | j        f| _        |                                  d S Nr   super__init__r   	_id_attrs_freezeselfr   r   	__class__s      P/root/projects/qq-shell/venv/lib/python3.11/site-packages/telegram/_chatowner.pyr   zChatOwnerChanged.__init__2   sD     	J///(.*    databot
Bot | Nonereturnc                     |                      |          }t          |                    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ChatOwnerChanged.de_json?   R     t$$,TXXk-B-BD#NN[wwDc222r   N__name__
__module____qualname____doc__	__slots__r   r   r   classmethodr$   __classcell__r   s   @r   r
   r
       s          I '+	   tO	      3 38 3, 3BT 3 3 3 3 3 [3 3 3 3 3r   r
   c                   p     e Zd ZdZdZ	 dddd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 )ChatOwnerLeftap  This object represents a service message about the chat owner leaving the chat.

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

    .. versionadded:: 22.7

    Args:
        new_owner (:class:`telegram.User`, optional): The user which will be the new owner of the
            chat if the previous owner does not return to the chat

    Attributes:
        new_owner (:class:`telegram.User`): Optional. The user which will be the new owner of the
            chat if the previous owner does not return to the chat

    r   Nr   r   r   c                    t                                          |           || _        | j        f| _        |                                  d S r   r   r   s      r   r   zChatOwnerLeft.__init__]   sD     	J///&/.*r   r   r   r   r   c                     |                      |          }t          |                    d          t          |          |d<   t	                                          ||          S r    r!   r%   s      r   r$   zChatOwnerLeft.de_jsonj   r'   r   r(   r)   r1   s   @r   r3   r3   I   s         " I "& '+	  $; tO	      3 38 3, 3/ 3 3 3 3 3 [3 3 3 3 3r   r3   N)r-   typingr   telegram._telegramobjectr   telegram._userr   telegram._utils.argumentparsingr   telegram._utils.typesr   telegramr   r
   r3    r   r   <module>r=      s   & V U             3 3 3 3 3 3       < < < < < < * * * * * * &3 &3 &3 &3 &3~ &3 &3 &3R(3 (3 (3 (3 (3N (3 (3 (3 (3 (3r   