
    $j                     h   d Z ddlmZmZ ddlmZ  G d de          Z G d dee          Z	 G d d	ee
          Z G d
 dee          Z G d dee          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Zd ZdS )z
    Hindsight HTTP API

    HTTP API for Hindsight

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

    Do not edit the class manually.
    )AnyOptional)Selfc                       e Zd ZdZdS )OpenApiExceptionz2The base exception class for all OpenAPIExceptionsN)__name__
__module____qualname____doc__     g/home/rurouni/.hermes/hermes-agent/venv/lib/python3.11/site-packages/hindsight_client_api/exceptions.pyr   r      s        <<<<r   r   c                   (     e Zd Z	 	 d	 d fdZ xZS )ApiTypeErrorNreturnc                     || _         || _        || _        |}|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__s         r   r   zApiTypeError.__init__   sk    & )*  	K#**3L0I0IJJHlD!!**844444r   NNNr   Nr   r	   r
   r   __classcell__r   s   @r   r   r      sK        =A5#'5 5 5 5 5 5 5 5 5 5r   r   c                   "     e Zd Zdd fdZ xZS )ApiValueErrorNr   c                     || _         |}|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   s       r   r   zApiValueError.__init__3   s\     ) 	K#**3L0I0IJJHmT""++H55555r   Nr    r!   r#   s   @r   r%   r%   2   sB        6 6 6 6 6 6 6 6 6 6 6r   r%   c                   "     e Zd Zdd fdZ xZS )ApiAttributeErrorNr   c                     || _         |}|r#d                    |t          |                    }t          t          |                               |           dS )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'   s       r   r   zApiAttributeError.__init__E   s]     ) 	K#**3L0I0IJJH&&//99999r   r(   r    r!   r#   s   @r   r*   r*   D   sB        : : : : : : : : : : :r   r*   c                   "     e Zd Zdd fdZ xZS )ApiKeyErrorNr   c                     || _         |}|r#d                    |t          |                    }t          t          |                               |           dS )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'   s       r   r   zApiKeyError.__init__X   s\     ) 	K#**3L0I0IJJHk4  ))(33333r   r(   r    r!   r#   s   @r   r-   r-   W   sB        4 4 4 4 4 4 4 4 4 4 4r   r-   c                       e Zd Z	 	 	 d	ddddee         dee         ddfdZedee         dee         defd            Z	d Z
dS )
ApiExceptionN)bodydatar1   r2   r   c                B   || _         || _        || _        || _        d | _        |ry| j         |j         | _         | j        |j        | _        | j        1	 |j                            d          | _        n# t          $ r Y nw xY w|                                | _        d S d S )Nzutf-8)statusreasonr1   r2   headersdecode	Exception
getheaders)r   r4   r5   	http_respr1   r2   s         r   r   zApiException.__init__j   s     		 
	2{"'.{"'.y  ) 5 5g > >DII    D$//11DLLL
	2 
	2s   A4 4
B Bc                \   |j         dk    rt          |||          |j         dk    rt          |||          |j         dk    rt          |||          |j         dk    rt	          |||          d|j         cxk    rdk    rn nt          |||          t          |||          )Ni  )r:   r1   r2   i  i  i  i  iW  )r4   BadRequestExceptionUnauthorizedExceptionForbiddenExceptionNotFoundExceptionServiceExceptionr0   )clsr:   r1   r2   s       r   from_responsezApiException.from_response   s     s""%	4PPPPs""')$TRRRRs""$yt$OOOOs""#idNNNN)"))))c)))))"YTMMMMYTEEEEr   c                     d                     | j        | j                  }| j        r|d                     | j                  z  }| j        s| j        r$|d                     | j        p| j                  z  }|S )z#Custom error messages for exceptionz({0})
Reason: {1}
zHTTP response headers: {0}
zHTTP response body: {0}
)r   r4   r5   r6   r2   r1   )r   error_messages     r   __str__zApiException.__str__   s    ((.t{DK(H(H 	< 	;BB  M 9 	X	 	X8??	@VTYWWWMr   r   )r   r	   r
   r   strr   r   classmethodr   rB   rE   r   r   r   r0   r0   h   s         	2 #"2 2 2 sm2 sm2 
2 2 2 26 F sm	F
 smF 
F F F [F.    r   r0   c                       e Zd ZdS )r<   Nr   r	   r
   r   r   r   r<   r<              Dr   r<   c                       e Zd ZdS )r?   NrI   r   r   r   r?   r?      rJ   r   r?   c                       e Zd ZdS )r=   NrI   r   r   r   r=   r=      rJ   r   r=   c                       e Zd ZdS )r>   NrI   r   r   r   r>   r>      rJ   r   r>   c                       e Zd ZdS )r@   NrI   r   r   r   r@   r@      rJ   r   r@   c                     d}| D ]H}t          |t                    r|d                    |          z  }0|d                    |          z  }I|S )z)Returns a string representation of a path z[{0}]z['{0}'])
isinstanceintr   )r   resultpths      r   r   r      s_    F , ,c3 	,gnnS)))FFi&&s+++FFMr   N)r   typingr   r   typing_extensionsr   r8   r   	TypeErrorr   
ValueErrorr%   AttributeErrorr*   KeyErrorr-   r0   r<   r?   r=   r>   r@   r   r   r   r   <module>r[      s8  	 	 !               " " " " " "= = = = =y = = =5 5 5 5 5#Y 5 5 5:6 6 6 6 6$j 6 6 6$: : : : :(. : : :&4 4 4 4 4"H 4 4 4"@ @ @ @ @# @ @ @F	 	 	 	 	, 	 	 		 	 	 	 	 	 	 		 	 	 	 	L 	 	 		 	 	 	 	 	 	 		 	 	 	 	| 	 	 	    r   