o
    \h                      @   s   d Z G dd deZG dd deeZG dd deeZG dd deeZG d	d
 d
ee	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G dd deZdd ZdS )z
    Webhook Type Definition

    Webhook event definition of the LINE Messaging API  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
c                   @   s   e Zd ZdZdS )OpenApiExceptionz2The base exception class for all OpenAPIExceptionsN)__name__
__module____qualname____doc__ r   r   a/home/air/segue/gemini/backup/venv/lib/python3.10/site-packages/linebot/v3/webhooks/exceptions.pyr      s    r   c                       s"   e Zd Z		d fdd	Z  ZS )ApiTypeErrorNc                    s>   || _ || _|| _|}|rd|t|}tt| | dS )a   Raises an exception for TypeErrors

        Args:
            msg (str): the exception message

        Keyword Args:
            path_to_item (list): a list of keys an indices to get to the
                                 current_item
                                 None if unset
            valid_classes (tuple): the primitive classes that current item
                                   should be an instance of
                                   None if unset
            key_type (bool): False if our value is a value in a dict
                             True if it is a key in a dict
                             False if our item is an item in a list
                             None if unset
        
{0} at {1}N)path_to_itemvalid_classeskey_typeformatrender_pathsuperr   __init__)selfmsgr
   r   r   full_msg	__class__r   r   r      s   zApiTypeError.__init__NNNr   r   r   r   __classcell__r   r   r   r   r      s    r   c                          e Zd Zd fdd	Z  ZS )ApiValueErrorNc                    2   || _ |}|rd|t|}tt| | dS )z
        Args:
            msg (str): the exception message

        Keyword Args:
            path_to_item (list) the path to the exception in the
                received_data dict. None if unset
        r	   N)r
   r   r   r   r   r   r   r   r
   r   r   r   r   r   1   s
   
zApiValueError.__init__Nr   r   r   r   r   r   0       r   c                       r   )ApiAttributeErrorNc                    r   )a  
        Raised when an attribute reference or assignment fails.

        Args:
            msg (str): the exception message

        Keyword Args:
            path_to_item (None/list) the path to the exception in the
                received_data dict
        r	   N)r
   r   r   r   r   r   r   r   r   r   r   C   s
   zApiAttributeError.__init__r   r   r   r   r   r   r   B   r   r   c                       r   )ApiKeyErrorNc                    r   )z
        Args:
            msg (str): the exception message

        Keyword Args:
            path_to_item (None/list) the path to the exception in the
                received_data dict
        r	   N)r
   r   r   r   r    r   r   r   r   r   r   V   s
   	zApiKeyError.__init__r   r   r   r   r   r   r    U   r   r    c                   @   s   e Zd ZdddZdd ZdS )ApiExceptionNc                 C   sF   |r|j | _ |j| _|j| _| | _d S || _ || _d | _d | _d S r   )statusreasondatabody
getheadersheadersr   r"   r#   	http_respr   r   r   r   h   s   
zApiException.__init__c                 C   s@   d | j| j}| jr|d | j7 }| jr|d | j7 }|S )z#Custom error messages for exceptionz({0})
Reason: {1}
zHTTP response headers: {0}
zHTTP response body: {0}
)r   r"   r#   r'   r%   )r   error_messager   r   r   __str__t   s   zApiException.__str__r   )r   r   r   r   r+   r   r   r   r   r!   f   s    
r!   c                       r   )NotFoundExceptionNc                       t t| ||| d S r   )r   r,   r   r(   r   r   r   r         zNotFoundException.__init__r   r   r   r   r   r   r,          r,   c                       r   )UnauthorizedExceptionNc                    r-   r   )r   r0   r   r(   r   r   r   r      r.   zUnauthorizedException.__init__r   r   r   r   r   r   r0      r/   r0   c                       r   )ForbiddenExceptionNc                    r-   r   )r   r1   r   r(   r   r   r   r      r.   zForbiddenException.__init__r   r   r   r   r   r   r1      r/   r1   c                       r   )ServiceExceptionNc                    r-   r   )r   r2   r   r(   r   r   r   r      r.   zServiceException.__init__r   r   r   r   r   r   r2      r/   r2   c                 C   s:   d}| D ]}t |tr|d|7 }q|d|7 }q|S )z)Returns a string representation of a path z[{0}]z['{0}'])
isinstanceintr   )r
   resultpthr   r   r   r      s   
r   N)r   	Exceptionr   	TypeErrorr   
ValueErrorr   AttributeErrorr   KeyErrorr    r!   r,   r0   r1   r2   r   r   r   r   r   <module>   s   