U
    g
                     @   s\   d Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	 erHddl
mZ G dd deZd	S )
z;This module contains an object related to a Telegram Story.    )TYPE_CHECKINGOptional)Chat)TelegramObject)JSONDict)Botc                       sb   e Zd ZdZdZddeeee dd fddZ	e
dee ed ed  d	 fd
dZ  ZS )Storya  
    This object represents a story.

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

    .. versionadded:: 20.5

    .. versionchanged:: 21.0
        Added attributes :attr:`chat` and :attr:`id` and equality based on them.

    Args:
        chat (:class:`telegram.Chat`): Chat that posted the story.
        id (:obj:`int`): Unique identifier for the story in the chat.

    Attributes:
        chat (:class:`telegram.Chat`): Chat that posted the story.
        id (:obj:`int`): Unique identifier for the story in the chat.

    )chatidN
api_kwargs)r	   r
   r   returnc                   s4   t  j|d || _|| _| j| jf| _|   d S )Nr   )super__init__r	   r
   Z	_id_attrsZ_freeze)selfr	   r
   r   	__class__ 3/tmp/pip-unpacked-wheel-swnnwir2/telegram/_story.pyr   :   s
    zStory.__init__r   )databotr   c                    s:   |  |}|sdS t|di ||d< t j||dS )z,See :meth:`telegram.TelegramObject.de_json`.Nr	   )r   r   )Z_parse_datar   de_jsongetr   )clsr   r   r   r   r   r   I   s
    
zStory.de_json)N)__name__
__module____qualname____doc__	__slots__r   intr   r   r   classmethodr   __classcell__r   r   r   r   r      s   
r   N)r   typingr   r   Ztelegram._chatr   Ztelegram._telegramobjectr   Ztelegram._utils.typesr   Ztelegramr   r   r   r   r   r   <module>   s   