
    ci                        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<   dS )    )AnyDictType)ApiError)ConnectionError)ConnectionTimeout)SerializationError)TlsError)TransportError)TransportWarning)
r	   r   r   SSLErrorr   AuthorizationExceptionAuthenticationExceptionNotFoundErrorConflictErrorBadRequestErrorc                   n    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
dS )r   returnc                     | j         j        S )z7Backwards-compatible way to access ``self.meta.status``)metastatusselfs    X/var/www/html/auto_sub_bot/venv/lib/python3.11/site-packages/elasticsearch/exceptions.pystatus_codezApiError.status_code+   s     y    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     yr   c                    d}	 | j         rt          | j         t                    rd| j         v rt          | j         d         t                    r| j         d         d         d         }| j         d                             di           }d                    t          d t          |d                   |                    d          |                    d	          |                    d          g                    }nt          | j         d                   }n# t          $ r Y nw xY wd                    t          d t          | j	                  t          | j
                  |g                    }| j        j         d
| dS )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__:   sq   	y 5Z	488 5W	=Q=Qdi0$77 5!%7!3L!A!!DJ $	' 2 6 6{B G GI II  $Z%9 : : *} = = * ? ? )h 7 7	 
 
EE !7!344E 	 	 	D	iitc$*:&;&;T$*=M=Mu%UVVWW.)22C2222s   DD 
D%$D%N)r4   
__module____qualname__propertyintr   r2   r    r   r#   r7    r   r   r   r   *   s         S       X  s    X c    X3 3 3 3 3 3 3r   r   c                       e Zd ZdZdefdZdS )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   s9               r   r>   c                       e Zd ZdZdS )r   z)Exception representing a 404 status code.Nr4   r8   r9   r@   r<   r   r   r   r   ^           3333r   r   c                       e Zd ZdZdS )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dS )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dS )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dS )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dS )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dS )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 3 3 3 3 3 @ @ @ @ @ @ D D D D D D F F F F F F 2 2 2 2 2 2 > > > > > > . . . . . .  (3 (3 (3 (3 (3y (3 (3 (3V    h   4 4 4 4 4H 4 4 44 4 4 4 4H 4 4 44 4 4 4 4h 4 4 44 4 4 4 4h 4 4 44 4 4 4 4X 4 4 4    +   ? ? ? ? ?!1 ? ? ?
 #7  
	 			. .c4>)*     r   