o
    #`^h                     @   s   d Z ddlZddlmZmZ ddlmZ ddlmZ ddl	m	Z	 ddl
mZ e	d	d
edG dd deeeZe	dd
edG dd deZe	dd
edG dd deZe	dd
edG dd deZdS )zlinebot.models.sources module.    N)ABCMetaabstractproperty)with_metaclass   )Base)
deprecated)LineBotSdkDeprecatedIn30zUse 'from linebot.v3.webhooks import Source' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.z3.0.0)reasonversioncategoryc                       s,   e Zd ZdZ fddZedd Z  ZS )SourcezAbstract Base Class of Source.c                    s    t t| jdi | d| _dS )z1__init__ method.

        :param kwargs:
        N )superr   __init__type)selfkwargs	__class__r   T/home/air/shanriGPT/back/venv/lib/python3.10/site-packages/linebot/models/sources.pyr   $   s   
zSource.__init__c                 C   s   t jdtdd t)zAbstract property of id to send a message.

        If SourceUser, return user_id.
        If SourceGroup, return group_id.
        If SourceRoom, return room_id.

        'sender_id' is deprecated.

        :rtype: str
        'sender_id' is deprecated.   
stacklevel)warningswarnDeprecationWarningNotImplementedErrorr   r   r   r   	sender_id,   s   zSource.sender_id)__name__
__module____qualname____doc__r   r   r   __classcell__r   r   r   r   r       s
    r   zUse 'from linebot.v3.webhooks import UserSource' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                       .   e Zd ZdZd fdd	Zedd Z  ZS )
SourceUserzSourceUser.

    https://developers.line.biz/en/reference/messaging-api/#source-user

    JSON object which contains the source user of the event.
    Nc                    s&   t t| jdi | d| _|| _dS )zc__init__ method.

        :param str user_id: ID of the source user
        :param kwargs:
        userNr   )r   r&   r   r   user_id)r   r(   r   r   r   r   r   E   s   
zSourceUser.__init__c                 C      t jdtdd | jS )zjAlias of user_id.

        'sender_id' is deprecated. Use 'user_id' instead.

        :rtype: str
        r   r   r   )r   r   r   r(   r   r   r   r   r   P      zSourceUser.sender_id)Nr    r!   r"   r#   r   propertyr   r$   r   r   r   r   r&   <   s
    r&   zUse 'from linebot.v3.webhooks import GroupSource' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                       r%   )SourceGroupzSourceGroup.

    https://developers.line.biz/en/reference/messaging-api/#source-group

    JSON object which contains the source group of the event.
    Nc                    ,   t t| jdi | d| _|| _|| _dS )z__init__ method.

        :param str group_id: ID of the source group
        :param str user_id: ID of the source user
        :param kwargs:
        groupNr   )r   r-   r   r   group_idr(   )r   r0   r(   r   r   r   r   r   e      
zSourceGroup.__init__c                 C   r)   )zlAlias of group_id.

        'sender_id' is deprecated. Use 'group_id' instead.

        :rtype: str
        r   r   r   )r   r   r   r0   r   r   r   r   r   r   r*   zSourceGroup.sender_idNNr+   r   r   r   r   r-   \   
    r-   zUse 'from linebot.v3.webhooks import RoomSource' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                       r%   )
SourceRoomzSourceRoom.

    https://developers.line.biz/en/reference/messaging-api/#source-room

    JSON object which contains the source room of the event.
    Nc                    r.   )z__init__ method.

        :param str room_id: ID of the source room
        :param str user_id: ID of the source user
        :param kwargs:
        roomNr   )r   r4   r   r   room_idr(   )r   r6   r(   r   r   r   r   r      r1   zSourceRoom.__init__c                 C   r)   )zjAlias of room_id.

        'sender_id' is deprecated. Use 'room_id' instead.

        :rtype: str
        r   r   r   )r   r   r   r6   r   r   r   r   r      r*   zSourceRoom.sender_idr2   r+   r   r   r   r   r4   ~   r3   r4   )r#   r   abcr   r   future.utilsr   baser   r   linebot.deprecationsr   r   r&   r-   r4   r   r   r   r   <module>   s   !