o
    gZh9                     @   s@   d dl Zd dlmZ ddlmZ ddlmZ G dd deZdS )    N)ObjectApiResponse   )NamespacedClient)_rewrite_parametersc                   @   s  e Zd ZdedejfddZe ddddddddeje	 dejej
e  d	eje	 d
ejejeej
e f  deje	 deje	 deej fddZe ddddddd	eje	 d
ejejeej
e f  deje	 dejejddef  deje	 deej fddZdS )XPackClient	attr_namereturnc                 C   s   t | j|S )N)getattrclient)selfr    r   W/var/www/html/lang_env/lib/python3.10/site-packages/elasticsearch/_sync/client/xpack.py__getattr__   s   zXPackClient.__getattr__N)accept_enterprise
categorieserror_tracefilter_pathhumanprettyr   r   r   r   r   r   c          
      C   s   d}i }|dur||d< |dur||d< |dur||d< |dur$||d< |dur,||d< |dur4||d< d	d
i}	| j d|||	dS )a  
        Retrieves information about the installed X-Pack features.

        `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/info-api.html>`_

        :param accept_enterprise: If this param is used it must be set to true
        :param categories: A comma-separated list of the information categories to include
            in the response. For example, `build,license,features`.
        z/_xpackNr   r   r   r   r   r   acceptapplication/jsonGETparamsheadersZperform_request)
r   r   r   r   r   r   r   _XPackClient__path_XPackClient__query_XPackClient__headersr   r   r   info    s$   zXPackClient.info)r   r   r   master_timeoutr   r    zt.Literal[-1]zt.Literal[0]c          	      C   sr   d}i }|dur||d< |dur||d< |dur||d< |dur$||d< |dur,||d< dd	i}| j d
|||dS )aw  
        Retrieves usage information about the installed X-Pack features.

        `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/usage-api.html>`_

        :param master_timeout: Period to wait for a connection to the master node. If
            no response is received before the timeout expires, the request fails and
            returns an error.
        z/_xpack/usageNr   r   r   r    r   r   r   r   r   r   )	r   r   r   r   r    r   r   r   r   r   r   r   usageG   s    zXPackClient.usage)__name__
__module____qualname__strtAnyr   r   OptionalboolSequenceUnionr   r   r!   r   r   r   r   r      sZ    	&	
r   )	typingr&   Zelastic_transportr   _baser   utilsr   r   r   r   r   r   <module>   s
   