o
    gZhK                     @   sH   d dl Zd dlmZ ddlmZ ddlmZmZm	Z	 G dd deZ
dS )    N)ObjectApiResponse   )NamespacedClient)SKIP_IN_PATH_quote_rewrite_parametersc                   @   s2  e Zd Ze ddddddd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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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dS )MigrationClientN)indexerror_tracefilter_pathhumanprettyr	   r
   r   r   r   returnc          	      C   s|   |t vrdt| d}nd}i }|dur||d< |dur!||d< |dur)||d< |dur1||d< dd	i}| jd
|||dS )a  
        Retrieves information about different cluster, node, and index level settings
        that use deprecated features that will be removed or changed in the next major
        version.

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

        :param index: Comma-separate list of data streams or indices to check. Wildcard
            (*) expressions are supported.
        /z/_migration/deprecationsNr
   r   r   r   acceptapplication/jsonGETparamsheaders)r   r   perform_request)	selfr	   r
   r   r   r   _MigrationClient__path_MigrationClient__query_MigrationClient__headers r   [/var/www/html/lang_env/lib/python3.10/site-packages/elasticsearch/_sync/client/migration.pydeprecations   s    zMigrationClient.deprecations)r
   r   r   r   c                C   b   d}i }|dur||d< |dur||d< |dur||d< |dur$||d< ddi}| j d	|||d
S )z
        Find out whether system features need to be upgraded or not

        `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/migration-api-feature-upgrade.html>`_
        /_migration/system_featuresNr
   r   r   r   r   r   r   r   r   r   r
   r   r   r   r   r   r   r   r   r   get_feature_upgrade_statusA      z*MigrationClient.get_feature_upgrade_statusc                C   r   )z
        Begin upgrades for system features

        `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/migration-api-feature-upgrade.html>`_
        r   Nr
   r   r   r   r   r   POSTr   r    r!   r   r   r   post_feature_upgrade^   r#   z$MigrationClient.post_feature_upgrade)__name__
__module____qualname__r   tOptionalstrboolUnionSequencer   Anyr   r"   r%   r   r   r   r   r      sh    %r   )typingr)   Zelastic_transportr   _baser   utilsr   r   r   r   r   r   r   r   <module>   s
   