U
    2tcW                     @   s   d Z ddlZddlmZmZmZmZ ddlm	Z	m
Z
 ddlmZmZ ddlmZ er`ddlmZ G dd	 d	e	ZG d
d de	ZG dd de	ZG dd de	ZdS )z=This module contains objects related to Telegram video chats.    N)TYPE_CHECKINGAnyOptionalList)TelegramObjectUser)from_timestampto_timestamp)JSONDict)Botc                   @   s"   e Zd ZdZdZedddZdS )VideoChatStartedz
    This object represents a service message about a video
    chat started in the chat. Currently holds no information.

    .. versionadded:: 13.12
     )_kwargsc                 K   s   d S Nr   )selfr   r   r   6/tmp/pip-unpacked-wheel-2u9rcp5s/telegram/videochat.py__init__+   s    zVideoChatStarted.__init__N)__name__
__module____qualname____doc__	__slots__r   r   r   r   r   r   r   !   s   r   c                   @   s&   e Zd ZdZdZeeddddZd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.12

    Args:
        duration (:obj:`int`): Voice chat duration in seconds.
        **kwargs (:obj:`dict`): Arbitrary keyword arguments.

    Attributes:
        duration (:obj:`int`): Voice chat duration in seconds.

    )duration	_id_attrsN)r   r   returnc                 K   s$   |d k	rt |nd | _| jf| _d S r   )intr   r   )r   r   r   r   r   r   r   E   s    zVideoChatEnded.__init__)r   r   r   r   r   r   r   r   r   r   r   r   r   /   s   r   c                       sl   e Zd ZdZdZee eddddZe	ddd	Z
eee d
ed  dddZed fddZ  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.12

    Args:
        users (List[:class:`telegram.User`]): New members that were invited to the video chat.
        **kwargs (:obj:`dict`): Arbitrary keyword arguments.

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

    usersr   N)r   r   r   c                 K   s   || _ | j f| _d S r   r   )r   r   r   r   r   r   r   ^   s    z%VideoChatParticipantsInvited.__init__r   c                 C   s   t t| jS r   )hashtupler   )r   r   r   r   __hash__b   s    z%VideoChatParticipantsInvited.__hash__r   databotr   c                 C   s4   |  |}|sdS t|dg ||d< | f |S ),See :meth:`telegram.TelegramObject.de_json`.Nr   )_parse_datar   Zde_listgetclsr%   r&   r   r   r   de_jsone   s
    
z$VideoChatParticipantsInvited.de_jsonc                    s"   t   }dd | jD |d< |S ),See :meth:`telegram.TelegramObject.to_dict`.c                 S   s   g | ]}|  qS r   )to_dict).0ur   r   r   
<listcomp>v   s     z8VideoChatParticipantsInvited.to_dict.<locals>.<listcomp>r   )superr.   r   r   r%   	__class__r   r   r.   r   s    
z$VideoChatParticipantsInvited.to_dict)r   r   r   r   r   r   r   r   r   r   r#   classmethodr   r
   r,   r.   __classcell__r   r   r4   r   r   J   s    r   c                       s\   e Zd ZdZdZejeddddZe	e
e de
d  dd	d
Zed fddZ  ZS )VideoChatScheduleda  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.

    .. versionadded:: 13.12

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

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

    
start_dater   N)r:   r   r   c                 K   s   || _ | j f| _d S r   r9   )r   r:   r   r   r   r   r      s    zVideoChatScheduled.__init__r   r$   c                 C   s4   |  |}|sdS t|d |d< | f |d|iS )r'   Nr:   r&   )r(   r   r*   r   r   r   r,      s
    
zVideoChatScheduled.de_jsonr    c                    s   t   }t| j|d< |S )r-   r:   )r2   r.   r	   r:   r3   r4   r   r   r.      s    
zVideoChatScheduled.to_dict)r   r   r   r   r   dtmdatetimer   r   r6   r   r
   r,   r.   r7   r   r   r4   r   r8   z   s   r8   )r   r<   r;   typingr   r   r   r   Ztelegramr   r   Ztelegram.utils.helpersr   r	   Ztelegram.utils.typesr
   r   r   r   r   r8   r   r   r   r   <module>   s   0