
    j                     n   U d dl mZmZmZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dlm
Z d dlmZ d dlmZ g d	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 G d de      Z G d de      Z G d de      ZeZeZeeeeedZeeee   f   ed<   y)    )AnyDictType)ApiError)ConnectionError)ConnectionTimeout)SerializationError)TlsError)TransportError)TransportWarning)
r	   r   r   SSLErrorr   AuthorizationExceptionAuthenticationExceptionNotFoundErrorConflictErrorBadRequestErrorc                   Z    e Zd Zedefd       Zedefd       Zedefd       Z	defdZ
y)r   returnc                 .    | j                   j                  S )z7Backwards-compatible way to access ``self.meta.status``)metastatusselfs    w/var/www/internaltesting/Shamanth/prverification/HIS_auto/venv/lib/python3.12/site-packages/elasticsearch/exceptions.pystatus_codezApiError.status_code+   s     yy    c                     | j                   S )z3Backwards-compatible way to access ``self.message``messager   s    r   errorzApiError.error0   s     ||r   c                     | j                   S )z0Backwards-compatible way to access ``self.body``)bodyr   s    r   infozApiError.info5   s     yyr   c                    d}	 | j                   rt        | j                   t              rd| j                   v rt        | j                   d   t              r| j                   d   d   d   }| j                   d   j                  di       }dj	                  t        d t        |d         |j                  d      |j                  d	      |j                  d      g            }nt        | j                   d         }dj	                  t        d t        | j                        t        | j                        |g            }| j                  j                   d
| dS # t        $ r Y kw xY w)N r    
root_causer   	caused_byz, reasonzresource.idzresource.type())r"   
isinstancedictgetjoinfilterreprLookupErrorstrr   r    	__class____name__)r   causer&   r'   msgs        r   __str__zApiError.__str__:   s9   	yyZ		48W		=Qdii0$7!%7!3L!A!!DJ $		' 2 6 6{B GI II  $Z%9 : *} = * ? )h 7	
E !7!34E iitc$*:*:&;T$**=Mu%UVW..))*!C522  		s   C6E 	E&%E&N)r4   
__module____qualname__propertyintr   r2   r    r   r#   r7    r   r   r   r   *   s]     S     s   c  3 3r   r   c                       e Zd ZdZdefdZy)UnsupportedProductErrorzaError which is raised when the client detects
    it's not connected to a supported product.
    r   c                     | j                   S )Nr   r   s    r   r7   zUnsupportedProductError.__str__Z   s    ||r   N)r4   r8   r9   __doc__r2   r7   r<   r   r   r>   r>   U   s     r   r>   c                       e Zd ZdZy)r   z)Exception representing a 404 status code.Nr4   r8   r9   r@   r<   r   r   r   r   ^       3r   r   c                       e Zd ZdZy)r   z)Exception representing a 409 status code.NrB   r<   r   r   r   r   b   rC   r   r   c                       e Zd ZdZy)r   z)Exception representing a 400 status code.NrB   r<   r   r   r   r   f   rC   r   r   c                       e Zd ZdZy)r   z)Exception representing a 401 status code.NrB   r<   r   r   r   r   j   rC   r   r   c                       e Zd ZdZy)r   z)Exception representing a 403 status code.NrB   r<   r   r   r   r   n   rC   r   r   c                       e Zd ZdZy)ElasticsearchWarningzuWarning that is raised when a deprecated option
    or incorrect usage is flagged via the 'Warning' HTTP header.
    NrB   r<   r   r   rI   rI   r   s    r   rI   c                       e Zd ZdZy)GeneralAvailabilityWarningz4Warning that is raised when a feature is not yet GA.NrB   r<   r   r   rK   rK   x   s    >r   rK   )i  i  i  i  i  HTTP_EXCEPTIONSN)typingr   r   r   elastic_transportr   	_ApiErrorr   r   r	   r
   r   r   r   __all__r>   r   r   r   r   r   rI   rK   ElasticsearchDeprecationWarningRequestErrorrL   r;   __annotations__r<   r   r   <module>rT      s   $ # " 3 @ D F 2 > .(3y (3Vh 4H 44H 44h 44h 44X 4+ ?!1 ?
 #7  
	 			.c4>)* r   