
    i                         d Z ddl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mZmZ dd	lmZmZ erdd
lmZ  G d de          Z G d de          Z G d de          Z G d de          ZdS )z=This module contains objects related to Telegram video chats.    N)Sequence)TYPE_CHECKING)TelegramObject)User)parse_sequence_argto_timedelta)extract_tzinfo_from_defaultsfrom_timestampget_timedelta_value)JSONDict
TimePeriod)Botc                   <     e Zd ZdZdZdddedz  ddf fdZ xZS )VideoChatStarteda  
    This object represents a service message about a video
    chat started in the chat. Currently holds no information.

    .. versionadded:: 13.4
    .. versionchanged:: 20.0
        This class was renamed from ``VoiceChatStarted`` in accordance to Bot API 6.0.
     N
api_kwargsr   returnc                t    t                                          |           |                                  d S Nr   )super__init___freeze)selfr   	__class__s     S/Users/shanyulin/my-agent/.venv/lib/python3.11/site-packages/telegram/_videochat.pyr   zVideoChatStarted.__init__3   s/    J///    )__name__
__module____qualname____doc__	__slots__r   r   __classcell__r   s   @r   r   r   '   sm          I8<   ho           r   r   c                   l     e Zd ZdZdZdddededz  ddf fdZede	e
j        z  fd	            Z xZS )
VideoChatEndeda  
    This object represents a service message about a
    video chat ended in the chat.

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

    .. versionadded:: 13.4
    .. versionchanged:: 20.0
        This class was renamed from ``VoiceChatEnded`` in accordance to Bot API 6.0.

    .. versionchanged:: v22.2
       As part of the migration to representing time periods using ``datetime.timedelta``,
       equality comparison now considers integer durations and equivalent timedeltas as equal.

    Args:
        duration (:obj:`int` | :class:`datetime.timedelta`): Voice chat duration
            in seconds.

            .. versionchanged:: v22.2
                |time-period-input|

    Attributes:
        duration (:obj:`int` | :class:`datetime.timedelta`): Voice chat duration in seconds.

            .. deprecated:: v22.2
                |time-period-int-deprecated|

    )	_durationNr   durationr   r   c                    t                                          |           t          |          | _        | j        f| _        |                                  d S r   )r   r   r   r'   	_id_attrsr   )r   r(   r   r   s      r   r   zVideoChatEnded.__init__[   sL     	J///(4X(>(>.*r   c                 .    t          | j        d          S )Nr(   )	attribute)r   r'   )r   s    r   r(   zVideoChatEnded.durationg   s     "Nj
 
 
 	
r   )r   r   r    r!   r"   r   r   r   propertyintdtm	timedeltar(   r#   r$   s   @r   r&   r&   9   s         > I '+	
 
 

 tO	

 

 
 
 
 
 
 
#- 
 
 
 X
 
 
 
 
r   r&   c                   v     e Zd ZdZdZdddee         dedz  ddf fdZe	dd	ed
ddd f fd            Z
 xZS )VideoChatParticipantsInviteda  
    This object represents a service message about new members invited to a video chat.

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

    .. versionadded:: 13.4
    .. versionchanged:: 20.0
        This class was renamed from ``VoiceChatParticipantsInvited`` in accordance to Bot API 6.0.

    Args:
        users (Sequence[:class:`telegram.User`]): New members that were invited to the video chat.

            .. versionchanged:: 20.0
                |sequenceclassargs|

    Attributes:
        users (tuple[:class:`telegram.User`]): New members that were invited to the video chat.

            .. versionchanged:: 20.0
                |tupleclassattrs|

    )usersNr   r3   r   r   c                    t                                          |           t          |          | _        | j        f| _        |                                  d S r   )r   r   r   r3   r*   r   )r   r3   r   r   s      r   r   z%VideoChatParticipantsInvited.__init__   sK     	J///'9%'@'@
*r   databot
Bot | Nonec                     |                      |          }t          j        |                    dg           |          |d<   t	                                          ||          S ),See :meth:`telegram.TelegramObject.de_json`.r3   r5   r6   )_parse_datar   de_listgetr   de_json)clsr5   r6   r   s      r   r>   z$VideoChatParticipantsInvited.de_json   sS     t$$TXXgr%:%:C@@WwwDc222r   N)r   r   r    r!   r"   r   r   r   r   classmethodr>   r#   r$   s   @r   r2   r2   n   s         0 I '+	
 
 
~
 tO	

 

 
 
 
 
 
 3 38 3, 3B` 3 3 3 3 3 [3 3 3 3 3r   r2   c                   t     e Zd ZdZdZdddej        dedz  ddf fdZe	dd	ed
ddd f fd            Z
 xZS )VideoChatScheduledaa  This object represents a service message about a video chat scheduled in the chat.

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

    .. versionchanged:: 20.0
        This class was renamed from ``VoiceChatScheduled`` in accordance to Bot API 6.0.

    Args:
        start_date (:obj:`datetime.datetime`): Point in time (Unix timestamp) when the video
            chat is supposed to be started by a chat administrator

            .. versionchanged:: 20.3
                |datetime_localization|
    Attributes:
        start_date (:obj:`datetime.datetime`): Point in time (Unix timestamp) when the video
            chat is supposed to be started by a chat administrator

            .. versionchanged:: 20.3
                |datetime_localization|

    )
start_dateNr   rD   r   r   c                    t                                          |           || _        | j        f| _        |                                  d S r   )r   r   rD   r*   r   )r   rD   r   r   s      r   r   zVideoChatScheduled.__init__   sD     	J///(2/+r   r5   r6   r7   c                     |                      |          }t          |          }t          |                    d          |          |d<   t	                                          ||          S )r9   rD   )tzinfor:   )r;   r	   r
   r=   r   r>   )r?   r5   r6   
loc_tzinfor   s       r   r>   zVideoChatScheduled.de_json   sb     t$$ 2#66
+DHH\,B,B:VVV\wwDc222r   r@   )r   r   r    r!   r"   r/   datetimer   r   rA   r>   r#   r$   s   @r   rC   rC      s         .  I '+	  L tO	
 
      	3 	38 	3, 	3BV 	3 	3 	3 	3 	3 [	3 	3 	3 	3 	3r   rC   )r!   rI   r/   collections.abcr   typingr   telegram._telegramobjectr   telegram._userr   telegram._utils.argumentparsingr   r   telegram._utils.datetimer	   r
   r   telegram._utils.typesr   r   telegramr   r   r&   r2   rC   r   r   r   <module>rR      s  & D C     $ $ $ $ $ $             3 3 3 3 3 3       L L L L L L L L         
 7 6 6 6 6 6 6 6     ~   $2
 2
 2
 2
 2
^ 2
 2
 2
j-3 -3 -3 -3 -3> -3 -3 -3`13 13 13 13 13 13 13 13 13 13r   