diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 775fdb952..e57d3eb02 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,23 +32,10 @@ you don't have Elasticsearch running locally the integration tests will be skipp All the API methods (any method in `elasticsearch.client` classes decorated with `@query_params`) are actually auto-generated from the [rest-api-spec](https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/api) -found in the `Elasticsearch` repository. Any changes to those methods should be -done either by submitting a PR to Elasticsearch itself (in case of adding or -modifying any of the API methods) or to the [Generate -Script](https://github.com/elastic/elasticsearch-py/blob/master/utils/generate_api.py). - -To run the code generation make sure you have pre-requisites installed: - -* by running `python -m pip install -e '.[develop]'` -* having the [elasticsearch](https://github.com/elastic/elasticsearch) repo - cloned on the same level as `elasticsearch-py` and switched to appropriate - version - -Then you should be able to run the code generation by invoking: - -``` -$ python utils/generate-api.py 8.0.0-SNAPSHOT -``` +found in the `Elasticsearch` or the [Elasticsearch specification](https://github.com/elastic/elasticsearch-specification) +repositories. Any changes to those methods should be done either by submitting a PR to one of these repositories +instead of directly to the Python client otherwise your change will be overwritten the +next time the APIs are generated. ## Contributing Code Changes diff --git a/elasticsearch/_async/client/__init__.py b/elasticsearch/_async/client/__init__.py index aee661350..236330ca2 100644 --- a/elasticsearch/_async/client/__init__.py +++ b/elasticsearch/_async/client/__init__.py @@ -57,8 +57,6 @@ from .transform import TransformClient from .utils import SKIP_IN_PATH, _bulk_body, _make_path, _normalize_hosts, query_params from .watcher import WatcherClient - -# xpack APIs from .xpack import XPackClient logger = logging.getLogger("elasticsearch") @@ -210,17 +208,9 @@ class as kwargs, or a string in the format of ``host[:port]`` which will be self.async_search = AsyncSearchClient(self) self.autoscaling = AutoscalingClient(self) self.cat = CatClient(self) + self.ccr = CcrClient(self) self.cluster = ClusterClient(self) self.dangling_indices = DanglingIndicesClient(self) - self.indices = IndicesClient(self) - self.ingest = IngestClient(self) - self.nodes = NodesClient(self) - self.remote = RemoteClient(self) - self.snapshot = SnapshotClient(self) - self.tasks = TasksClient(self) - - self.xpack = XPackClient(self) - self.ccr = CcrClient(self) self.data_frame = Data_FrameClient(self) self.deprecation = DeprecationClient(self) self.enrich = EnrichClient(self) @@ -229,21 +219,28 @@ class as kwargs, or a string in the format of ``host[:port]`` which will be self.fleet = FleetClient(self) self.graph = GraphClient(self) self.ilm = IlmClient(self) + self.indices = IndicesClient(self) + self.ingest = IngestClient(self) self.license = LicenseClient(self) self.logstash = LogstashClient(self) self.migration = MigrationClient(self) self.ml = MlClient(self) self.monitoring = MonitoringClient(self) + self.nodes = NodesClient(self) + self.remote = RemoteClient(self) self.rollup = RollupClient(self) self.searchable_snapshots = SearchableSnapshotsClient(self) self.security = SecurityClient(self) - self.slm = SlmClient(self) self.shutdown = ShutdownClient(self) + self.slm = SlmClient(self) + self.snapshot = SnapshotClient(self) self.sql = SqlClient(self) self.ssl = SslClient(self) + self.tasks = TasksClient(self) self.text_structure = TextStructureClient(self) self.transform = TransformClient(self) self.watcher = WatcherClient(self) + self.xpack = XPackClient(self) def __repr__(self): try: @@ -1328,7 +1325,7 @@ async def put_script(self, id, body, context=None, params=None, headers=None): :arg id: Script ID :arg body: The document - :arg context: Context name to compile script against + :arg context: Script context :arg master_timeout: Specify timeout for connection to master :arg timeout: Explicit operation timeout """ @@ -1504,7 +1501,7 @@ async def scroll(self, body=None, scroll_id=None, params=None, headers=None): :arg body: The scroll ID if not passed by URL or query parameter. - :arg scroll_id: The scroll ID for scrolled search + :arg scroll_id: The scroll ID :arg rest_total_hits_as_int: Indicates whether hits.total should be rendered as an integer or an object in the rest search response :arg scroll: Specify how long a consistent view of the index diff --git a/elasticsearch/_async/client/__init__.pyi b/elasticsearch/_async/client/__init__.pyi index 075db861d..beab25f6b 100644 --- a/elasticsearch/_async/client/__init__.pyi +++ b/elasticsearch/_async/client/__init__.pyi @@ -19,7 +19,18 @@ from __future__ import unicode_literals import logging -from typing import Any, Collection, MutableMapping, Optional, Tuple, Type, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Sequence, + Tuple, + Type, + Union, +) from ..transport import AsyncTransport from .async_search import AsyncSearchClient @@ -54,8 +65,6 @@ from .tasks import TasksClient from .text_structure import TextStructureClient from .transform import TransformClient from .watcher import WatcherClient - -# xpack APIs from .xpack import XPackClient logger: logging.Logger @@ -66,37 +75,36 @@ class AsyncElasticsearch(object): async_search: AsyncSearchClient autoscaling: AutoscalingClient cat: CatClient - cluster: ClusterClient - features: FeaturesClient - indices: IndicesClient - ingest: IngestClient - nodes: NodesClient - remote: RemoteClient - snapshot: SnapshotClient - tasks: TasksClient - - xpack: XPackClient ccr: CcrClient + cluster: ClusterClient dangling_indices: DanglingIndicesClient enrich: EnrichClient eql: EqlClient + features: FeaturesClient graph: GraphClient ilm: IlmClient + indices: IndicesClient + ingest: IngestClient license: LicenseClient logstash: LogstashClient migration: MigrationClient ml: MlClient monitoring: MonitoringClient + nodes: NodesClient + remote: RemoteClient rollup: RollupClient searchable_snapshots: SearchableSnapshotsClient security: SecurityClient shutdown: ShutdownClient slm: SlmClient + snapshot: SnapshotClient sql: SqlClient ssl: SslClient - transform: TransformClient + tasks: TasksClient text_structure: TextStructureClient + transform: TransformClient watcher: WatcherClient + xpack: XPackClient def __init__( self, hosts: Any = ..., @@ -139,13 +147,13 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def create( self, + *, index: Any, id: Any, - *, - body: Any, + body: Mapping[str, Any], doc_type: Optional[Any] = ..., pipeline: Optional[Any] = ..., refresh: Optional[Any] = ..., @@ -166,12 +174,12 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def index( self, - index: Any, *, - body: Any, + index: Any, + body: Mapping[str, Any], doc_type: Optional[Any] = ..., id: Optional[Any] = ..., if_primary_term: Optional[Any] = ..., @@ -179,7 +187,7 @@ class AsyncElasticsearch(object): op_type: Optional[Any] = ..., pipeline: Optional[Any] = ..., refresh: Optional[Any] = ..., - require_alias: Optional[Any] = ..., + require_alias: Optional[bool] = ..., routing: Optional[Any] = ..., timeout: Optional[Any] = ..., version: Optional[Any] = ..., @@ -197,11 +205,11 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def bulk( self, *, - body: Any, + body: Union[Sequence[Mapping[str, Any]], bytes, str], index: Optional[Any] = ..., doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., @@ -209,7 +217,7 @@ class AsyncElasticsearch(object): _source_includes: Optional[Any] = ..., pipeline: Optional[Any] = ..., refresh: Optional[Any] = ..., - require_alias: Optional[Any] = ..., + require_alias: Optional[bool] = ..., routing: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -225,11 +233,11 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def clear_scroll( self, *, - body: Optional[Any] = ..., + body: Optional[Union[Mapping[str, Any], str]] = ..., scroll_id: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -243,22 +251,22 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def count( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - lenient: Optional[Any] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + lenient: Optional[bool] = ..., min_score: Optional[Any] = ..., preference: Optional[Any] = ..., q: Optional[Any] = ..., @@ -276,12 +284,12 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete( self, + *, index: Any, id: Any, - *, doc_type: Optional[Any] = ..., if_primary_term: Optional[Any] = ..., if_seq_no: Optional[Any] = ..., @@ -303,31 +311,31 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_by_query( self, - index: Any, *, - body: Any, + index: Any, + body: Mapping[str, Any], doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., conflicts: Optional[Any] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., from_: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - lenient: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + lenient: Optional[bool] = ..., max_docs: Optional[Any] = ..., preference: Optional[Any] = ..., q: Optional[Any] = ..., - refresh: Optional[Any] = ..., - request_cache: Optional[Any] = ..., + refresh: Optional[bool] = ..., + request_cache: Optional[bool] = ..., requests_per_second: Optional[Any] = ..., routing: Optional[Any] = ..., scroll: Optional[Any] = ..., @@ -340,9 +348,9 @@ class AsyncElasticsearch(object): stats: Optional[Any] = ..., terminate_after: Optional[Any] = ..., timeout: Optional[Any] = ..., - version: Optional[Any] = ..., + version: Optional[bool] = ..., wait_for_active_shards: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -355,11 +363,11 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_by_query_rethrottle( self, - task_id: Any, *, + task_id: Any, requests_per_second: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -373,11 +381,11 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_script( self, - id: Any, *, + id: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -392,19 +400,19 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def exists( self, + *, index: Any, id: Any, - *, doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., - refresh: Optional[Any] = ..., + realtime: Optional[bool] = ..., + refresh: Optional[bool] = ..., routing: Optional[Any] = ..., stored_fields: Optional[Any] = ..., version: Optional[Any] = ..., @@ -424,16 +432,16 @@ class AsyncElasticsearch(object): ) -> bool: ... async def exists_source( self, + *, index: Any, id: Any, - *, doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., - refresh: Optional[Any] = ..., + realtime: Optional[bool] = ..., + refresh: Optional[bool] = ..., routing: Optional[Any] = ..., version: Optional[Any] = ..., version_type: Optional[Any] = ..., @@ -452,19 +460,19 @@ class AsyncElasticsearch(object): ) -> bool: ... async def explain( self, + *, index: Any, id: Any, - *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., - lenient: Optional[Any] = ..., + lenient: Optional[bool] = ..., preference: Optional[Any] = ..., q: Optional[Any] = ..., routing: Optional[Any] = ..., @@ -481,17 +489,17 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def field_caps( self, *, body: Optional[Any] = ..., index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., fields: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_unmapped: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + include_unmapped: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -504,19 +512,19 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get( self, + *, index: Any, id: Any, - *, doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., - refresh: Optional[Any] = ..., + realtime: Optional[bool] = ..., + refresh: Optional[bool] = ..., routing: Optional[Any] = ..., stored_fields: Optional[Any] = ..., version: Optional[Any] = ..., @@ -533,11 +541,11 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_script( self, - id: Any, *, + id: Any, master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -551,19 +559,19 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_source( self, + *, index: Any, id: Any, - *, doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., - refresh: Optional[Any] = ..., + realtime: Optional[bool] = ..., + refresh: Optional[bool] = ..., routing: Optional[Any] = ..., version: Optional[Any] = ..., version_type: Optional[Any] = ..., @@ -579,19 +587,19 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def mget( self, *, - body: Any, + body: Mapping[str, Any], index: Optional[Any] = ..., doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., - refresh: Optional[Any] = ..., + realtime: Optional[bool] = ..., + refresh: Optional[bool] = ..., routing: Optional[Any] = ..., stored_fields: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -606,20 +614,20 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def msearch( self, *, - body: Any, + body: Union[Sequence[Mapping[str, Any]], bytes, str], index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - ccs_minimize_roundtrips: Optional[Any] = ..., + ccs_minimize_roundtrips: Optional[bool] = ..., max_concurrent_searches: Optional[Any] = ..., max_concurrent_shard_requests: Optional[Any] = ..., pre_filter_shard_size: Optional[Any] = ..., - rest_total_hits_as_int: Optional[Any] = ..., + rest_total_hits_as_int: Optional[bool] = ..., search_type: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., + typed_keys: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -632,18 +640,18 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def msearch_template( self, *, - body: Any, + body: Union[Sequence[Mapping[str, Any]], bytes, str], index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - ccs_minimize_roundtrips: Optional[Any] = ..., + ccs_minimize_roundtrips: Optional[bool] = ..., max_concurrent_searches: Optional[Any] = ..., - rest_total_hits_as_int: Optional[Any] = ..., + rest_total_hits_as_int: Optional[bool] = ..., search_type: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., + typed_keys: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -656,23 +664,23 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def mtermvectors( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - field_statistics: Optional[Any] = ..., + field_statistics: Optional[bool] = ..., fields: Optional[Any] = ..., ids: Optional[Any] = ..., - offsets: Optional[Any] = ..., - payloads: Optional[Any] = ..., - positions: Optional[Any] = ..., + offsets: Optional[bool] = ..., + payloads: Optional[bool] = ..., + positions: Optional[bool] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., + realtime: Optional[bool] = ..., routing: Optional[Any] = ..., - term_statistics: Optional[Any] = ..., + term_statistics: Optional[bool] = ..., version: Optional[Any] = ..., version_type: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -687,12 +695,12 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_script( self, - id: Any, *, - body: Any, + id: Any, + body: Mapping[str, Any], context: Optional[Any] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., @@ -708,15 +716,15 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def rank_eval( self, *, - body: Any, + body: Mapping[str, Any], index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., search_type: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -730,19 +738,19 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def reindex( self, *, - body: Any, + body: Mapping[str, Any], max_docs: Optional[Any] = ..., - refresh: Optional[Any] = ..., + refresh: Optional[bool] = ..., requests_per_second: Optional[Any] = ..., scroll: Optional[Any] = ..., slices: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -755,11 +763,11 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def reindex_rethrottle( self, - task_id: Any, *, + task_id: Any, requests_per_second: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -773,11 +781,11 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def render_search_template( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., id: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -791,11 +799,11 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def scripts_painless_execute( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -808,13 +816,13 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def scroll( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., scroll_id: Optional[Any] = ..., - rest_total_hits_as_int: Optional[Any] = ..., + rest_total_hits_as_int: Optional[bool] = ..., scroll: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -828,42 +836,42 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def search( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., index: Optional[Any] = ..., doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - allow_partial_search_results: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., + allow_partial_search_results: Optional[bool] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., batched_reduce_size: Optional[Any] = ..., - ccs_minimize_roundtrips: Optional[Any] = ..., + ccs_minimize_roundtrips: Optional[bool] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., docvalue_fields: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., - explain: Optional[Any] = ..., + explain: Optional[bool] = ..., from_: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - lenient: Optional[Any] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + lenient: Optional[bool] = ..., max_concurrent_shard_requests: Optional[Any] = ..., min_compatible_shard_node: Optional[Any] = ..., pre_filter_shard_size: Optional[Any] = ..., preference: Optional[Any] = ..., q: Optional[Any] = ..., - request_cache: Optional[Any] = ..., - rest_total_hits_as_int: Optional[Any] = ..., + request_cache: Optional[bool] = ..., + rest_total_hits_as_int: Optional[bool] = ..., routing: Optional[Any] = ..., scroll: Optional[Any] = ..., search_type: Optional[Any] = ..., - seq_no_primary_term: Optional[Any] = ..., + seq_no_primary_term: Optional[bool] = ..., size: Optional[Any] = ..., sort: Optional[Any] = ..., stats: Optional[Any] = ..., @@ -874,10 +882,10 @@ class AsyncElasticsearch(object): suggest_text: Optional[Any] = ..., terminate_after: Optional[Any] = ..., timeout: Optional[Any] = ..., - track_scores: Optional[Any] = ..., - track_total_hits: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., - version: Optional[Any] = ..., + track_scores: Optional[bool] = ..., + track_total_hits: Optional[bool] = ..., + typed_keys: Optional[bool] = ..., + version: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -890,15 +898,15 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def search_shards( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - local: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + local: Optional[bool] = ..., preference: Optional[Any] = ..., routing: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -913,26 +921,26 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def search_template( self, *, - body: Any, + body: Mapping[str, Any], index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - ccs_minimize_roundtrips: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., + ccs_minimize_roundtrips: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - explain: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + explain: Optional[bool] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., preference: Optional[Any] = ..., - profile: Optional[Any] = ..., - rest_total_hits_as_int: Optional[Any] = ..., + profile: Optional[bool] = ..., + rest_total_hits_as_int: Optional[bool] = ..., routing: Optional[Any] = ..., scroll: Optional[Any] = ..., search_type: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., + typed_keys: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -945,23 +953,23 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def termvectors( self, - index: Any, *, - body: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., doc_type: Optional[Any] = ..., id: Optional[Any] = ..., - field_statistics: Optional[Any] = ..., + field_statistics: Optional[bool] = ..., fields: Optional[Any] = ..., - offsets: Optional[Any] = ..., - payloads: Optional[Any] = ..., - positions: Optional[Any] = ..., + offsets: Optional[bool] = ..., + payloads: Optional[bool] = ..., + positions: Optional[bool] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., + realtime: Optional[bool] = ..., routing: Optional[Any] = ..., - term_statistics: Optional[Any] = ..., + term_statistics: Optional[bool] = ..., version: Optional[Any] = ..., version_type: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -976,13 +984,13 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def update( self, + *, index: Any, id: Any, - *, - body: Any, + body: Mapping[str, Any], doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., @@ -991,7 +999,7 @@ class AsyncElasticsearch(object): if_seq_no: Optional[Any] = ..., lang: Optional[Any] = ..., refresh: Optional[Any] = ..., - require_alias: Optional[Any] = ..., + require_alias: Optional[bool] = ..., retry_on_conflict: Optional[Any] = ..., routing: Optional[Any] = ..., timeout: Optional[Any] = ..., @@ -1008,32 +1016,32 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def update_by_query( self, - index: Any, *, - body: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., conflicts: Optional[Any] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., from_: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - lenient: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + lenient: Optional[bool] = ..., max_docs: Optional[Any] = ..., pipeline: Optional[Any] = ..., preference: Optional[Any] = ..., q: Optional[Any] = ..., - refresh: Optional[Any] = ..., - request_cache: Optional[Any] = ..., + refresh: Optional[bool] = ..., + request_cache: Optional[bool] = ..., requests_per_second: Optional[Any] = ..., routing: Optional[Any] = ..., scroll: Optional[Any] = ..., @@ -1046,10 +1054,10 @@ class AsyncElasticsearch(object): stats: Optional[Any] = ..., terminate_after: Optional[Any] = ..., timeout: Optional[Any] = ..., - version: Optional[Any] = ..., - version_type: Optional[Any] = ..., + version: Optional[bool] = ..., + version_type: Optional[bool] = ..., wait_for_active_shards: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1062,11 +1070,11 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def update_by_query_rethrottle( self, - task_id: Any, *, + task_id: Any, requests_per_second: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1080,7 +1088,7 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_script_context( self, *, @@ -1096,7 +1104,7 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_script_languages( self, *, @@ -1112,7 +1120,7 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def close_point_in_time( self, *, @@ -1129,13 +1137,13 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def open_point_in_time( self, *, index: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., keep_alive: Optional[Any] = ..., preference: Optional[Any] = ..., routing: Optional[Any] = ..., @@ -1151,12 +1159,12 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def terms_enum( self, - index: Any, *, - body: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1169,17 +1177,17 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def search_mvt( self, + *, index: Any, field: Any, zoom: Any, x: Any, y: Any, - *, - body: Optional[Any] = ..., - exact_bounds: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + exact_bounds: Optional[bool] = ..., extent: Optional[Any] = ..., grid_precision: Optional[Any] = ..., grid_type: Optional[Any] = ..., @@ -1196,4 +1204,4 @@ class AsyncElasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], bytes]: ... diff --git a/elasticsearch/_async/client/async_search.pyi b/elasticsearch/_async/client/async_search.pyi index eea360d65..feedacad2 100644 --- a/elasticsearch/_async/client/async_search.pyi +++ b/elasticsearch/_async/client/async_search.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class AsyncSearchClient(NamespacedClient): async def delete( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,13 +45,13 @@ class AsyncSearchClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get( self, - id: Any, *, + id: Any, keep_alive: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., + typed_keys: Optional[bool] = ..., wait_for_completion_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -56,38 +65,38 @@ class AsyncSearchClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def submit( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., index: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - allow_partial_search_results: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., + allow_partial_search_results: Optional[bool] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., batched_reduce_size: Optional[Any] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., docvalue_fields: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., - explain: Optional[Any] = ..., + explain: Optional[bool] = ..., from_: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., keep_alive: Optional[Any] = ..., - keep_on_completion: Optional[Any] = ..., - lenient: Optional[Any] = ..., + keep_on_completion: Optional[bool] = ..., + lenient: Optional[bool] = ..., max_concurrent_shard_requests: Optional[Any] = ..., preference: Optional[Any] = ..., q: Optional[Any] = ..., - request_cache: Optional[Any] = ..., + request_cache: Optional[bool] = ..., routing: Optional[Any] = ..., search_type: Optional[Any] = ..., - seq_no_primary_term: Optional[Any] = ..., + seq_no_primary_term: Optional[bool] = ..., size: Optional[Any] = ..., sort: Optional[Any] = ..., stats: Optional[Any] = ..., @@ -98,10 +107,10 @@ class AsyncSearchClient(NamespacedClient): suggest_text: Optional[Any] = ..., terminate_after: Optional[Any] = ..., timeout: Optional[Any] = ..., - track_scores: Optional[Any] = ..., - track_total_hits: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., - version: Optional[Any] = ..., + track_scores: Optional[bool] = ..., + track_total_hits: Optional[bool] = ..., + typed_keys: Optional[bool] = ..., + version: Optional[bool] = ..., wait_for_completion_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -115,11 +124,11 @@ class AsyncSearchClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def status( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -132,4 +141,4 @@ class AsyncSearchClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/autoscaling.pyi b/elasticsearch/_async/client/autoscaling.pyi index 1df36754b..c7b46a67e 100644 --- a/elasticsearch/_async/client/autoscaling.pyi +++ b/elasticsearch/_async/client/autoscaling.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class AutoscalingClient(NamespacedClient): async def delete_autoscaling_policy( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,11 +45,11 @@ class AutoscalingClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_autoscaling_policy( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -53,12 +62,12 @@ class AutoscalingClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_autoscaling_policy( self, - name: Any, *, - body: Any, + name: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -71,7 +80,7 @@ class AutoscalingClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_autoscaling_capacity( self, *, @@ -87,4 +96,4 @@ class AutoscalingClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/cat.py b/elasticsearch/_async/client/cat.py index 5c078a25e..7b9676d41 100644 --- a/elasticsearch/_async/client/cat.py +++ b/elasticsearch/_async/client/cat.py @@ -405,8 +405,8 @@ async def fielddata(self, fields=None, params=None, headers=None): ``_ - :arg fields: A comma-separated list of fields to return in the - output + :arg fields: A comma-separated list of fields to return the + fielddata size :arg bytes: The unit in which to display byte values Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb :arg format: a short version of the Accept header, e.g. json, diff --git a/elasticsearch/_async/client/cat.pyi b/elasticsearch/_async/client/cat.pyi index e75c152a8..93b9d4cc7 100644 --- a/elasticsearch/_async/client/cat.pyi +++ b/elasticsearch/_async/client/cat.pyi @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -27,10 +27,10 @@ class CatClient(NamespacedClient): expand_wildcards: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -42,7 +42,7 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def allocation( self, *, @@ -50,11 +50,11 @@ class CatClient(NamespacedClient): bytes: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -66,16 +66,16 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def count( self, *, index: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -87,17 +87,17 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def health( self, *, format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - ts: Optional[Any] = ..., - v: Optional[Any] = ..., + ts: Optional[bool] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -109,11 +109,11 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def help( self, *, - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -127,7 +127,7 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> str: ... async def indices( self, *, @@ -137,14 +137,14 @@ class CatClient(NamespacedClient): format: Optional[Any] = ..., h: Optional[Any] = ..., health: Optional[Any] = ..., - help: Optional[Any] = ..., - include_unloaded_segments: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + include_unloaded_segments: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., - pri: Optional[Any] = ..., + pri: Optional[bool] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -156,17 +156,17 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def master( self, *, format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -178,21 +178,21 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def nodes( self, *, bytes: Optional[Any] = ..., format: Optional[Any] = ..., - full_id: Optional[Any] = ..., + full_id: Optional[bool] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - include_unloaded_segments: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + include_unloaded_segments: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -204,20 +204,20 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def recovery( self, *, index: Optional[Any] = ..., - active_only: Optional[Any] = ..., + active_only: Optional[bool] = ..., bytes: Optional[Any] = ..., - detailed: Optional[Any] = ..., + detailed: Optional[bool] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -229,7 +229,7 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def shards( self, *, @@ -237,12 +237,12 @@ class CatClient(NamespacedClient): bytes: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -254,7 +254,7 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def segments( self, *, @@ -262,9 +262,9 @@ class CatClient(NamespacedClient): bytes: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -276,18 +276,18 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def pending_tasks( self, *, format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -299,19 +299,19 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def thread_pool( self, *, thread_pool_patterns: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., size: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -323,7 +323,7 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def fielddata( self, *, @@ -331,9 +331,9 @@ class CatClient(NamespacedClient): bytes: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -345,18 +345,18 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def plugins( self, *, format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - include_bootstrap: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + include_bootstrap: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -368,17 +368,17 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def nodeattrs( self, *, format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -390,17 +390,17 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def repositories( self, *, format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -412,19 +412,19 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def snapshots( self, *, repository: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + help: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -436,20 +436,20 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def tasks( self, *, actions: Optional[Any] = ..., - detailed: Optional[Any] = ..., + detailed: Optional[bool] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., nodes: Optional[Any] = ..., parent_task_id: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -461,18 +461,18 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def templates( self, *, name: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -484,19 +484,19 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def ml_data_frame_analytics( self, *, id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., bytes: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -508,19 +508,19 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def ml_datafeeds( self, *, datafeed_id: Optional[Any] = ..., - allow_no_datafeeds: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_datafeeds: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -532,20 +532,20 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def ml_jobs( self, *, job_id: Optional[Any] = ..., - allow_no_jobs: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_jobs: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., bytes: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -557,21 +557,21 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def ml_trained_models( self, *, model_id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., bytes: Optional[Any] = ..., format: Optional[Any] = ..., from_: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., size: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -583,20 +583,20 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... async def transforms( self, *, transform_id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., format: Optional[Any] = ..., from_: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., size: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -608,4 +608,4 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... diff --git a/elasticsearch/_async/client/ccr.pyi b/elasticsearch/_async/client/ccr.pyi index f89fa69d7..87df3b04e 100644 --- a/elasticsearch/_async/client/ccr.pyi +++ b/elasticsearch/_async/client/ccr.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class CcrClient(NamespacedClient): async def delete_auto_follow_pattern( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,12 +45,12 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def follow( self, - index: Any, *, - body: Any, + index: Any, + body: Mapping[str, Any], wait_for_active_shards: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -55,11 +64,11 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def follow_info( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -72,11 +81,11 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def follow_stats( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -89,12 +98,12 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def forget_follower( self, - index: Any, *, - body: Any, + index: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -107,7 +116,7 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_auto_follow_pattern( self, *, @@ -124,11 +133,11 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def pause_follow( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -141,12 +150,12 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_auto_follow_pattern( self, - name: Any, *, - body: Any, + name: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -159,12 +168,12 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def resume_follow( self, - index: Any, *, - body: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -177,7 +186,7 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stats( self, *, @@ -193,11 +202,11 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def unfollow( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -210,11 +219,11 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def pause_auto_follow_pattern( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -227,11 +236,11 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def resume_auto_follow_pattern( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -244,4 +253,4 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/cluster.pyi b/elasticsearch/_async/client/cluster.pyi index bc2063c3b..170b4aaf4 100644 --- a/elasticsearch/_async/client/cluster.pyi +++ b/elasticsearch/_async/client/cluster.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -26,13 +35,13 @@ class ClusterClient(NamespacedClient): index: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., level: Optional[Any] = ..., - local: Optional[Any] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., wait_for_events: Optional[Any] = ..., - wait_for_no_initializing_shards: Optional[Any] = ..., - wait_for_no_relocating_shards: Optional[Any] = ..., + wait_for_no_initializing_shards: Optional[bool] = ..., + wait_for_no_relocating_shards: Optional[bool] = ..., wait_for_nodes: Optional[Any] = ..., wait_for_status: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -47,11 +56,11 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def pending_tasks( self, *, - local: Optional[Any] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -65,17 +74,17 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def state( self, *, metric: Optional[Any] = ..., index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - local: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., wait_for_metadata_version: Optional[Any] = ..., wait_for_timeout: Optional[Any] = ..., @@ -91,12 +100,12 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stats( self, *, node_id: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -110,16 +119,16 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def reroute( self, *, - body: Optional[Any] = ..., - dry_run: Optional[Any] = ..., - explain: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + dry_run: Optional[bool] = ..., + explain: Optional[bool] = ..., master_timeout: Optional[Any] = ..., metric: Optional[Any] = ..., - retry_failed: Optional[Any] = ..., + retry_failed: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -133,12 +142,12 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_settings( self, *, - flat_settings: Optional[Any] = ..., - include_defaults: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + include_defaults: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -153,12 +162,12 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_settings( self, *, - body: Any, - flat_settings: Optional[Any] = ..., + body: Mapping[str, Any], + flat_settings: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -173,7 +182,7 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def remote_info( self, *, @@ -189,13 +198,13 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def allocation_explain( self, *, - body: Optional[Any] = ..., - include_disk_info: Optional[Any] = ..., - include_yes_decisions: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + include_disk_info: Optional[bool] = ..., + include_yes_decisions: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -208,11 +217,11 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_component_template( self, - name: Any, *, + name: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -227,12 +236,12 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_component_template( self, *, name: Optional[Any] = ..., - local: Optional[Any] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -246,13 +255,13 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_component_template( self, - name: Any, *, - body: Any, - create: Optional[Any] = ..., + name: Any, + body: Mapping[str, Any], + create: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -267,12 +276,12 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def exists_component_template( self, - name: Any, *, - local: Optional[Any] = ..., + name: Any, + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -290,7 +299,7 @@ class ClusterClient(NamespacedClient): async def delete_voting_config_exclusions( self, *, - wait_for_removal: Optional[Any] = ..., + wait_for_removal: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -303,7 +312,7 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def post_voting_config_exclusions( self, *, @@ -322,4 +331,4 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/dangling_indices.pyi b/elasticsearch/_async/client/dangling_indices.pyi index 07ec25c63..56f1f871d 100644 --- a/elasticsearch/_async/client/dangling_indices.pyi +++ b/elasticsearch/_async/client/dangling_indices.pyi @@ -15,16 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient class DanglingIndicesClient(NamespacedClient): async def delete_dangling_index( self, - index_uuid: Any, *, - accept_data_loss: Optional[Any] = ..., + index_uuid: Any, + accept_data_loss: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -39,12 +39,12 @@ class DanglingIndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def import_dangling_index( self, - index_uuid: Any, *, - accept_data_loss: Optional[Any] = ..., + index_uuid: Any, + accept_data_loss: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -59,7 +59,7 @@ class DanglingIndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def list_dangling_indices( self, *, @@ -75,4 +75,4 @@ class DanglingIndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/enrich.pyi b/elasticsearch/_async/client/enrich.pyi index e3602dcaa..2efe95d7d 100644 --- a/elasticsearch/_async/client/enrich.pyi +++ b/elasticsearch/_async/client/enrich.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class EnrichClient(NamespacedClient): async def delete_policy( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,12 +45,12 @@ class EnrichClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def execute_policy( self, - name: Any, *, - wait_for_completion: Optional[Any] = ..., + name: Any, + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -54,7 +63,7 @@ class EnrichClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_policy( self, *, @@ -71,12 +80,12 @@ class EnrichClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_policy( self, - name: Any, *, - body: Any, + name: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -89,7 +98,7 @@ class EnrichClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stats( self, *, @@ -105,4 +114,4 @@ class EnrichClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/eql.pyi b/elasticsearch/_async/client/eql.pyi index c4fa726f5..544ddb6cc 100644 --- a/elasticsearch/_async/client/eql.pyi +++ b/elasticsearch/_async/client/eql.pyi @@ -15,18 +15,27 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class EqlClient(NamespacedClient): async def search( self, - index: Any, *, - body: Any, + index: Any, + body: Mapping[str, Any], keep_alive: Optional[Any] = ..., - keep_on_completion: Optional[Any] = ..., + keep_on_completion: Optional[bool] = ..., wait_for_completion_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -40,11 +49,11 @@ class EqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -57,11 +66,11 @@ class EqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get( self, - id: Any, *, + id: Any, keep_alive: Optional[Any] = ..., wait_for_completion_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -76,11 +85,11 @@ class EqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_status( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -93,4 +102,4 @@ class EqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/features.pyi b/elasticsearch/_async/client/features.pyi index ad8b969ac..b422b9bf6 100644 --- a/elasticsearch/_async/client/features.pyi +++ b/elasticsearch/_async/client/features.pyi @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -36,7 +36,7 @@ class FeaturesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def reset_features( self, *, @@ -52,4 +52,4 @@ class FeaturesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/fleet.pyi b/elasticsearch/_async/client/fleet.pyi index 77b884a63..836e6d5a3 100644 --- a/elasticsearch/_async/client/fleet.pyi +++ b/elasticsearch/_async/client/fleet.pyi @@ -15,19 +15,19 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient class FleetClient(NamespacedClient): async def global_checkpoints( self, - index: Any, *, + index: Any, checkpoints: Optional[Any] = ..., timeout: Optional[Any] = ..., - wait_for_advance: Optional[Any] = ..., - wait_for_index: Optional[Any] = ..., + wait_for_advance: Optional[bool] = ..., + wait_for_index: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -40,4 +40,4 @@ class FleetClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/graph.pyi b/elasticsearch/_async/client/graph.pyi index e67b4f457..1a9f37fa1 100644 --- a/elasticsearch/_async/client/graph.pyi +++ b/elasticsearch/_async/client/graph.pyi @@ -15,16 +15,25 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class GraphClient(NamespacedClient): async def explore( self, - index: Any, *, - body: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., doc_type: Optional[Any] = ..., routing: Optional[Any] = ..., timeout: Optional[Any] = ..., @@ -40,4 +49,4 @@ class GraphClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/ilm.pyi b/elasticsearch/_async/client/ilm.pyi index 0b623e367..cbbd71b44 100644 --- a/elasticsearch/_async/client/ilm.pyi +++ b/elasticsearch/_async/client/ilm.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class IlmClient(NamespacedClient): async def delete_lifecycle( self, - policy: Any, *, + policy: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,13 +45,13 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def explain_lifecycle( self, - index: Any, *, - only_errors: Optional[Any] = ..., - only_managed: Optional[Any] = ..., + index: Any, + only_errors: Optional[bool] = ..., + only_managed: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -55,7 +64,7 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_lifecycle( self, *, @@ -72,7 +81,7 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_status( self, *, @@ -88,12 +97,12 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def move_to_step( self, - index: Any, *, - body: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -106,12 +115,12 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_lifecycle( self, - policy: Any, *, - body: Optional[Any] = ..., + policy: Any, + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -124,11 +133,11 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def remove_policy( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -141,11 +150,11 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def retry( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -158,7 +167,7 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def start( self, *, @@ -174,7 +183,7 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stop( self, *, @@ -190,12 +199,12 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def migrate_to_data_tiers( self, *, - body: Optional[Any] = ..., - dry_run: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + dry_run: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -208,4 +217,4 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/indices.pyi b/elasticsearch/_async/client/indices.pyi index e8f3a9fe0..b7d0e1861 100644 --- a/elasticsearch/_async/client/indices.pyi +++ b/elasticsearch/_async/client/indices.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -23,7 +32,7 @@ class IndicesClient(NamespacedClient): async def analyze( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., index: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -37,14 +46,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def refresh( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -57,16 +66,16 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def flush( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - force: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - wait_if_ongoing: Optional[Any] = ..., + force: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + wait_if_ongoing: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -79,13 +88,13 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def create( self, - index: Any, *, - body: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., + include_type_name: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -101,13 +110,13 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def clone( self, + *, index: Any, target: Any, - *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -123,18 +132,18 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_defaults: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., - local: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + include_defaults: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -148,14 +157,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def open( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -171,14 +180,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def close( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -194,14 +203,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -216,17 +225,17 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def exists( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_defaults: Optional[Any] = ..., - local: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + include_defaults: Optional[bool] = ..., + local: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -242,13 +251,13 @@ class IndicesClient(NamespacedClient): ) -> bool: ... async def exists_type( self, + *, index: Any, doc_type: Any, - *, - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - local: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + local: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -265,16 +274,16 @@ class IndicesClient(NamespacedClient): async def put_mapping( self, *, - body: Any, + body: Mapping[str, Any], index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., - write_index_only: Optional[Any] = ..., + write_index_only: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -287,17 +296,17 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_mapping( self, *, index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., - local: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -311,19 +320,19 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_field_mapping( self, - fields: Any, *, + fields: Any, index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_defaults: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., - local: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + include_defaults: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., + local: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -336,13 +345,13 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_alias( self, + *, index: Any, name: Any, - *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -357,16 +366,16 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def exists_alias( self, - name: Any, *, + name: Any, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - local: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + local: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -385,10 +394,10 @@ class IndicesClient(NamespacedClient): *, index: Optional[Any] = ..., name: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - local: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + local: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -401,11 +410,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def update_aliases( self, *, - body: Any, + body: Mapping[str, Any], master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -420,12 +429,12 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_alias( self, + *, index: Any, name: Any, - *, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -440,14 +449,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_template( self, - name: Any, *, - body: Any, - create: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., + name: Any, + body: Mapping[str, Any], + create: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., master_timeout: Optional[Any] = ..., order: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -462,13 +471,13 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def exists_template( self, - name: Any, *, - flat_settings: Optional[Any] = ..., - local: Optional[Any] = ..., + name: Any, + flat_settings: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -487,9 +496,9 @@ class IndicesClient(NamespacedClient): self, *, name: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., - local: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -503,11 +512,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_template( self, - name: Any, *, + name: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -522,18 +531,18 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_settings( self, *, index: Optional[Any] = ..., name: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_defaults: Optional[Any] = ..., - local: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + include_defaults: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -547,18 +556,18 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_settings( self, *, - body: Any, + body: Mapping[str, Any], index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., - preserve_existing: Optional[Any] = ..., + preserve_existing: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -572,7 +581,7 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stats( self, *, @@ -582,10 +591,10 @@ class IndicesClient(NamespacedClient): expand_wildcards: Optional[Any] = ..., fielddata_fields: Optional[Any] = ..., fields: Optional[Any] = ..., - forbid_closed_indices: Optional[Any] = ..., + forbid_closed_indices: Optional[bool] = ..., groups: Optional[Any] = ..., - include_segment_file_sizes: Optional[Any] = ..., - include_unloaded_segments: Optional[Any] = ..., + include_segment_file_sizes: Optional[bool] = ..., + include_unloaded_segments: Optional[bool] = ..., level: Optional[Any] = ..., types: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -600,15 +609,15 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def segments( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - verbose: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + verbose: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -621,25 +630,25 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def validate_query( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - all_shards: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + all_shards: Optional[bool] = ..., + allow_no_indices: Optional[bool] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., - explain: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - lenient: Optional[Any] = ..., + explain: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + lenient: Optional[bool] = ..., q: Optional[Any] = ..., - rewrite: Optional[Any] = ..., + rewrite: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -652,18 +661,18 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def clear_cache( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - fielddata: Optional[Any] = ..., + fielddata: Optional[bool] = ..., fields: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - query: Optional[Any] = ..., - request: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + query: Optional[bool] = ..., + request: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -676,13 +685,13 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def recovery( self, *, index: Optional[Any] = ..., - active_only: Optional[Any] = ..., - detailed: Optional[Any] = ..., + active_only: Optional[bool] = ..., + detailed: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -695,16 +704,16 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def upgrade( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - only_ancient_segments: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + only_ancient_segments: Optional[bool] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -717,14 +726,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_upgrade( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -737,14 +746,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def flush_synced( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -757,14 +766,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def shard_stores( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., status: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -778,17 +787,17 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def forcemerge( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flush: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + flush: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., max_num_segments: Optional[Any] = ..., - only_expunge_deletes: Optional[Any] = ..., + only_expunge_deletes: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -801,14 +810,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def shrink( self, + *, index: Any, target: Any, - *, - body: Optional[Any] = ..., - copy_settings: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + copy_settings: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -824,14 +833,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def split( self, + *, index: Any, target: Any, - *, - body: Optional[Any] = ..., - copy_settings: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + copy_settings: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -847,15 +856,15 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def rollover( self, - alias: Any, *, - body: Optional[Any] = ..., + alias: Any, + body: Optional[Mapping[str, Any]] = ..., new_index: Optional[Any] = ..., - dry_run: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., + dry_run: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -871,14 +880,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def freeze( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -894,14 +903,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def unfreeze( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -917,14 +926,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def reload_search_analyzers( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -937,11 +946,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def create_data_stream( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -954,11 +963,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_data_stream( self, - name: Any, *, + name: Any, expand_wildcards: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -972,11 +981,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_index_template( self, - name: Any, *, + name: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -991,13 +1000,13 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def exists_index_template( self, - name: Any, *, - flat_settings: Optional[Any] = ..., - local: Optional[Any] = ..., + name: Any, + flat_settings: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1016,8 +1025,8 @@ class IndicesClient(NamespacedClient): self, *, name: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - local: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1031,14 +1040,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_index_template( self, - name: Any, *, - body: Any, + name: Any, + body: Mapping[str, Any], cause: Optional[Any] = ..., - create: Optional[Any] = ..., + create: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1052,14 +1061,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def simulate_index_template( self, - name: Any, *, - body: Optional[Any] = ..., + name: Any, + body: Optional[Mapping[str, Any]] = ..., cause: Optional[Any] = ..., - create: Optional[Any] = ..., + create: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1073,7 +1082,7 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_data_stream( self, *, @@ -1091,14 +1100,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def simulate_template( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., name: Optional[Any] = ..., cause: Optional[Any] = ..., - create: Optional[Any] = ..., + create: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1112,11 +1121,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def resolve_index( self, - name: Any, *, + name: Any, expand_wildcards: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1130,15 +1139,15 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def add_block( self, + *, index: Any, block: Any, - *, - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -1153,7 +1162,7 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def data_streams_stats( self, *, @@ -1170,11 +1179,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def promote_data_stream( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1187,11 +1196,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def migrate_to_data_stream( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1204,16 +1213,16 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def disk_usage( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flush: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - run_expensive_tasks: Optional[Any] = ..., + flush: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + run_expensive_tasks: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1226,15 +1235,15 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def field_usage_stats( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., fields: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1247,4 +1256,4 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/ingest.pyi b/elasticsearch/_async/client/ingest.pyi index e89db01ca..736acc0ca 100644 --- a/elasticsearch/_async/client/ingest.pyi +++ b/elasticsearch/_async/client/ingest.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -25,7 +34,7 @@ class IngestClient(NamespacedClient): *, id: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - summary: Optional[Any] = ..., + summary: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -38,12 +47,12 @@ class IngestClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_pipeline( self, - id: Any, *, - body: Any, + id: Any, + body: Mapping[str, Any], master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -58,11 +67,11 @@ class IngestClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_pipeline( self, - id: Any, *, + id: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -77,13 +86,13 @@ class IngestClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def simulate( self, *, - body: Any, + body: Mapping[str, Any], id: Optional[Any] = ..., - verbose: Optional[Any] = ..., + verbose: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -96,7 +105,7 @@ class IngestClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def processor_grok( self, *, @@ -112,7 +121,7 @@ class IngestClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def geo_ip_stats( self, *, @@ -128,4 +137,4 @@ class IngestClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/license.pyi b/elasticsearch/_async/client/license.pyi index 6e1788954..32e51a00f 100644 --- a/elasticsearch/_async/client/license.pyi +++ b/elasticsearch/_async/client/license.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -35,12 +44,12 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get( self, *, - accept_enterprise: Optional[Any] = ..., - local: Optional[Any] = ..., + accept_enterprise: Optional[bool] = ..., + local: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -53,7 +62,7 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_basic_status( self, *, @@ -69,7 +78,7 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_trial_status( self, *, @@ -85,12 +94,12 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def post( self, *, - body: Optional[Any] = ..., - acknowledge: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + acknowledge: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -103,11 +112,11 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def post_start_basic( self, *, - acknowledge: Optional[Any] = ..., + acknowledge: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -120,11 +129,11 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def post_start_trial( self, *, - acknowledge: Optional[Any] = ..., + acknowledge: Optional[bool] = ..., doc_type: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -138,4 +147,4 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/logstash.pyi b/elasticsearch/_async/client/logstash.pyi index d25241677..559247f8f 100644 --- a/elasticsearch/_async/client/logstash.pyi +++ b/elasticsearch/_async/client/logstash.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class LogstashClient(NamespacedClient): async def delete_pipeline( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,11 +45,11 @@ class LogstashClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_pipeline( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -53,12 +62,12 @@ class LogstashClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_pipeline( self, - id: Any, *, - body: Any, + id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -71,4 +80,4 @@ class LogstashClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/migration.pyi b/elasticsearch/_async/client/migration.pyi index d4b7623b3..cfee5b5dc 100644 --- a/elasticsearch/_async/client/migration.pyi +++ b/elasticsearch/_async/client/migration.pyi @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -36,4 +36,4 @@ class MigrationClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/ml.pyi b/elasticsearch/_async/client/ml.pyi index 997fb46a8..2d50e56c2 100644 --- a/elasticsearch/_async/client/ml.pyi +++ b/elasticsearch/_async/client/ml.pyi @@ -15,19 +15,29 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Sequence, + Tuple, + Union, +) from .utils import NamespacedClient class MlClient(NamespacedClient): async def close_job( self, - job_id: Any, *, - body: Optional[Any] = ..., - allow_no_jobs: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - force: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., + allow_no_jobs: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., + force: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -41,11 +51,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_calendar( self, - calendar_id: Any, *, + calendar_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -58,12 +68,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_calendar_event( self, + *, calendar_id: Any, event_id: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -76,12 +86,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_calendar_job( self, + *, calendar_id: Any, job_id: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -94,12 +104,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_datafeed( self, - datafeed_id: Any, *, - force: Optional[Any] = ..., + datafeed_id: Any, + force: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -112,7 +122,7 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_expired_data( self, *, @@ -132,11 +142,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_filter( self, - filter_id: Any, *, + filter_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -149,13 +159,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_forecast( self, - job_id: Any, *, + job_id: Any, forecast_id: Optional[Any] = ..., - allow_no_forecasts: Optional[Any] = ..., + allow_no_forecasts: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -169,13 +179,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_job( self, - job_id: Any, *, - force: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + job_id: Any, + force: Optional[bool] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -188,12 +198,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_model_snapshot( self, + *, job_id: Any, snapshot_id: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -206,14 +216,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def flush_job( self, - job_id: Any, *, - body: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., advance_time: Optional[Any] = ..., - calc_interim: Optional[Any] = ..., + calc_interim: Optional[bool] = ..., end: Optional[Any] = ..., skip_time: Optional[Any] = ..., start: Optional[Any] = ..., @@ -229,11 +239,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def forecast( self, - job_id: Any, *, + job_id: Any, duration: Optional[Any] = ..., expires_in: Optional[Any] = ..., max_model_memory: Optional[Any] = ..., @@ -249,18 +259,18 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_buckets( self, - job_id: Any, *, - body: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., timestamp: Optional[Any] = ..., anomaly_score: Optional[Any] = ..., - desc: Optional[Any] = ..., + desc: Optional[bool] = ..., end: Optional[Any] = ..., - exclude_interim: Optional[Any] = ..., - expand: Optional[Any] = ..., + exclude_interim: Optional[bool] = ..., + expand: Optional[bool] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., sort: Optional[Any] = ..., @@ -277,11 +287,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_calendar_events( self, - calendar_id: Any, *, + calendar_id: Any, end: Optional[Any] = ..., from_: Optional[Any] = ..., job_id: Optional[Any] = ..., @@ -299,11 +309,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_calendars( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., calendar_id: Optional[Any] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., @@ -319,12 +329,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_categories( self, - job_id: Any, *, - body: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., category_id: Optional[Any] = ..., from_: Optional[Any] = ..., partition_field_value: Optional[Any] = ..., @@ -341,13 +351,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_datafeed_stats( self, *, datafeed_id: Optional[Any] = ..., - allow_no_datafeeds: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_datafeeds: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -360,14 +370,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_datafeeds( self, *, datafeed_id: Optional[Any] = ..., - allow_no_datafeeds: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - exclude_generated: Optional[Any] = ..., + allow_no_datafeeds: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., + exclude_generated: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -380,7 +390,7 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_filters( self, *, @@ -399,15 +409,15 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_influencers( self, - job_id: Any, *, - body: Optional[Any] = ..., - desc: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., + desc: Optional[bool] = ..., end: Optional[Any] = ..., - exclude_interim: Optional[Any] = ..., + exclude_interim: Optional[bool] = ..., from_: Optional[Any] = ..., influencer_score: Optional[Any] = ..., size: Optional[Any] = ..., @@ -425,13 +435,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_job_stats( self, *, job_id: Optional[Any] = ..., - allow_no_jobs: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_jobs: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -444,14 +454,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_jobs( self, *, job_id: Optional[Any] = ..., - allow_no_jobs: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - exclude_generated: Optional[Any] = ..., + allow_no_jobs: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., + exclude_generated: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -464,14 +474,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_model_snapshots( self, - job_id: Any, *, - body: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., snapshot_id: Optional[Any] = ..., - desc: Optional[Any] = ..., + desc: Optional[bool] = ..., end: Optional[Any] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., @@ -489,17 +499,17 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_overall_buckets( self, - job_id: Any, *, - body: Optional[Any] = ..., - allow_no_jobs: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., + allow_no_jobs: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., bucket_span: Optional[Any] = ..., end: Optional[Any] = ..., - exclude_interim: Optional[Any] = ..., + exclude_interim: Optional[bool] = ..., overall_score: Optional[Any] = ..., start: Optional[Any] = ..., top_n: Optional[Any] = ..., @@ -515,15 +525,15 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_records( self, - job_id: Any, *, - body: Optional[Any] = ..., - desc: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., + desc: Optional[bool] = ..., end: Optional[Any] = ..., - exclude_interim: Optional[Any] = ..., + exclude_interim: Optional[bool] = ..., from_: Optional[Any] = ..., record_score: Optional[Any] = ..., size: Optional[Any] = ..., @@ -541,7 +551,7 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def info( self, *, @@ -557,11 +567,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def open_job( self, - job_id: Any, *, + job_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -574,12 +584,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def post_calendar_events( self, - calendar_id: Any, *, - body: Any, + calendar_id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -592,12 +602,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def post_data( self, - job_id: Any, *, - body: Any, + job_id: Any, + body: Union[Mapping[str, Any], Sequence[Mapping[str, Any]], bytes, str], reset_end: Optional[Any] = ..., reset_start: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -612,7 +622,7 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def preview_datafeed( self, *, @@ -630,12 +640,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_calendar( self, - calendar_id: Any, *, - body: Optional[Any] = ..., + calendar_id: Any, + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -648,12 +658,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_calendar_job( self, + *, calendar_id: Any, job_id: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -666,16 +676,16 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_datafeed( self, - datafeed_id: Any, *, - body: Any, - allow_no_indices: Optional[Any] = ..., + datafeed_id: Any, + body: Mapping[str, Any], + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -688,12 +698,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_filter( self, - filter_id: Any, *, - body: Any, + filter_id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -706,16 +716,16 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_job( self, - job_id: Any, *, - body: Any, - allow_no_indices: Optional[Any] = ..., + job_id: Any, + body: Mapping[str, Any], + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -728,14 +738,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def revert_model_snapshot( self, + *, job_id: Any, snapshot_id: Any, - *, - body: Optional[Any] = ..., - delete_intervening_results: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + delete_intervening_results: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -748,11 +758,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def set_upgrade_mode( self, *, - enabled: Optional[Any] = ..., + enabled: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -766,12 +776,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def start_datafeed( self, - datafeed_id: Any, *, - body: Optional[Any] = ..., + datafeed_id: Any, + body: Optional[Mapping[str, Any]] = ..., end: Optional[Any] = ..., start: Optional[Any] = ..., timeout: Optional[Any] = ..., @@ -787,15 +797,15 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stop_datafeed( self, - datafeed_id: Any, *, + datafeed_id: Any, body: Optional[Any] = ..., - allow_no_datafeeds: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - force: Optional[Any] = ..., + allow_no_datafeeds: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., + force: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -809,16 +819,16 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def update_datafeed( self, - datafeed_id: Any, *, - body: Any, - allow_no_indices: Optional[Any] = ..., + datafeed_id: Any, + body: Mapping[str, Any], + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -831,12 +841,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def update_filter( self, - filter_id: Any, *, - body: Any, + filter_id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -849,12 +859,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def update_job( self, - job_id: Any, *, - body: Any, + job_id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -867,13 +877,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def update_model_snapshot( self, + *, job_id: Any, snapshot_id: Any, - *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -886,11 +896,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def validate( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -903,11 +913,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def validate_detector( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -920,12 +930,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_data_frame_analytics( self, - id: Any, *, - force: Optional[Any] = ..., + id: Any, + force: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -939,11 +949,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def evaluate_data_frame( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -956,13 +966,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_data_frame_analytics( self, *, id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - exclude_generated: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., + exclude_generated: Optional[bool] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -977,15 +987,15 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_data_frame_analytics_stats( self, *, id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., - verbose: Optional[Any] = ..., + verbose: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -998,12 +1008,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_data_frame_analytics( self, - id: Any, *, - body: Any, + id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1016,12 +1026,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def start_data_frame_analytics( self, - id: Any, *, - body: Optional[Any] = ..., + id: Any, + body: Optional[Mapping[str, Any]] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1035,14 +1045,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stop_data_frame_analytics( self, - id: Any, *, - body: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - force: Optional[Any] = ..., + id: Any, + body: Optional[Mapping[str, Any]] = ..., + allow_no_match: Optional[bool] = ..., + force: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1056,11 +1066,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_trained_model( self, - model_id: Any, *, + model_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1073,11 +1083,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def explain_data_frame_analytics( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., id: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1091,17 +1101,17 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_trained_models( self, *, model_id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - decompress_definition: Optional[Any] = ..., - exclude_generated: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., + decompress_definition: Optional[bool] = ..., + exclude_generated: Optional[bool] = ..., from_: Optional[Any] = ..., include: Optional[Any] = ..., - include_model_definition: Optional[Any] = ..., + include_model_definition: Optional[bool] = ..., size: Optional[Any] = ..., tags: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -1116,12 +1126,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_trained_models_stats( self, *, model_id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -1136,12 +1146,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_trained_model( self, - model_id: Any, *, - body: Any, + model_id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1154,11 +1164,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def estimate_model_memory( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1171,12 +1181,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def update_data_frame_analytics( self, - id: Any, *, - body: Any, + id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1189,14 +1199,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def upgrade_job_snapshot( self, + *, job_id: Any, snapshot_id: Any, - *, timeout: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1209,12 +1219,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_trained_model_alias( self, + *, model_id: Any, model_alias: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1227,11 +1237,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def preview_data_frame_analytics( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., id: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1245,13 +1255,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_trained_model_alias( self, + *, model_id: Any, model_alias: Any, - *, - reassign: Optional[Any] = ..., + reassign: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1264,22 +1274,22 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def find_file_structure( self, *, - body: Any, + body: Union[Sequence[Mapping[str, Any]], bytes, str], charset: Optional[Any] = ..., column_names: Optional[Any] = ..., delimiter: Optional[Any] = ..., - explain: Optional[Any] = ..., + explain: Optional[bool] = ..., format: Optional[Any] = ..., grok_pattern: Optional[Any] = ..., - has_header_row: Optional[Any] = ..., + has_header_row: Optional[bool] = ..., line_merge_size_limit: Optional[Any] = ..., lines_to_sample: Optional[Any] = ..., quote: Optional[Any] = ..., - should_trim_fields: Optional[Any] = ..., + should_trim_fields: Optional[bool] = ..., timeout: Optional[Any] = ..., timestamp_field: Optional[Any] = ..., timestamp_format: Optional[Any] = ..., @@ -1294,12 +1304,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def reset_job( self, - job_id: Any, *, - wait_for_completion: Optional[Any] = ..., + job_id: Any, + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1312,4 +1322,4 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/monitoring.pyi b/elasticsearch/_async/client/monitoring.pyi index 8fe083f67..8c7ef9595 100644 --- a/elasticsearch/_async/client/monitoring.pyi +++ b/elasticsearch/_async/client/monitoring.pyi @@ -15,7 +15,17 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Sequence, + Tuple, + Union, +) from .utils import NamespacedClient @@ -23,7 +33,7 @@ class MonitoringClient(NamespacedClient): async def bulk( self, *, - body: Any, + body: Union[Sequence[Mapping[str, Any]], bytes, str], doc_type: Optional[Any] = ..., interval: Optional[Any] = ..., system_api_version: Optional[Any] = ..., @@ -40,4 +50,4 @@ class MonitoringClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/nodes.pyi b/elasticsearch/_async/client/nodes.pyi index 862473156..e959ee41a 100644 --- a/elasticsearch/_async/client/nodes.pyi +++ b/elasticsearch/_async/client/nodes.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -23,7 +32,7 @@ class NodesClient(NamespacedClient): async def reload_secure_settings( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., node_id: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -38,13 +47,13 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def info( self, *, node_id: Optional[Any] = ..., metric: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -58,7 +67,7 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stats( self, *, @@ -68,9 +77,9 @@ class NodesClient(NamespacedClient): completion_fields: Optional[Any] = ..., fielddata_fields: Optional[Any] = ..., fields: Optional[Any] = ..., - groups: Optional[Any] = ..., - include_segment_file_sizes: Optional[Any] = ..., - include_unloaded_segments: Optional[Any] = ..., + groups: Optional[bool] = ..., + include_segment_file_sizes: Optional[bool] = ..., + include_unloaded_segments: Optional[bool] = ..., level: Optional[Any] = ..., timeout: Optional[Any] = ..., types: Optional[Any] = ..., @@ -86,13 +95,13 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def hot_threads( self, *, node_id: Optional[Any] = ..., doc_type: Optional[Any] = ..., - ignore_idle_threads: Optional[Any] = ..., + ignore_idle_threads: Optional[bool] = ..., interval: Optional[Any] = ..., snapshots: Optional[Any] = ..., threads: Optional[Any] = ..., @@ -109,7 +118,7 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> str: ... async def usage( self, *, @@ -128,12 +137,12 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def clear_metering_archive( self, + *, node_id: Any, max_archive_version: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -146,11 +155,11 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_metering_info( self, - node_id: Any, *, + node_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -163,4 +172,4 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/rollup.pyi b/elasticsearch/_async/client/rollup.pyi index e8148b970..5a6af4574 100644 --- a/elasticsearch/_async/client/rollup.pyi +++ b/elasticsearch/_async/client/rollup.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class RollupClient(NamespacedClient): async def delete_job( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,7 +45,7 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_jobs( self, *, @@ -53,7 +62,7 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_rollup_caps( self, *, @@ -70,11 +79,11 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_rollup_index_caps( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -87,12 +96,12 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_job( self, - id: Any, *, - body: Any, + id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -105,15 +114,15 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def rollup_search( self, - index: Any, *, - body: Any, + index: Any, + body: Mapping[str, Any], doc_type: Optional[Any] = ..., - rest_total_hits_as_int: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., + rest_total_hits_as_int: Optional[bool] = ..., + typed_keys: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -126,11 +135,11 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def start_job( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -143,13 +152,13 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stop_job( self, - id: Any, *, + id: Any, timeout: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -162,13 +171,13 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def rollup( self, + *, index: Any, rollup_index: Any, - *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -181,4 +190,4 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/searchable_snapshots.py b/elasticsearch/_async/client/searchable_snapshots.py index 83cd5d735..d58677770 100644 --- a/elasticsearch/_async/client/searchable_snapshots.py +++ b/elasticsearch/_async/client/searchable_snapshots.py @@ -31,8 +31,7 @@ async def clear_cache(self, index=None, params=None, headers=None): This API is **experimental** so may include breaking changes or be removed in a future version - :arg index: A comma-separated list of index name to limit the - operation + :arg index: A comma-separated list of index names :arg allow_no_indices: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) diff --git a/elasticsearch/_async/client/searchable_snapshots.pyi b/elasticsearch/_async/client/searchable_snapshots.pyi index 05b2016ca..40aa6d736 100644 --- a/elasticsearch/_async/client/searchable_snapshots.pyi +++ b/elasticsearch/_async/client/searchable_snapshots.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -24,9 +33,9 @@ class SearchableSnapshotsClient(NamespacedClient): self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -39,16 +48,16 @@ class SearchableSnapshotsClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def mount( self, + *, repository: Any, snapshot: Any, - *, - body: Any, + body: Mapping[str, Any], master_timeout: Optional[Any] = ..., storage: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -61,11 +70,11 @@ class SearchableSnapshotsClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def repository_stats( self, - repository: Any, *, + repository: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -78,7 +87,7 @@ class SearchableSnapshotsClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stats( self, *, @@ -96,7 +105,7 @@ class SearchableSnapshotsClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def cache_stats( self, *, @@ -113,4 +122,4 @@ class SearchableSnapshotsClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/security.pyi b/elasticsearch/_async/client/security.pyi index dfd0c0e21..f79c6c67c 100644 --- a/elasticsearch/_async/client/security.pyi +++ b/elasticsearch/_async/client/security.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -35,11 +44,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def change_password( self, *, - body: Any, + body: Mapping[str, Any], username: Optional[Any] = ..., refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -54,11 +63,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def clear_cached_realms( self, - realms: Any, *, + realms: Any, usernames: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -72,11 +81,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def clear_cached_roles( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -89,11 +98,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def create_api_key( self, *, - body: Any, + body: Mapping[str, Any], refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -107,12 +116,12 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_privileges( self, + *, application: Any, name: Any, - *, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -126,11 +135,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_role( self, - name: Any, *, + name: Any, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -144,11 +153,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_role_mapping( self, - name: Any, *, + name: Any, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -162,11 +171,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_user( self, - username: Any, *, + username: Any, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -180,11 +189,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def disable_user( self, - username: Any, *, + username: Any, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -198,11 +207,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def enable_user( self, - username: Any, *, + username: Any, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -216,13 +225,13 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_api_key( self, *, id: Optional[Any] = ..., name: Optional[Any] = ..., - owner: Optional[Any] = ..., + owner: Optional[bool] = ..., realm_name: Optional[Any] = ..., username: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -237,7 +246,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_privileges( self, *, @@ -255,7 +264,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_role( self, *, @@ -272,7 +281,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_role_mapping( self, *, @@ -289,11 +298,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_token( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -306,7 +315,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_user( self, *, @@ -323,7 +332,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_user_privileges( self, *, @@ -339,11 +348,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def has_privileges( self, *, - body: Any, + body: Mapping[str, Any], user: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -357,11 +366,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def invalidate_api_key( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -374,11 +383,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def invalidate_token( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -391,11 +400,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_privileges( self, *, - body: Any, + body: Mapping[str, Any], refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -409,12 +418,12 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_role( self, - name: Any, *, - body: Any, + name: Any, + body: Mapping[str, Any], refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -428,12 +437,12 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_role_mapping( self, - name: Any, *, - body: Any, + name: Any, + body: Mapping[str, Any], refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -447,12 +456,12 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_user( self, - username: Any, *, - body: Any, + username: Any, + body: Mapping[str, Any], refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -466,7 +475,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_builtin_privileges( self, *, @@ -482,11 +491,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def clear_cached_privileges( self, - application: Any, *, + application: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -499,11 +508,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def clear_api_key_cache( self, - ids: Any, *, + ids: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -516,11 +525,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def grant_api_key( self, *, - body: Any, + body: Mapping[str, Any], refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -534,13 +543,13 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def clear_cached_service_tokens( self, + *, namespace: Any, service: Any, name: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -553,12 +562,12 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def create_service_token( self, + *, namespace: Any, service: Any, - *, name: Optional[Any] = ..., refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -573,13 +582,13 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_service_token( self, + *, namespace: Any, service: Any, name: Any, - *, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -593,7 +602,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_service_accounts( self, *, @@ -611,12 +620,12 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_service_credentials( self, + *, namespace: Any, service: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -629,11 +638,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def saml_complete_logout( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -646,11 +655,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def saml_authenticate( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -663,11 +672,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def saml_invalidate( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -680,11 +689,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def saml_logout( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -697,11 +706,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def saml_prepare_authentication( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -714,11 +723,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def saml_service_provider_metadata( self, - realm_name: Any, *, + realm_name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -731,4 +740,4 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/shutdown.pyi b/elasticsearch/_async/client/shutdown.pyi index 10e5e8da0..4d84ea134 100644 --- a/elasticsearch/_async/client/shutdown.pyi +++ b/elasticsearch/_async/client/shutdown.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class ShutdownClient(NamespacedClient): async def delete_node( self, - node_id: Any, *, + node_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,7 +45,7 @@ class ShutdownClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_node( self, *, @@ -53,12 +62,12 @@ class ShutdownClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_node( self, - node_id: Any, *, - body: Any, + node_id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -71,4 +80,4 @@ class ShutdownClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/slm.pyi b/elasticsearch/_async/client/slm.pyi index 29e3214dc..073e65e4d 100644 --- a/elasticsearch/_async/client/slm.pyi +++ b/elasticsearch/_async/client/slm.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class SlmClient(NamespacedClient): async def delete_lifecycle( self, - policy_id: Any, *, + policy_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,11 +45,11 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def execute_lifecycle( self, - policy_id: Any, *, + policy_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -53,7 +62,7 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def execute_retention( self, *, @@ -69,7 +78,7 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_lifecycle( self, *, @@ -86,7 +95,7 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_stats( self, *, @@ -102,12 +111,12 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_lifecycle( self, - policy_id: Any, *, - body: Optional[Any] = ..., + policy_id: Any, + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -120,7 +129,7 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_status( self, *, @@ -136,7 +145,7 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def start( self, *, @@ -152,7 +161,7 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stop( self, *, @@ -168,4 +177,4 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/snapshot.pyi b/elasticsearch/_async/client/snapshot.pyi index c05b0fb81..a84c20158 100644 --- a/elasticsearch/_async/client/snapshot.pyi +++ b/elasticsearch/_async/client/snapshot.pyi @@ -15,19 +15,28 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class SnapshotClient(NamespacedClient): async def create( self, + *, repository: Any, snapshot: Any, - *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., master_timeout: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -40,12 +49,12 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete( self, + *, repository: Any, snapshot: Any, - *, master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -59,17 +68,17 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get( self, + *, repository: Any, snapshot: Any, - *, - ignore_unavailable: Optional[Any] = ..., - include_repository: Optional[Any] = ..., - index_details: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + include_repository: Optional[bool] = ..., + index_details: Optional[bool] = ..., master_timeout: Optional[Any] = ..., - verbose: Optional[Any] = ..., + verbose: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -82,11 +91,11 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_repository( self, - repository: Any, *, + repository: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -101,12 +110,12 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_repository( self, *, repository: Optional[Any] = ..., - local: Optional[Any] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -120,15 +129,15 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def create_repository( self, - repository: Any, *, - body: Any, + repository: Any, + body: Mapping[str, Any], master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., - verify: Optional[Any] = ..., + verify: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -141,15 +150,15 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def restore( self, + *, repository: Any, snapshot: Any, - *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., master_timeout: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -162,13 +171,13 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def status( self, *, repository: Optional[Any] = ..., snapshot: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -182,11 +191,11 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def verify_repository( self, - repository: Any, *, + repository: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -201,11 +210,11 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def cleanup_repository( self, - repository: Any, *, + repository: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -220,14 +229,14 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def clone( self, + *, repository: Any, snapshot: Any, target_snapshot: Any, - *, - body: Any, + body: Mapping[str, Any], master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -241,19 +250,19 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def repository_analyze( self, - repository: Any, *, + repository: Any, blob_count: Optional[Any] = ..., concurrency: Optional[Any] = ..., - detailed: Optional[Any] = ..., + detailed: Optional[bool] = ..., early_read_node_count: Optional[Any] = ..., max_blob_size: Optional[Any] = ..., max_total_data_size: Optional[Any] = ..., rare_action_probability: Optional[Any] = ..., - rarely_abort_writes: Optional[Any] = ..., + rarely_abort_writes: Optional[bool] = ..., read_node_count: Optional[Any] = ..., seed: Optional[Any] = ..., timeout: Optional[Any] = ..., @@ -269,4 +278,4 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/sql.pyi b/elasticsearch/_async/client/sql.pyi index 7a2d08864..148efb7e0 100644 --- a/elasticsearch/_async/client/sql.pyi +++ b/elasticsearch/_async/client/sql.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -23,7 +32,7 @@ class SqlClient(NamespacedClient): async def clear_cursor( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,11 +45,11 @@ class SqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def query( self, *, - body: Any, + body: Mapping[str, Any], format: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -53,11 +62,11 @@ class SqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def translate( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -70,11 +79,11 @@ class SqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_async( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -87,11 +96,11 @@ class SqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_async( self, - id: Any, *, + id: Any, delimiter: Optional[Any] = ..., format: Optional[Any] = ..., keep_alive: Optional[Any] = ..., @@ -107,11 +116,11 @@ class SqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_async_status( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -124,4 +133,4 @@ class SqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/ssl.pyi b/elasticsearch/_async/client/ssl.pyi index 76fef5069..53fcd5e85 100644 --- a/elasticsearch/_async/client/ssl.pyi +++ b/elasticsearch/_async/client/ssl.pyi @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -35,4 +35,4 @@ class SslClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/tasks.pyi b/elasticsearch/_async/client/tasks.pyi index 3037c2e72..715a81eff 100644 --- a/elasticsearch/_async/client/tasks.pyi +++ b/elasticsearch/_async/client/tasks.pyi @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -24,12 +24,12 @@ class TasksClient(NamespacedClient): self, *, actions: Optional[Any] = ..., - detailed: Optional[Any] = ..., + detailed: Optional[bool] = ..., group_by: Optional[Any] = ..., nodes: Optional[Any] = ..., parent_task_id: Optional[Any] = ..., timeout: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -42,7 +42,7 @@ class TasksClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def cancel( self, *, @@ -50,7 +50,7 @@ class TasksClient(NamespacedClient): actions: Optional[Any] = ..., nodes: Optional[Any] = ..., parent_task_id: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -63,13 +63,13 @@ class TasksClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get( self, *, task_id: Optional[Any] = ..., timeout: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -82,4 +82,4 @@ class TasksClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/text_structure.pyi b/elasticsearch/_async/client/text_structure.pyi index 216cbecda..e3786dd96 100644 --- a/elasticsearch/_async/client/text_structure.pyi +++ b/elasticsearch/_async/client/text_structure.pyi @@ -15,7 +15,17 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Sequence, + Tuple, + Union, +) from .utils import NamespacedClient @@ -23,18 +33,18 @@ class TextStructureClient(NamespacedClient): async def find_structure( self, *, - body: Any, + body: Union[Sequence[Mapping[str, Any]], bytes, str], charset: Optional[Any] = ..., column_names: Optional[Any] = ..., delimiter: Optional[Any] = ..., - explain: Optional[Any] = ..., + explain: Optional[bool] = ..., format: Optional[Any] = ..., grok_pattern: Optional[Any] = ..., - has_header_row: Optional[Any] = ..., + has_header_row: Optional[bool] = ..., line_merge_size_limit: Optional[Any] = ..., lines_to_sample: Optional[Any] = ..., quote: Optional[Any] = ..., - should_trim_fields: Optional[Any] = ..., + should_trim_fields: Optional[bool] = ..., timeout: Optional[Any] = ..., timestamp_field: Optional[Any] = ..., timestamp_format: Optional[Any] = ..., @@ -49,4 +59,4 @@ class TextStructureClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/transform.pyi b/elasticsearch/_async/client/transform.pyi index 28a5402a2..583f34151 100644 --- a/elasticsearch/_async/client/transform.pyi +++ b/elasticsearch/_async/client/transform.pyi @@ -15,16 +15,25 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class TransformClient(NamespacedClient): async def delete_transform( self, - transform_id: Any, *, - force: Optional[Any] = ..., + transform_id: Any, + force: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -37,13 +46,13 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_transform( self, *, transform_id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - exclude_generated: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., + exclude_generated: Optional[bool] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -58,12 +67,12 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_transform_stats( self, - transform_id: Any, *, - allow_no_match: Optional[Any] = ..., + transform_id: Any, + allow_no_match: Optional[bool] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -78,11 +87,11 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def preview_transform( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -95,13 +104,13 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_transform( self, - transform_id: Any, *, - body: Any, - defer_validation: Optional[Any] = ..., + transform_id: Any, + body: Mapping[str, Any], + defer_validation: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -114,11 +123,11 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def start_transform( self, - transform_id: Any, *, + transform_id: Any, timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -132,16 +141,16 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stop_transform( self, - transform_id: Any, *, - allow_no_match: Optional[Any] = ..., - force: Optional[Any] = ..., + transform_id: Any, + allow_no_match: Optional[bool] = ..., + force: Optional[bool] = ..., timeout: Optional[Any] = ..., - wait_for_checkpoint: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_checkpoint: Optional[bool] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -154,13 +163,13 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def update_transform( self, - transform_id: Any, *, - body: Any, - defer_validation: Optional[Any] = ..., + transform_id: Any, + body: Mapping[str, Any], + defer_validation: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -173,4 +182,4 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/watcher.pyi b/elasticsearch/_async/client/watcher.pyi index 4a4e3897b..eec39f330 100644 --- a/elasticsearch/_async/client/watcher.pyi +++ b/elasticsearch/_async/client/watcher.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class WatcherClient(NamespacedClient): async def ack_watch( self, - watch_id: Any, *, + watch_id: Any, action_id: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -37,11 +46,11 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def activate_watch( self, - watch_id: Any, *, + watch_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -54,11 +63,11 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def deactivate_watch( self, - watch_id: Any, *, + watch_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -71,11 +80,11 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def delete_watch( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -88,13 +97,13 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def execute_watch( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., id: Optional[Any] = ..., - debug: Optional[Any] = ..., + debug: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -107,11 +116,11 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def get_watch( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -124,13 +133,13 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def put_watch( self, - id: Any, *, - body: Optional[Any] = ..., - active: Optional[Any] = ..., + id: Any, + body: Optional[Mapping[str, Any]] = ..., + active: Optional[bool] = ..., if_primary_term: Optional[Any] = ..., if_seq_no: Optional[Any] = ..., version: Optional[Any] = ..., @@ -146,7 +155,7 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def start( self, *, @@ -162,12 +171,12 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stats( self, *, metric: Optional[Any] = ..., - emit_stacktraces: Optional[Any] = ..., + emit_stacktraces: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -180,7 +189,7 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def stop( self, *, @@ -196,11 +205,11 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def query_watches( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -213,4 +222,4 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/_async/client/xpack.pyi b/elasticsearch/_async/client/xpack.pyi index 459436bc3..99e4e74e6 100644 --- a/elasticsearch/_async/client/xpack.pyi +++ b/elasticsearch/_async/client/xpack.pyi @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -26,7 +26,7 @@ class XPackClient(NamespacedClient): async def info( self, *, - accept_enterprise: Optional[Any] = ..., + accept_enterprise: Optional[bool] = ..., categories: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -40,7 +40,7 @@ class XPackClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... async def usage( self, *, @@ -57,4 +57,4 @@ class XPackClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/__init__.py b/elasticsearch/client/__init__.py index 83229cf10..9074d840d 100644 --- a/elasticsearch/client/__init__.py +++ b/elasticsearch/client/__init__.py @@ -57,8 +57,6 @@ from .transform import TransformClient from .utils import SKIP_IN_PATH, _bulk_body, _make_path, _normalize_hosts, query_params from .watcher import WatcherClient - -# xpack APIs from .xpack import XPackClient logger = logging.getLogger("elasticsearch") @@ -210,17 +208,9 @@ class as kwargs, or a string in the format of ``host[:port]`` which will be self.async_search = AsyncSearchClient(self) self.autoscaling = AutoscalingClient(self) self.cat = CatClient(self) + self.ccr = CcrClient(self) self.cluster = ClusterClient(self) self.dangling_indices = DanglingIndicesClient(self) - self.indices = IndicesClient(self) - self.ingest = IngestClient(self) - self.nodes = NodesClient(self) - self.remote = RemoteClient(self) - self.snapshot = SnapshotClient(self) - self.tasks = TasksClient(self) - - self.xpack = XPackClient(self) - self.ccr = CcrClient(self) self.data_frame = Data_FrameClient(self) self.deprecation = DeprecationClient(self) self.enrich = EnrichClient(self) @@ -229,21 +219,28 @@ class as kwargs, or a string in the format of ``host[:port]`` which will be self.fleet = FleetClient(self) self.graph = GraphClient(self) self.ilm = IlmClient(self) + self.indices = IndicesClient(self) + self.ingest = IngestClient(self) self.license = LicenseClient(self) self.logstash = LogstashClient(self) self.migration = MigrationClient(self) self.ml = MlClient(self) self.monitoring = MonitoringClient(self) + self.nodes = NodesClient(self) + self.remote = RemoteClient(self) self.rollup = RollupClient(self) self.searchable_snapshots = SearchableSnapshotsClient(self) self.security = SecurityClient(self) - self.slm = SlmClient(self) self.shutdown = ShutdownClient(self) + self.slm = SlmClient(self) + self.snapshot = SnapshotClient(self) self.sql = SqlClient(self) self.ssl = SslClient(self) + self.tasks = TasksClient(self) self.text_structure = TextStructureClient(self) self.transform = TransformClient(self) self.watcher = WatcherClient(self) + self.xpack = XPackClient(self) def __repr__(self): try: @@ -1320,7 +1317,7 @@ def put_script(self, id, body, context=None, params=None, headers=None): :arg id: Script ID :arg body: The document - :arg context: Context name to compile script against + :arg context: Script context :arg master_timeout: Specify timeout for connection to master :arg timeout: Explicit operation timeout """ @@ -1494,7 +1491,7 @@ def scroll(self, body=None, scroll_id=None, params=None, headers=None): :arg body: The scroll ID if not passed by URL or query parameter. - :arg scroll_id: The scroll ID for scrolled search + :arg scroll_id: The scroll ID :arg rest_total_hits_as_int: Indicates whether hits.total should be rendered as an integer or an object in the rest search response :arg scroll: Specify how long a consistent view of the index diff --git a/elasticsearch/client/__init__.pyi b/elasticsearch/client/__init__.pyi index e39da388b..c679ac4c9 100644 --- a/elasticsearch/client/__init__.pyi +++ b/elasticsearch/client/__init__.pyi @@ -19,7 +19,18 @@ from __future__ import unicode_literals import logging -from typing import Any, Collection, MutableMapping, Optional, Tuple, Type, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Sequence, + Tuple, + Type, + Union, +) from ..transport import Transport from .async_search import AsyncSearchClient @@ -54,8 +65,6 @@ from .tasks import TasksClient from .text_structure import TextStructureClient from .transform import TransformClient from .watcher import WatcherClient - -# xpack APIs from .xpack import XPackClient logger: logging.Logger @@ -66,37 +75,36 @@ class Elasticsearch(object): async_search: AsyncSearchClient autoscaling: AutoscalingClient cat: CatClient - cluster: ClusterClient - features: FeaturesClient - indices: IndicesClient - ingest: IngestClient - nodes: NodesClient - remote: RemoteClient - snapshot: SnapshotClient - tasks: TasksClient - - xpack: XPackClient ccr: CcrClient + cluster: ClusterClient dangling_indices: DanglingIndicesClient enrich: EnrichClient eql: EqlClient + features: FeaturesClient graph: GraphClient ilm: IlmClient + indices: IndicesClient + ingest: IngestClient license: LicenseClient logstash: LogstashClient migration: MigrationClient ml: MlClient monitoring: MonitoringClient + nodes: NodesClient + remote: RemoteClient rollup: RollupClient searchable_snapshots: SearchableSnapshotsClient security: SecurityClient shutdown: ShutdownClient slm: SlmClient + snapshot: SnapshotClient sql: SqlClient ssl: SslClient - transform: TransformClient + tasks: TasksClient text_structure: TextStructureClient + transform: TransformClient watcher: WatcherClient + xpack: XPackClient def __init__( self, hosts: Any = ..., @@ -139,13 +147,13 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def create( self, + *, index: Any, id: Any, - *, - body: Any, + body: Mapping[str, Any], doc_type: Optional[Any] = ..., pipeline: Optional[Any] = ..., refresh: Optional[Any] = ..., @@ -166,12 +174,12 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def index( self, - index: Any, *, - body: Any, + index: Any, + body: Mapping[str, Any], doc_type: Optional[Any] = ..., id: Optional[Any] = ..., if_primary_term: Optional[Any] = ..., @@ -179,7 +187,7 @@ class Elasticsearch(object): op_type: Optional[Any] = ..., pipeline: Optional[Any] = ..., refresh: Optional[Any] = ..., - require_alias: Optional[Any] = ..., + require_alias: Optional[bool] = ..., routing: Optional[Any] = ..., timeout: Optional[Any] = ..., version: Optional[Any] = ..., @@ -197,11 +205,11 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def bulk( self, *, - body: Any, + body: Union[Sequence[Mapping[str, Any]], bytes, str], index: Optional[Any] = ..., doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., @@ -209,7 +217,7 @@ class Elasticsearch(object): _source_includes: Optional[Any] = ..., pipeline: Optional[Any] = ..., refresh: Optional[Any] = ..., - require_alias: Optional[Any] = ..., + require_alias: Optional[bool] = ..., routing: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -225,11 +233,11 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def clear_scroll( self, *, - body: Optional[Any] = ..., + body: Optional[Union[Mapping[str, Any], str]] = ..., scroll_id: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -243,22 +251,22 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def count( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - lenient: Optional[Any] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + lenient: Optional[bool] = ..., min_score: Optional[Any] = ..., preference: Optional[Any] = ..., q: Optional[Any] = ..., @@ -276,12 +284,12 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete( self, + *, index: Any, id: Any, - *, doc_type: Optional[Any] = ..., if_primary_term: Optional[Any] = ..., if_seq_no: Optional[Any] = ..., @@ -303,31 +311,31 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_by_query( self, - index: Any, *, - body: Any, + index: Any, + body: Mapping[str, Any], doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., conflicts: Optional[Any] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., from_: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - lenient: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + lenient: Optional[bool] = ..., max_docs: Optional[Any] = ..., preference: Optional[Any] = ..., q: Optional[Any] = ..., - refresh: Optional[Any] = ..., - request_cache: Optional[Any] = ..., + refresh: Optional[bool] = ..., + request_cache: Optional[bool] = ..., requests_per_second: Optional[Any] = ..., routing: Optional[Any] = ..., scroll: Optional[Any] = ..., @@ -340,9 +348,9 @@ class Elasticsearch(object): stats: Optional[Any] = ..., terminate_after: Optional[Any] = ..., timeout: Optional[Any] = ..., - version: Optional[Any] = ..., + version: Optional[bool] = ..., wait_for_active_shards: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -355,11 +363,11 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_by_query_rethrottle( self, - task_id: Any, *, + task_id: Any, requests_per_second: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -373,11 +381,11 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_script( self, - id: Any, *, + id: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -392,19 +400,19 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def exists( self, + *, index: Any, id: Any, - *, doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., - refresh: Optional[Any] = ..., + realtime: Optional[bool] = ..., + refresh: Optional[bool] = ..., routing: Optional[Any] = ..., stored_fields: Optional[Any] = ..., version: Optional[Any] = ..., @@ -424,16 +432,16 @@ class Elasticsearch(object): ) -> bool: ... def exists_source( self, + *, index: Any, id: Any, - *, doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., - refresh: Optional[Any] = ..., + realtime: Optional[bool] = ..., + refresh: Optional[bool] = ..., routing: Optional[Any] = ..., version: Optional[Any] = ..., version_type: Optional[Any] = ..., @@ -452,19 +460,19 @@ class Elasticsearch(object): ) -> bool: ... def explain( self, + *, index: Any, id: Any, - *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., - lenient: Optional[Any] = ..., + lenient: Optional[bool] = ..., preference: Optional[Any] = ..., q: Optional[Any] = ..., routing: Optional[Any] = ..., @@ -481,17 +489,17 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def field_caps( self, *, body: Optional[Any] = ..., index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., fields: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_unmapped: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + include_unmapped: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -504,19 +512,19 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get( self, + *, index: Any, id: Any, - *, doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., - refresh: Optional[Any] = ..., + realtime: Optional[bool] = ..., + refresh: Optional[bool] = ..., routing: Optional[Any] = ..., stored_fields: Optional[Any] = ..., version: Optional[Any] = ..., @@ -533,11 +541,11 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_script( self, - id: Any, *, + id: Any, master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -551,19 +559,19 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_source( self, + *, index: Any, id: Any, - *, doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., - refresh: Optional[Any] = ..., + realtime: Optional[bool] = ..., + refresh: Optional[bool] = ..., routing: Optional[Any] = ..., version: Optional[Any] = ..., version_type: Optional[Any] = ..., @@ -579,19 +587,19 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def mget( self, *, - body: Any, + body: Mapping[str, Any], index: Optional[Any] = ..., doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., - refresh: Optional[Any] = ..., + realtime: Optional[bool] = ..., + refresh: Optional[bool] = ..., routing: Optional[Any] = ..., stored_fields: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -606,20 +614,20 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def msearch( self, *, - body: Any, + body: Union[Sequence[Mapping[str, Any]], bytes, str], index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - ccs_minimize_roundtrips: Optional[Any] = ..., + ccs_minimize_roundtrips: Optional[bool] = ..., max_concurrent_searches: Optional[Any] = ..., max_concurrent_shard_requests: Optional[Any] = ..., pre_filter_shard_size: Optional[Any] = ..., - rest_total_hits_as_int: Optional[Any] = ..., + rest_total_hits_as_int: Optional[bool] = ..., search_type: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., + typed_keys: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -632,18 +640,18 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def msearch_template( self, *, - body: Any, + body: Union[Sequence[Mapping[str, Any]], bytes, str], index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - ccs_minimize_roundtrips: Optional[Any] = ..., + ccs_minimize_roundtrips: Optional[bool] = ..., max_concurrent_searches: Optional[Any] = ..., - rest_total_hits_as_int: Optional[Any] = ..., + rest_total_hits_as_int: Optional[bool] = ..., search_type: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., + typed_keys: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -656,23 +664,23 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def mtermvectors( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - field_statistics: Optional[Any] = ..., + field_statistics: Optional[bool] = ..., fields: Optional[Any] = ..., ids: Optional[Any] = ..., - offsets: Optional[Any] = ..., - payloads: Optional[Any] = ..., - positions: Optional[Any] = ..., + offsets: Optional[bool] = ..., + payloads: Optional[bool] = ..., + positions: Optional[bool] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., + realtime: Optional[bool] = ..., routing: Optional[Any] = ..., - term_statistics: Optional[Any] = ..., + term_statistics: Optional[bool] = ..., version: Optional[Any] = ..., version_type: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -687,12 +695,12 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_script( self, - id: Any, *, - body: Any, + id: Any, + body: Mapping[str, Any], context: Optional[Any] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., @@ -708,15 +716,15 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def rank_eval( self, *, - body: Any, + body: Mapping[str, Any], index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., search_type: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -730,19 +738,19 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def reindex( self, *, - body: Any, + body: Mapping[str, Any], max_docs: Optional[Any] = ..., - refresh: Optional[Any] = ..., + refresh: Optional[bool] = ..., requests_per_second: Optional[Any] = ..., scroll: Optional[Any] = ..., slices: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -755,11 +763,11 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def reindex_rethrottle( self, - task_id: Any, *, + task_id: Any, requests_per_second: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -773,11 +781,11 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def render_search_template( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., id: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -791,11 +799,11 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def scripts_painless_execute( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -808,13 +816,13 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def scroll( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., scroll_id: Optional[Any] = ..., - rest_total_hits_as_int: Optional[Any] = ..., + rest_total_hits_as_int: Optional[bool] = ..., scroll: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -828,42 +836,42 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def search( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., index: Optional[Any] = ..., doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - allow_partial_search_results: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., + allow_partial_search_results: Optional[bool] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., batched_reduce_size: Optional[Any] = ..., - ccs_minimize_roundtrips: Optional[Any] = ..., + ccs_minimize_roundtrips: Optional[bool] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., docvalue_fields: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., - explain: Optional[Any] = ..., + explain: Optional[bool] = ..., from_: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - lenient: Optional[Any] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + lenient: Optional[bool] = ..., max_concurrent_shard_requests: Optional[Any] = ..., min_compatible_shard_node: Optional[Any] = ..., pre_filter_shard_size: Optional[Any] = ..., preference: Optional[Any] = ..., q: Optional[Any] = ..., - request_cache: Optional[Any] = ..., - rest_total_hits_as_int: Optional[Any] = ..., + request_cache: Optional[bool] = ..., + rest_total_hits_as_int: Optional[bool] = ..., routing: Optional[Any] = ..., scroll: Optional[Any] = ..., search_type: Optional[Any] = ..., - seq_no_primary_term: Optional[Any] = ..., + seq_no_primary_term: Optional[bool] = ..., size: Optional[Any] = ..., sort: Optional[Any] = ..., stats: Optional[Any] = ..., @@ -874,10 +882,10 @@ class Elasticsearch(object): suggest_text: Optional[Any] = ..., terminate_after: Optional[Any] = ..., timeout: Optional[Any] = ..., - track_scores: Optional[Any] = ..., - track_total_hits: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., - version: Optional[Any] = ..., + track_scores: Optional[bool] = ..., + track_total_hits: Optional[bool] = ..., + typed_keys: Optional[bool] = ..., + version: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -890,15 +898,15 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def search_shards( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - local: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + local: Optional[bool] = ..., preference: Optional[Any] = ..., routing: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -913,26 +921,26 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def search_template( self, *, - body: Any, + body: Mapping[str, Any], index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - ccs_minimize_roundtrips: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., + ccs_minimize_roundtrips: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - explain: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + explain: Optional[bool] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., preference: Optional[Any] = ..., - profile: Optional[Any] = ..., - rest_total_hits_as_int: Optional[Any] = ..., + profile: Optional[bool] = ..., + rest_total_hits_as_int: Optional[bool] = ..., routing: Optional[Any] = ..., scroll: Optional[Any] = ..., search_type: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., + typed_keys: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -945,23 +953,23 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def termvectors( self, - index: Any, *, - body: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., doc_type: Optional[Any] = ..., id: Optional[Any] = ..., - field_statistics: Optional[Any] = ..., + field_statistics: Optional[bool] = ..., fields: Optional[Any] = ..., - offsets: Optional[Any] = ..., - payloads: Optional[Any] = ..., - positions: Optional[Any] = ..., + offsets: Optional[bool] = ..., + payloads: Optional[bool] = ..., + positions: Optional[bool] = ..., preference: Optional[Any] = ..., - realtime: Optional[Any] = ..., + realtime: Optional[bool] = ..., routing: Optional[Any] = ..., - term_statistics: Optional[Any] = ..., + term_statistics: Optional[bool] = ..., version: Optional[Any] = ..., version_type: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -976,13 +984,13 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def update( self, + *, index: Any, id: Any, - *, - body: Any, + body: Mapping[str, Any], doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., @@ -991,7 +999,7 @@ class Elasticsearch(object): if_seq_no: Optional[Any] = ..., lang: Optional[Any] = ..., refresh: Optional[Any] = ..., - require_alias: Optional[Any] = ..., + require_alias: Optional[bool] = ..., retry_on_conflict: Optional[Any] = ..., routing: Optional[Any] = ..., timeout: Optional[Any] = ..., @@ -1008,32 +1016,32 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def update_by_query( self, - index: Any, *, - body: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., doc_type: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., conflicts: Optional[Any] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., from_: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - lenient: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + lenient: Optional[bool] = ..., max_docs: Optional[Any] = ..., pipeline: Optional[Any] = ..., preference: Optional[Any] = ..., q: Optional[Any] = ..., - refresh: Optional[Any] = ..., - request_cache: Optional[Any] = ..., + refresh: Optional[bool] = ..., + request_cache: Optional[bool] = ..., requests_per_second: Optional[Any] = ..., routing: Optional[Any] = ..., scroll: Optional[Any] = ..., @@ -1046,10 +1054,10 @@ class Elasticsearch(object): stats: Optional[Any] = ..., terminate_after: Optional[Any] = ..., timeout: Optional[Any] = ..., - version: Optional[Any] = ..., - version_type: Optional[Any] = ..., + version: Optional[bool] = ..., + version_type: Optional[bool] = ..., wait_for_active_shards: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1062,11 +1070,11 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def update_by_query_rethrottle( self, - task_id: Any, *, + task_id: Any, requests_per_second: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1080,7 +1088,7 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_script_context( self, *, @@ -1096,7 +1104,7 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_script_languages( self, *, @@ -1112,7 +1120,7 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def close_point_in_time( self, *, @@ -1129,13 +1137,13 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def open_point_in_time( self, *, index: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., keep_alive: Optional[Any] = ..., preference: Optional[Any] = ..., routing: Optional[Any] = ..., @@ -1151,12 +1159,12 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def terms_enum( self, - index: Any, *, - body: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1169,17 +1177,17 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def search_mvt( self, + *, index: Any, field: Any, zoom: Any, x: Any, y: Any, - *, - body: Optional[Any] = ..., - exact_bounds: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + exact_bounds: Optional[bool] = ..., extent: Optional[Any] = ..., grid_precision: Optional[Any] = ..., grid_type: Optional[Any] = ..., @@ -1196,4 +1204,4 @@ class Elasticsearch(object): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], bytes]: ... diff --git a/elasticsearch/client/async_search.pyi b/elasticsearch/client/async_search.pyi index 8ab766d70..5299207e8 100644 --- a/elasticsearch/client/async_search.pyi +++ b/elasticsearch/client/async_search.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class AsyncSearchClient(NamespacedClient): def delete( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,13 +45,13 @@ class AsyncSearchClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get( self, - id: Any, *, + id: Any, keep_alive: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., + typed_keys: Optional[bool] = ..., wait_for_completion_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -56,38 +65,38 @@ class AsyncSearchClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def submit( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., index: Optional[Any] = ..., _source: Optional[Any] = ..., _source_excludes: Optional[Any] = ..., _source_includes: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - allow_partial_search_results: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., + allow_partial_search_results: Optional[bool] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., batched_reduce_size: Optional[Any] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., docvalue_fields: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., - explain: Optional[Any] = ..., + explain: Optional[bool] = ..., from_: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., keep_alive: Optional[Any] = ..., - keep_on_completion: Optional[Any] = ..., - lenient: Optional[Any] = ..., + keep_on_completion: Optional[bool] = ..., + lenient: Optional[bool] = ..., max_concurrent_shard_requests: Optional[Any] = ..., preference: Optional[Any] = ..., q: Optional[Any] = ..., - request_cache: Optional[Any] = ..., + request_cache: Optional[bool] = ..., routing: Optional[Any] = ..., search_type: Optional[Any] = ..., - seq_no_primary_term: Optional[Any] = ..., + seq_no_primary_term: Optional[bool] = ..., size: Optional[Any] = ..., sort: Optional[Any] = ..., stats: Optional[Any] = ..., @@ -98,10 +107,10 @@ class AsyncSearchClient(NamespacedClient): suggest_text: Optional[Any] = ..., terminate_after: Optional[Any] = ..., timeout: Optional[Any] = ..., - track_scores: Optional[Any] = ..., - track_total_hits: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., - version: Optional[Any] = ..., + track_scores: Optional[bool] = ..., + track_total_hits: Optional[bool] = ..., + typed_keys: Optional[bool] = ..., + version: Optional[bool] = ..., wait_for_completion_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -115,11 +124,11 @@ class AsyncSearchClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def status( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -132,4 +141,4 @@ class AsyncSearchClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/autoscaling.pyi b/elasticsearch/client/autoscaling.pyi index 6d58425b4..7d9e2f1f8 100644 --- a/elasticsearch/client/autoscaling.pyi +++ b/elasticsearch/client/autoscaling.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class AutoscalingClient(NamespacedClient): def delete_autoscaling_policy( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,11 +45,11 @@ class AutoscalingClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_autoscaling_policy( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -53,12 +62,12 @@ class AutoscalingClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_autoscaling_policy( self, - name: Any, *, - body: Any, + name: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -71,7 +80,7 @@ class AutoscalingClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_autoscaling_capacity( self, *, @@ -87,4 +96,4 @@ class AutoscalingClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/cat.py b/elasticsearch/client/cat.py index 1aaa8b358..9514f4c05 100644 --- a/elasticsearch/client/cat.py +++ b/elasticsearch/client/cat.py @@ -405,8 +405,8 @@ def fielddata(self, fields=None, params=None, headers=None): ``_ - :arg fields: A comma-separated list of fields to return in the - output + :arg fields: A comma-separated list of fields to return the + fielddata size :arg bytes: The unit in which to display byte values Valid choices: b, k, kb, m, mb, g, gb, t, tb, p, pb :arg format: a short version of the Accept header, e.g. json, diff --git a/elasticsearch/client/cat.pyi b/elasticsearch/client/cat.pyi index d3b8da4b1..7603f659a 100644 --- a/elasticsearch/client/cat.pyi +++ b/elasticsearch/client/cat.pyi @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -27,10 +27,10 @@ class CatClient(NamespacedClient): expand_wildcards: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -42,7 +42,7 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def allocation( self, *, @@ -50,11 +50,11 @@ class CatClient(NamespacedClient): bytes: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -66,16 +66,16 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def count( self, *, index: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -87,17 +87,17 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def health( self, *, format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - ts: Optional[Any] = ..., - v: Optional[Any] = ..., + ts: Optional[bool] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -109,11 +109,11 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def help( self, *, - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -127,7 +127,7 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> str: ... def indices( self, *, @@ -137,14 +137,14 @@ class CatClient(NamespacedClient): format: Optional[Any] = ..., h: Optional[Any] = ..., health: Optional[Any] = ..., - help: Optional[Any] = ..., - include_unloaded_segments: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + include_unloaded_segments: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., - pri: Optional[Any] = ..., + pri: Optional[bool] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -156,17 +156,17 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def master( self, *, format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -178,21 +178,21 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def nodes( self, *, bytes: Optional[Any] = ..., format: Optional[Any] = ..., - full_id: Optional[Any] = ..., + full_id: Optional[bool] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - include_unloaded_segments: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + include_unloaded_segments: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -204,20 +204,20 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def recovery( self, *, index: Optional[Any] = ..., - active_only: Optional[Any] = ..., + active_only: Optional[bool] = ..., bytes: Optional[Any] = ..., - detailed: Optional[Any] = ..., + detailed: Optional[bool] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -229,7 +229,7 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def shards( self, *, @@ -237,12 +237,12 @@ class CatClient(NamespacedClient): bytes: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -254,7 +254,7 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def segments( self, *, @@ -262,9 +262,9 @@ class CatClient(NamespacedClient): bytes: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -276,18 +276,18 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def pending_tasks( self, *, format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -299,19 +299,19 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def thread_pool( self, *, thread_pool_patterns: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., size: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -323,7 +323,7 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def fielddata( self, *, @@ -331,9 +331,9 @@ class CatClient(NamespacedClient): bytes: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -345,18 +345,18 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def plugins( self, *, format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - include_bootstrap: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + include_bootstrap: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -368,17 +368,17 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def nodeattrs( self, *, format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -390,17 +390,17 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def repositories( self, *, format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -412,19 +412,19 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def snapshots( self, *, repository: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + help: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -436,20 +436,20 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def tasks( self, *, actions: Optional[Any] = ..., - detailed: Optional[Any] = ..., + detailed: Optional[bool] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., nodes: Optional[Any] = ..., parent_task_id: Optional[Any] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -461,18 +461,18 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def templates( self, *, name: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., - local: Optional[Any] = ..., + help: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., s: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -484,19 +484,19 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def ml_data_frame_analytics( self, *, id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., bytes: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -508,19 +508,19 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def ml_datafeeds( self, *, datafeed_id: Optional[Any] = ..., - allow_no_datafeeds: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_datafeeds: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -532,20 +532,20 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def ml_jobs( self, *, job_id: Optional[Any] = ..., - allow_no_jobs: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_jobs: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., bytes: Optional[Any] = ..., format: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -557,21 +557,21 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def ml_trained_models( self, *, model_id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., bytes: Optional[Any] = ..., format: Optional[Any] = ..., from_: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., size: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -583,20 +583,20 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... def transforms( self, *, transform_id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., format: Optional[Any] = ..., from_: Optional[Any] = ..., h: Optional[Any] = ..., - help: Optional[Any] = ..., + help: Optional[bool] = ..., s: Optional[Any] = ..., size: Optional[Any] = ..., time: Optional[Any] = ..., - v: Optional[Any] = ..., + v: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -608,4 +608,4 @@ class CatClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Union[Dict[str, Any], str]: ... diff --git a/elasticsearch/client/ccr.pyi b/elasticsearch/client/ccr.pyi index 734aa959b..951decd17 100644 --- a/elasticsearch/client/ccr.pyi +++ b/elasticsearch/client/ccr.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class CcrClient(NamespacedClient): def delete_auto_follow_pattern( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,12 +45,12 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def follow( self, - index: Any, *, - body: Any, + index: Any, + body: Mapping[str, Any], wait_for_active_shards: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -55,11 +64,11 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def follow_info( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -72,11 +81,11 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def follow_stats( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -89,12 +98,12 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def forget_follower( self, - index: Any, *, - body: Any, + index: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -107,7 +116,7 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_auto_follow_pattern( self, *, @@ -124,11 +133,11 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def pause_follow( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -141,12 +150,12 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_auto_follow_pattern( self, - name: Any, *, - body: Any, + name: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -159,12 +168,12 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def resume_follow( self, - index: Any, *, - body: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -177,7 +186,7 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stats( self, *, @@ -193,11 +202,11 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def unfollow( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -210,11 +219,11 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def pause_auto_follow_pattern( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -227,11 +236,11 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def resume_auto_follow_pattern( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -244,4 +253,4 @@ class CcrClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/cluster.pyi b/elasticsearch/client/cluster.pyi index 2400c1eaf..ea5718934 100644 --- a/elasticsearch/client/cluster.pyi +++ b/elasticsearch/client/cluster.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -26,13 +35,13 @@ class ClusterClient(NamespacedClient): index: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., level: Optional[Any] = ..., - local: Optional[Any] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., wait_for_events: Optional[Any] = ..., - wait_for_no_initializing_shards: Optional[Any] = ..., - wait_for_no_relocating_shards: Optional[Any] = ..., + wait_for_no_initializing_shards: Optional[bool] = ..., + wait_for_no_relocating_shards: Optional[bool] = ..., wait_for_nodes: Optional[Any] = ..., wait_for_status: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -47,11 +56,11 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def pending_tasks( self, *, - local: Optional[Any] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -65,17 +74,17 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def state( self, *, metric: Optional[Any] = ..., index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - local: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., wait_for_metadata_version: Optional[Any] = ..., wait_for_timeout: Optional[Any] = ..., @@ -91,12 +100,12 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stats( self, *, node_id: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -110,16 +119,16 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def reroute( self, *, - body: Optional[Any] = ..., - dry_run: Optional[Any] = ..., - explain: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + dry_run: Optional[bool] = ..., + explain: Optional[bool] = ..., master_timeout: Optional[Any] = ..., metric: Optional[Any] = ..., - retry_failed: Optional[Any] = ..., + retry_failed: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -133,12 +142,12 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_settings( self, *, - flat_settings: Optional[Any] = ..., - include_defaults: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + include_defaults: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -153,12 +162,12 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_settings( self, *, - body: Any, - flat_settings: Optional[Any] = ..., + body: Mapping[str, Any], + flat_settings: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -173,7 +182,7 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def remote_info( self, *, @@ -189,13 +198,13 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def allocation_explain( self, *, - body: Optional[Any] = ..., - include_disk_info: Optional[Any] = ..., - include_yes_decisions: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + include_disk_info: Optional[bool] = ..., + include_yes_decisions: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -208,11 +217,11 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_component_template( self, - name: Any, *, + name: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -227,12 +236,12 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_component_template( self, *, name: Optional[Any] = ..., - local: Optional[Any] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -246,13 +255,13 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_component_template( self, - name: Any, *, - body: Any, - create: Optional[Any] = ..., + name: Any, + body: Mapping[str, Any], + create: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -267,12 +276,12 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def exists_component_template( self, - name: Any, *, - local: Optional[Any] = ..., + name: Any, + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -290,7 +299,7 @@ class ClusterClient(NamespacedClient): def delete_voting_config_exclusions( self, *, - wait_for_removal: Optional[Any] = ..., + wait_for_removal: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -303,7 +312,7 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def post_voting_config_exclusions( self, *, @@ -322,4 +331,4 @@ class ClusterClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/dangling_indices.pyi b/elasticsearch/client/dangling_indices.pyi index 204778364..46ef21a60 100644 --- a/elasticsearch/client/dangling_indices.pyi +++ b/elasticsearch/client/dangling_indices.pyi @@ -15,16 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient class DanglingIndicesClient(NamespacedClient): def delete_dangling_index( self, - index_uuid: Any, *, - accept_data_loss: Optional[Any] = ..., + index_uuid: Any, + accept_data_loss: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -39,12 +39,12 @@ class DanglingIndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def import_dangling_index( self, - index_uuid: Any, *, - accept_data_loss: Optional[Any] = ..., + index_uuid: Any, + accept_data_loss: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -59,7 +59,7 @@ class DanglingIndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def list_dangling_indices( self, *, @@ -75,4 +75,4 @@ class DanglingIndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/enrich.pyi b/elasticsearch/client/enrich.pyi index ce7145e82..46579fdc2 100644 --- a/elasticsearch/client/enrich.pyi +++ b/elasticsearch/client/enrich.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class EnrichClient(NamespacedClient): def delete_policy( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,12 +45,12 @@ class EnrichClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def execute_policy( self, - name: Any, *, - wait_for_completion: Optional[Any] = ..., + name: Any, + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -54,7 +63,7 @@ class EnrichClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_policy( self, *, @@ -71,12 +80,12 @@ class EnrichClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_policy( self, - name: Any, *, - body: Any, + name: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -89,7 +98,7 @@ class EnrichClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stats( self, *, @@ -105,4 +114,4 @@ class EnrichClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/eql.pyi b/elasticsearch/client/eql.pyi index c5b454347..9826891e9 100644 --- a/elasticsearch/client/eql.pyi +++ b/elasticsearch/client/eql.pyi @@ -15,18 +15,27 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class EqlClient(NamespacedClient): def search( self, - index: Any, *, - body: Any, + index: Any, + body: Mapping[str, Any], keep_alive: Optional[Any] = ..., - keep_on_completion: Optional[Any] = ..., + keep_on_completion: Optional[bool] = ..., wait_for_completion_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -40,11 +49,11 @@ class EqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -57,11 +66,11 @@ class EqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get( self, - id: Any, *, + id: Any, keep_alive: Optional[Any] = ..., wait_for_completion_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -76,11 +85,11 @@ class EqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_status( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -93,4 +102,4 @@ class EqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/features.pyi b/elasticsearch/client/features.pyi index 73c45f1b9..d1826eeb8 100644 --- a/elasticsearch/client/features.pyi +++ b/elasticsearch/client/features.pyi @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -36,7 +36,7 @@ class FeaturesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def reset_features( self, *, @@ -52,4 +52,4 @@ class FeaturesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/fleet.pyi b/elasticsearch/client/fleet.pyi index 2515bdd5c..6e585e382 100644 --- a/elasticsearch/client/fleet.pyi +++ b/elasticsearch/client/fleet.pyi @@ -15,19 +15,19 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient class FleetClient(NamespacedClient): def global_checkpoints( self, - index: Any, *, + index: Any, checkpoints: Optional[Any] = ..., timeout: Optional[Any] = ..., - wait_for_advance: Optional[Any] = ..., - wait_for_index: Optional[Any] = ..., + wait_for_advance: Optional[bool] = ..., + wait_for_index: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -40,4 +40,4 @@ class FleetClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/graph.pyi b/elasticsearch/client/graph.pyi index 315e1dd42..b055a6e4d 100644 --- a/elasticsearch/client/graph.pyi +++ b/elasticsearch/client/graph.pyi @@ -15,16 +15,25 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class GraphClient(NamespacedClient): def explore( self, - index: Any, *, - body: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., doc_type: Optional[Any] = ..., routing: Optional[Any] = ..., timeout: Optional[Any] = ..., @@ -40,4 +49,4 @@ class GraphClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/ilm.pyi b/elasticsearch/client/ilm.pyi index 1d9936098..fe71e9438 100644 --- a/elasticsearch/client/ilm.pyi +++ b/elasticsearch/client/ilm.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class IlmClient(NamespacedClient): def delete_lifecycle( self, - policy: Any, *, + policy: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,13 +45,13 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def explain_lifecycle( self, - index: Any, *, - only_errors: Optional[Any] = ..., - only_managed: Optional[Any] = ..., + index: Any, + only_errors: Optional[bool] = ..., + only_managed: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -55,7 +64,7 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_lifecycle( self, *, @@ -72,7 +81,7 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_status( self, *, @@ -88,12 +97,12 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def move_to_step( self, - index: Any, *, - body: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -106,12 +115,12 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_lifecycle( self, - policy: Any, *, - body: Optional[Any] = ..., + policy: Any, + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -124,11 +133,11 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def remove_policy( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -141,11 +150,11 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def retry( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -158,7 +167,7 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def start( self, *, @@ -174,7 +183,7 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stop( self, *, @@ -190,12 +199,12 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def migrate_to_data_tiers( self, *, - body: Optional[Any] = ..., - dry_run: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + dry_run: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -208,4 +217,4 @@ class IlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/indices.pyi b/elasticsearch/client/indices.pyi index 41f6fa5c1..eef8d2ec1 100644 --- a/elasticsearch/client/indices.pyi +++ b/elasticsearch/client/indices.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -23,7 +32,7 @@ class IndicesClient(NamespacedClient): def analyze( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., index: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -37,14 +46,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def refresh( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -57,16 +66,16 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def flush( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - force: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - wait_if_ongoing: Optional[Any] = ..., + force: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + wait_if_ongoing: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -79,13 +88,13 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def create( self, - index: Any, *, - body: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., + index: Any, + body: Optional[Mapping[str, Any]] = ..., + include_type_name: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -101,13 +110,13 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def clone( self, + *, index: Any, target: Any, - *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -123,18 +132,18 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_defaults: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., - local: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + include_defaults: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -148,14 +157,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def open( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -171,14 +180,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def close( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -194,14 +203,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -216,17 +225,17 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def exists( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_defaults: Optional[Any] = ..., - local: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + include_defaults: Optional[bool] = ..., + local: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -242,13 +251,13 @@ class IndicesClient(NamespacedClient): ) -> bool: ... def exists_type( self, + *, index: Any, doc_type: Any, - *, - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - local: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + local: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -265,16 +274,16 @@ class IndicesClient(NamespacedClient): def put_mapping( self, *, - body: Any, + body: Mapping[str, Any], index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., - write_index_only: Optional[Any] = ..., + write_index_only: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -287,17 +296,17 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_mapping( self, *, index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., - local: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -311,19 +320,19 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_field_mapping( self, - fields: Any, *, + fields: Any, index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_defaults: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., - local: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + include_defaults: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., + local: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -336,13 +345,13 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_alias( self, + *, index: Any, name: Any, - *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -357,16 +366,16 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def exists_alias( self, - name: Any, *, + name: Any, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - local: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + local: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -385,10 +394,10 @@ class IndicesClient(NamespacedClient): *, index: Optional[Any] = ..., name: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - local: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + local: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -401,11 +410,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def update_aliases( self, *, - body: Any, + body: Mapping[str, Any], master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -420,12 +429,12 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_alias( self, + *, index: Any, name: Any, - *, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -440,14 +449,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_template( self, - name: Any, *, - body: Any, - create: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., + name: Any, + body: Mapping[str, Any], + create: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., master_timeout: Optional[Any] = ..., order: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -462,13 +471,13 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def exists_template( self, - name: Any, *, - flat_settings: Optional[Any] = ..., - local: Optional[Any] = ..., + name: Any, + flat_settings: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -487,9 +496,9 @@ class IndicesClient(NamespacedClient): self, *, name: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., - local: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -503,11 +512,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_template( self, - name: Any, *, + name: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -522,18 +531,18 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_settings( self, *, index: Optional[Any] = ..., name: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - include_defaults: Optional[Any] = ..., - local: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + include_defaults: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -547,18 +556,18 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_settings( self, *, - body: Any, + body: Mapping[str, Any], index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., - preserve_existing: Optional[Any] = ..., + preserve_existing: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -572,7 +581,7 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stats( self, *, @@ -582,10 +591,10 @@ class IndicesClient(NamespacedClient): expand_wildcards: Optional[Any] = ..., fielddata_fields: Optional[Any] = ..., fields: Optional[Any] = ..., - forbid_closed_indices: Optional[Any] = ..., + forbid_closed_indices: Optional[bool] = ..., groups: Optional[Any] = ..., - include_segment_file_sizes: Optional[Any] = ..., - include_unloaded_segments: Optional[Any] = ..., + include_segment_file_sizes: Optional[bool] = ..., + include_unloaded_segments: Optional[bool] = ..., level: Optional[Any] = ..., types: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -600,15 +609,15 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def segments( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - verbose: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + verbose: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -621,25 +630,25 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def validate_query( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., index: Optional[Any] = ..., doc_type: Optional[Any] = ..., - all_shards: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., - analyze_wildcard: Optional[Any] = ..., + all_shards: Optional[bool] = ..., + allow_no_indices: Optional[bool] = ..., + analyze_wildcard: Optional[bool] = ..., analyzer: Optional[Any] = ..., default_operator: Optional[Any] = ..., df: Optional[Any] = ..., expand_wildcards: Optional[Any] = ..., - explain: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - lenient: Optional[Any] = ..., + explain: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + lenient: Optional[bool] = ..., q: Optional[Any] = ..., - rewrite: Optional[Any] = ..., + rewrite: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -652,18 +661,18 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def clear_cache( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - fielddata: Optional[Any] = ..., + fielddata: Optional[bool] = ..., fields: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - query: Optional[Any] = ..., - request: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + query: Optional[bool] = ..., + request: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -676,13 +685,13 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def recovery( self, *, index: Optional[Any] = ..., - active_only: Optional[Any] = ..., - detailed: Optional[Any] = ..., + active_only: Optional[bool] = ..., + detailed: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -695,16 +704,16 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def upgrade( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - only_ancient_segments: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + only_ancient_segments: Optional[bool] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -717,14 +726,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_upgrade( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -737,14 +746,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def flush_synced( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -757,14 +766,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def shard_stores( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., status: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -778,17 +787,17 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def forcemerge( self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flush: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + flush: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., max_num_segments: Optional[Any] = ..., - only_expunge_deletes: Optional[Any] = ..., + only_expunge_deletes: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -801,14 +810,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def shrink( self, + *, index: Any, target: Any, - *, - body: Optional[Any] = ..., - copy_settings: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + copy_settings: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -824,14 +833,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def split( self, + *, index: Any, target: Any, - *, - body: Optional[Any] = ..., - copy_settings: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + copy_settings: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -847,15 +856,15 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def rollover( self, - alias: Any, *, - body: Optional[Any] = ..., + alias: Any, + body: Optional[Mapping[str, Any]] = ..., new_index: Optional[Any] = ..., - dry_run: Optional[Any] = ..., - include_type_name: Optional[Any] = ..., + dry_run: Optional[bool] = ..., + include_type_name: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -871,14 +880,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def freeze( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -894,14 +903,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def unfreeze( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., wait_for_active_shards: Optional[Any] = ..., @@ -917,14 +926,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def reload_search_analyzers( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -937,11 +946,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def create_data_stream( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -954,11 +963,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_data_stream( self, - name: Any, *, + name: Any, expand_wildcards: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -972,11 +981,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_index_template( self, - name: Any, *, + name: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -991,13 +1000,13 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def exists_index_template( self, - name: Any, *, - flat_settings: Optional[Any] = ..., - local: Optional[Any] = ..., + name: Any, + flat_settings: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1016,8 +1025,8 @@ class IndicesClient(NamespacedClient): self, *, name: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., - local: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1031,14 +1040,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_index_template( self, - name: Any, *, - body: Any, + name: Any, + body: Mapping[str, Any], cause: Optional[Any] = ..., - create: Optional[Any] = ..., + create: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1052,14 +1061,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def simulate_index_template( self, - name: Any, *, - body: Optional[Any] = ..., + name: Any, + body: Optional[Mapping[str, Any]] = ..., cause: Optional[Any] = ..., - create: Optional[Any] = ..., + create: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1073,7 +1082,7 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_data_stream( self, *, @@ -1091,14 +1100,14 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def simulate_template( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., name: Optional[Any] = ..., cause: Optional[Any] = ..., - create: Optional[Any] = ..., + create: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1112,11 +1121,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def resolve_index( self, - name: Any, *, + name: Any, expand_wildcards: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1130,15 +1139,15 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def add_block( self, + *, index: Any, block: Any, - *, - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -1153,7 +1162,7 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def data_streams_stats( self, *, @@ -1170,11 +1179,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def promote_data_stream( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1187,11 +1196,11 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def migrate_to_data_stream( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1204,16 +1213,16 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def disk_usage( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - flush: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., - run_expensive_tasks: Optional[Any] = ..., + flush: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., + run_expensive_tasks: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1226,15 +1235,15 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def field_usage_stats( self, - index: Any, *, - allow_no_indices: Optional[Any] = ..., + index: Any, + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., fields: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1247,4 +1256,4 @@ class IndicesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/ingest.pyi b/elasticsearch/client/ingest.pyi index 5548d12b3..88739bff7 100644 --- a/elasticsearch/client/ingest.pyi +++ b/elasticsearch/client/ingest.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -25,7 +34,7 @@ class IngestClient(NamespacedClient): *, id: Optional[Any] = ..., master_timeout: Optional[Any] = ..., - summary: Optional[Any] = ..., + summary: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -38,12 +47,12 @@ class IngestClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_pipeline( self, - id: Any, *, - body: Any, + id: Any, + body: Mapping[str, Any], master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -58,11 +67,11 @@ class IngestClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_pipeline( self, - id: Any, *, + id: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -77,13 +86,13 @@ class IngestClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def simulate( self, *, - body: Any, + body: Mapping[str, Any], id: Optional[Any] = ..., - verbose: Optional[Any] = ..., + verbose: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -96,7 +105,7 @@ class IngestClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def processor_grok( self, *, @@ -112,7 +121,7 @@ class IngestClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def geo_ip_stats( self, *, @@ -128,4 +137,4 @@ class IngestClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/license.pyi b/elasticsearch/client/license.pyi index 3d20d987c..b14bd6e01 100644 --- a/elasticsearch/client/license.pyi +++ b/elasticsearch/client/license.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -35,12 +44,12 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get( self, *, - accept_enterprise: Optional[Any] = ..., - local: Optional[Any] = ..., + accept_enterprise: Optional[bool] = ..., + local: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -53,7 +62,7 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_basic_status( self, *, @@ -69,7 +78,7 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_trial_status( self, *, @@ -85,12 +94,12 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def post( self, *, - body: Optional[Any] = ..., - acknowledge: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + acknowledge: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -103,11 +112,11 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def post_start_basic( self, *, - acknowledge: Optional[Any] = ..., + acknowledge: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -120,11 +129,11 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def post_start_trial( self, *, - acknowledge: Optional[Any] = ..., + acknowledge: Optional[bool] = ..., doc_type: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -138,4 +147,4 @@ class LicenseClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/logstash.pyi b/elasticsearch/client/logstash.pyi index cdda1860b..653ef136f 100644 --- a/elasticsearch/client/logstash.pyi +++ b/elasticsearch/client/logstash.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class LogstashClient(NamespacedClient): def delete_pipeline( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,11 +45,11 @@ class LogstashClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_pipeline( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -53,12 +62,12 @@ class LogstashClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_pipeline( self, - id: Any, *, - body: Any, + id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -71,4 +80,4 @@ class LogstashClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/migration.pyi b/elasticsearch/client/migration.pyi index 0fc1842bf..9948ec9fb 100644 --- a/elasticsearch/client/migration.pyi +++ b/elasticsearch/client/migration.pyi @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -36,4 +36,4 @@ class MigrationClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/ml.pyi b/elasticsearch/client/ml.pyi index edd9343b5..ff947f191 100644 --- a/elasticsearch/client/ml.pyi +++ b/elasticsearch/client/ml.pyi @@ -15,19 +15,29 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Sequence, + Tuple, + Union, +) from .utils import NamespacedClient class MlClient(NamespacedClient): def close_job( self, - job_id: Any, *, - body: Optional[Any] = ..., - allow_no_jobs: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - force: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., + allow_no_jobs: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., + force: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -41,11 +51,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_calendar( self, - calendar_id: Any, *, + calendar_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -58,12 +68,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_calendar_event( self, + *, calendar_id: Any, event_id: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -76,12 +86,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_calendar_job( self, + *, calendar_id: Any, job_id: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -94,12 +104,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_datafeed( self, - datafeed_id: Any, *, - force: Optional[Any] = ..., + datafeed_id: Any, + force: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -112,7 +122,7 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_expired_data( self, *, @@ -132,11 +142,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_filter( self, - filter_id: Any, *, + filter_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -149,13 +159,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_forecast( self, - job_id: Any, *, + job_id: Any, forecast_id: Optional[Any] = ..., - allow_no_forecasts: Optional[Any] = ..., + allow_no_forecasts: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -169,13 +179,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_job( self, - job_id: Any, *, - force: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + job_id: Any, + force: Optional[bool] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -188,12 +198,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_model_snapshot( self, + *, job_id: Any, snapshot_id: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -206,14 +216,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def flush_job( self, - job_id: Any, *, - body: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., advance_time: Optional[Any] = ..., - calc_interim: Optional[Any] = ..., + calc_interim: Optional[bool] = ..., end: Optional[Any] = ..., skip_time: Optional[Any] = ..., start: Optional[Any] = ..., @@ -229,11 +239,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def forecast( self, - job_id: Any, *, + job_id: Any, duration: Optional[Any] = ..., expires_in: Optional[Any] = ..., max_model_memory: Optional[Any] = ..., @@ -249,18 +259,18 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_buckets( self, - job_id: Any, *, - body: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., timestamp: Optional[Any] = ..., anomaly_score: Optional[Any] = ..., - desc: Optional[Any] = ..., + desc: Optional[bool] = ..., end: Optional[Any] = ..., - exclude_interim: Optional[Any] = ..., - expand: Optional[Any] = ..., + exclude_interim: Optional[bool] = ..., + expand: Optional[bool] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., sort: Optional[Any] = ..., @@ -277,11 +287,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_calendar_events( self, - calendar_id: Any, *, + calendar_id: Any, end: Optional[Any] = ..., from_: Optional[Any] = ..., job_id: Optional[Any] = ..., @@ -299,11 +309,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_calendars( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., calendar_id: Optional[Any] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., @@ -319,12 +329,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_categories( self, - job_id: Any, *, - body: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., category_id: Optional[Any] = ..., from_: Optional[Any] = ..., partition_field_value: Optional[Any] = ..., @@ -341,13 +351,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_datafeed_stats( self, *, datafeed_id: Optional[Any] = ..., - allow_no_datafeeds: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_datafeeds: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -360,14 +370,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_datafeeds( self, *, datafeed_id: Optional[Any] = ..., - allow_no_datafeeds: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - exclude_generated: Optional[Any] = ..., + allow_no_datafeeds: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., + exclude_generated: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -380,7 +390,7 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_filters( self, *, @@ -399,15 +409,15 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_influencers( self, - job_id: Any, *, - body: Optional[Any] = ..., - desc: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., + desc: Optional[bool] = ..., end: Optional[Any] = ..., - exclude_interim: Optional[Any] = ..., + exclude_interim: Optional[bool] = ..., from_: Optional[Any] = ..., influencer_score: Optional[Any] = ..., size: Optional[Any] = ..., @@ -425,13 +435,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_job_stats( self, *, job_id: Optional[Any] = ..., - allow_no_jobs: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_jobs: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -444,14 +454,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_jobs( self, *, job_id: Optional[Any] = ..., - allow_no_jobs: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - exclude_generated: Optional[Any] = ..., + allow_no_jobs: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., + exclude_generated: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -464,14 +474,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_model_snapshots( self, - job_id: Any, *, - body: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., snapshot_id: Optional[Any] = ..., - desc: Optional[Any] = ..., + desc: Optional[bool] = ..., end: Optional[Any] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., @@ -489,17 +499,17 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_overall_buckets( self, - job_id: Any, *, - body: Optional[Any] = ..., - allow_no_jobs: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., + allow_no_jobs: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., bucket_span: Optional[Any] = ..., end: Optional[Any] = ..., - exclude_interim: Optional[Any] = ..., + exclude_interim: Optional[bool] = ..., overall_score: Optional[Any] = ..., start: Optional[Any] = ..., top_n: Optional[Any] = ..., @@ -515,15 +525,15 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_records( self, - job_id: Any, *, - body: Optional[Any] = ..., - desc: Optional[Any] = ..., + job_id: Any, + body: Optional[Mapping[str, Any]] = ..., + desc: Optional[bool] = ..., end: Optional[Any] = ..., - exclude_interim: Optional[Any] = ..., + exclude_interim: Optional[bool] = ..., from_: Optional[Any] = ..., record_score: Optional[Any] = ..., size: Optional[Any] = ..., @@ -541,7 +551,7 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def info( self, *, @@ -557,11 +567,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def open_job( self, - job_id: Any, *, + job_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -574,12 +584,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def post_calendar_events( self, - calendar_id: Any, *, - body: Any, + calendar_id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -592,12 +602,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def post_data( self, - job_id: Any, *, - body: Any, + job_id: Any, + body: Union[Mapping[str, Any], Sequence[Mapping[str, Any]], bytes, str], reset_end: Optional[Any] = ..., reset_start: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -612,7 +622,7 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def preview_datafeed( self, *, @@ -630,12 +640,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_calendar( self, - calendar_id: Any, *, - body: Optional[Any] = ..., + calendar_id: Any, + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -648,12 +658,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_calendar_job( self, + *, calendar_id: Any, job_id: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -666,16 +676,16 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_datafeed( self, - datafeed_id: Any, *, - body: Any, - allow_no_indices: Optional[Any] = ..., + datafeed_id: Any, + body: Mapping[str, Any], + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -688,12 +698,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_filter( self, - filter_id: Any, *, - body: Any, + filter_id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -706,16 +716,16 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_job( self, - job_id: Any, *, - body: Any, - allow_no_indices: Optional[Any] = ..., + job_id: Any, + body: Mapping[str, Any], + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -728,14 +738,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def revert_model_snapshot( self, + *, job_id: Any, snapshot_id: Any, - *, - body: Optional[Any] = ..., - delete_intervening_results: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., + delete_intervening_results: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -748,11 +758,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def set_upgrade_mode( self, *, - enabled: Optional[Any] = ..., + enabled: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -766,12 +776,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def start_datafeed( self, - datafeed_id: Any, *, - body: Optional[Any] = ..., + datafeed_id: Any, + body: Optional[Mapping[str, Any]] = ..., end: Optional[Any] = ..., start: Optional[Any] = ..., timeout: Optional[Any] = ..., @@ -787,15 +797,15 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stop_datafeed( self, - datafeed_id: Any, *, + datafeed_id: Any, body: Optional[Any] = ..., - allow_no_datafeeds: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - force: Optional[Any] = ..., + allow_no_datafeeds: Optional[bool] = ..., + allow_no_match: Optional[bool] = ..., + force: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -809,16 +819,16 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def update_datafeed( self, - datafeed_id: Any, *, - body: Any, - allow_no_indices: Optional[Any] = ..., + datafeed_id: Any, + body: Mapping[str, Any], + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_throttled: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_throttled: Optional[bool] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -831,12 +841,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def update_filter( self, - filter_id: Any, *, - body: Any, + filter_id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -849,12 +859,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def update_job( self, - job_id: Any, *, - body: Any, + job_id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -867,13 +877,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def update_model_snapshot( self, + *, job_id: Any, snapshot_id: Any, - *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -886,11 +896,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def validate( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -903,11 +913,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def validate_detector( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -920,12 +930,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_data_frame_analytics( self, - id: Any, *, - force: Optional[Any] = ..., + id: Any, + force: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -939,11 +949,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def evaluate_data_frame( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -956,13 +966,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_data_frame_analytics( self, *, id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - exclude_generated: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., + exclude_generated: Optional[bool] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -977,15 +987,15 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_data_frame_analytics_stats( self, *, id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., - verbose: Optional[Any] = ..., + verbose: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -998,12 +1008,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_data_frame_analytics( self, - id: Any, *, - body: Any, + id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1016,12 +1026,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def start_data_frame_analytics( self, - id: Any, *, - body: Optional[Any] = ..., + id: Any, + body: Optional[Mapping[str, Any]] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1035,14 +1045,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stop_data_frame_analytics( self, - id: Any, *, - body: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - force: Optional[Any] = ..., + id: Any, + body: Optional[Mapping[str, Any]] = ..., + allow_no_match: Optional[bool] = ..., + force: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1056,11 +1066,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_trained_model( self, - model_id: Any, *, + model_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1073,11 +1083,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def explain_data_frame_analytics( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., id: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1091,17 +1101,17 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_trained_models( self, *, model_id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - decompress_definition: Optional[Any] = ..., - exclude_generated: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., + decompress_definition: Optional[bool] = ..., + exclude_generated: Optional[bool] = ..., from_: Optional[Any] = ..., include: Optional[Any] = ..., - include_model_definition: Optional[Any] = ..., + include_model_definition: Optional[bool] = ..., size: Optional[Any] = ..., tags: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -1116,12 +1126,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_trained_models_stats( self, *, model_id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -1136,12 +1146,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_trained_model( self, - model_id: Any, *, - body: Any, + model_id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1154,11 +1164,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def estimate_model_memory( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1171,12 +1181,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def update_data_frame_analytics( self, - id: Any, *, - body: Any, + id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1189,14 +1199,14 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def upgrade_job_snapshot( self, + *, job_id: Any, snapshot_id: Any, - *, timeout: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1209,12 +1219,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_trained_model_alias( self, + *, model_id: Any, model_alias: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1227,11 +1237,11 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def preview_data_frame_analytics( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., id: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -1245,13 +1255,13 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_trained_model_alias( self, + *, model_id: Any, model_alias: Any, - *, - reassign: Optional[Any] = ..., + reassign: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1264,22 +1274,22 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def find_file_structure( self, *, - body: Any, + body: Union[Sequence[Mapping[str, Any]], bytes, str], charset: Optional[Any] = ..., column_names: Optional[Any] = ..., delimiter: Optional[Any] = ..., - explain: Optional[Any] = ..., + explain: Optional[bool] = ..., format: Optional[Any] = ..., grok_pattern: Optional[Any] = ..., - has_header_row: Optional[Any] = ..., + has_header_row: Optional[bool] = ..., line_merge_size_limit: Optional[Any] = ..., lines_to_sample: Optional[Any] = ..., quote: Optional[Any] = ..., - should_trim_fields: Optional[Any] = ..., + should_trim_fields: Optional[bool] = ..., timeout: Optional[Any] = ..., timestamp_field: Optional[Any] = ..., timestamp_format: Optional[Any] = ..., @@ -1294,12 +1304,12 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def reset_job( self, - job_id: Any, *, - wait_for_completion: Optional[Any] = ..., + job_id: Any, + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -1312,4 +1322,4 @@ class MlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/monitoring.pyi b/elasticsearch/client/monitoring.pyi index ad8a165c6..7486806d3 100644 --- a/elasticsearch/client/monitoring.pyi +++ b/elasticsearch/client/monitoring.pyi @@ -15,7 +15,17 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Sequence, + Tuple, + Union, +) from .utils import NamespacedClient @@ -23,7 +33,7 @@ class MonitoringClient(NamespacedClient): def bulk( self, *, - body: Any, + body: Union[Sequence[Mapping[str, Any]], bytes, str], doc_type: Optional[Any] = ..., interval: Optional[Any] = ..., system_api_version: Optional[Any] = ..., @@ -40,4 +50,4 @@ class MonitoringClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/nodes.pyi b/elasticsearch/client/nodes.pyi index 723440a14..2e1081c26 100644 --- a/elasticsearch/client/nodes.pyi +++ b/elasticsearch/client/nodes.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -23,7 +32,7 @@ class NodesClient(NamespacedClient): def reload_secure_settings( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., node_id: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -38,13 +47,13 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def info( self, *, node_id: Optional[Any] = ..., metric: Optional[Any] = ..., - flat_settings: Optional[Any] = ..., + flat_settings: Optional[bool] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -58,7 +67,7 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stats( self, *, @@ -68,9 +77,9 @@ class NodesClient(NamespacedClient): completion_fields: Optional[Any] = ..., fielddata_fields: Optional[Any] = ..., fields: Optional[Any] = ..., - groups: Optional[Any] = ..., - include_segment_file_sizes: Optional[Any] = ..., - include_unloaded_segments: Optional[Any] = ..., + groups: Optional[bool] = ..., + include_segment_file_sizes: Optional[bool] = ..., + include_unloaded_segments: Optional[bool] = ..., level: Optional[Any] = ..., timeout: Optional[Any] = ..., types: Optional[Any] = ..., @@ -86,13 +95,13 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def hot_threads( self, *, node_id: Optional[Any] = ..., doc_type: Optional[Any] = ..., - ignore_idle_threads: Optional[Any] = ..., + ignore_idle_threads: Optional[bool] = ..., interval: Optional[Any] = ..., snapshots: Optional[Any] = ..., threads: Optional[Any] = ..., @@ -109,7 +118,7 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> str: ... def usage( self, *, @@ -128,12 +137,12 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def clear_metering_archive( self, + *, node_id: Any, max_archive_version: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -146,11 +155,11 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_metering_info( self, - node_id: Any, *, + node_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -163,4 +172,4 @@ class NodesClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/rollup.pyi b/elasticsearch/client/rollup.pyi index 102f05fb1..b08b14815 100644 --- a/elasticsearch/client/rollup.pyi +++ b/elasticsearch/client/rollup.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class RollupClient(NamespacedClient): def delete_job( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,7 +45,7 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_jobs( self, *, @@ -53,7 +62,7 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_rollup_caps( self, *, @@ -70,11 +79,11 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_rollup_index_caps( self, - index: Any, *, + index: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -87,12 +96,12 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_job( self, - id: Any, *, - body: Any, + id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -105,15 +114,15 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def rollup_search( self, - index: Any, *, - body: Any, + index: Any, + body: Mapping[str, Any], doc_type: Optional[Any] = ..., - rest_total_hits_as_int: Optional[Any] = ..., - typed_keys: Optional[Any] = ..., + rest_total_hits_as_int: Optional[bool] = ..., + typed_keys: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -126,11 +135,11 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def start_job( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -143,13 +152,13 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stop_job( self, - id: Any, *, + id: Any, timeout: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -162,13 +171,13 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def rollup( self, + *, index: Any, rollup_index: Any, - *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -181,4 +190,4 @@ class RollupClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/searchable_snapshots.py b/elasticsearch/client/searchable_snapshots.py index 2bca57468..fd700d378 100644 --- a/elasticsearch/client/searchable_snapshots.py +++ b/elasticsearch/client/searchable_snapshots.py @@ -31,8 +31,7 @@ def clear_cache(self, index=None, params=None, headers=None): This API is **experimental** so may include breaking changes or be removed in a future version - :arg index: A comma-separated list of index name to limit the - operation + :arg index: A comma-separated list of index names :arg allow_no_indices: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) diff --git a/elasticsearch/client/searchable_snapshots.pyi b/elasticsearch/client/searchable_snapshots.pyi index 54790a8d7..d36b85f7c 100644 --- a/elasticsearch/client/searchable_snapshots.pyi +++ b/elasticsearch/client/searchable_snapshots.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -24,9 +33,9 @@ class SearchableSnapshotsClient(NamespacedClient): self, *, index: Optional[Any] = ..., - allow_no_indices: Optional[Any] = ..., + allow_no_indices: Optional[bool] = ..., expand_wildcards: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -39,16 +48,16 @@ class SearchableSnapshotsClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def mount( self, + *, repository: Any, snapshot: Any, - *, - body: Any, + body: Mapping[str, Any], master_timeout: Optional[Any] = ..., storage: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -61,11 +70,11 @@ class SearchableSnapshotsClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def repository_stats( self, - repository: Any, *, + repository: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -78,7 +87,7 @@ class SearchableSnapshotsClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stats( self, *, @@ -96,7 +105,7 @@ class SearchableSnapshotsClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def cache_stats( self, *, @@ -113,4 +122,4 @@ class SearchableSnapshotsClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/security.pyi b/elasticsearch/client/security.pyi index 2353067cd..0029c5525 100644 --- a/elasticsearch/client/security.pyi +++ b/elasticsearch/client/security.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -35,11 +44,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def change_password( self, *, - body: Any, + body: Mapping[str, Any], username: Optional[Any] = ..., refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -54,11 +63,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def clear_cached_realms( self, - realms: Any, *, + realms: Any, usernames: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -72,11 +81,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def clear_cached_roles( self, - name: Any, *, + name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -89,11 +98,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def create_api_key( self, *, - body: Any, + body: Mapping[str, Any], refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -107,12 +116,12 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_privileges( self, + *, application: Any, name: Any, - *, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -126,11 +135,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_role( self, - name: Any, *, + name: Any, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -144,11 +153,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_role_mapping( self, - name: Any, *, + name: Any, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -162,11 +171,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_user( self, - username: Any, *, + username: Any, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -180,11 +189,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def disable_user( self, - username: Any, *, + username: Any, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -198,11 +207,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def enable_user( self, - username: Any, *, + username: Any, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -216,13 +225,13 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_api_key( self, *, id: Optional[Any] = ..., name: Optional[Any] = ..., - owner: Optional[Any] = ..., + owner: Optional[bool] = ..., realm_name: Optional[Any] = ..., username: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -237,7 +246,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_privileges( self, *, @@ -255,7 +264,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_role( self, *, @@ -272,7 +281,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_role_mapping( self, *, @@ -289,11 +298,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_token( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -306,7 +315,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_user( self, *, @@ -323,7 +332,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_user_privileges( self, *, @@ -339,11 +348,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def has_privileges( self, *, - body: Any, + body: Mapping[str, Any], user: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -357,11 +366,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def invalidate_api_key( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -374,11 +383,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def invalidate_token( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -391,11 +400,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_privileges( self, *, - body: Any, + body: Mapping[str, Any], refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -409,12 +418,12 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_role( self, - name: Any, *, - body: Any, + name: Any, + body: Mapping[str, Any], refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -428,12 +437,12 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_role_mapping( self, - name: Any, *, - body: Any, + name: Any, + body: Mapping[str, Any], refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -447,12 +456,12 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_user( self, - username: Any, *, - body: Any, + username: Any, + body: Mapping[str, Any], refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -466,7 +475,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_builtin_privileges( self, *, @@ -482,11 +491,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def clear_cached_privileges( self, - application: Any, *, + application: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -499,11 +508,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def clear_api_key_cache( self, - ids: Any, *, + ids: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -516,11 +525,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def grant_api_key( self, *, - body: Any, + body: Mapping[str, Any], refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -534,13 +543,13 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def clear_cached_service_tokens( self, + *, namespace: Any, service: Any, name: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -553,12 +562,12 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def create_service_token( self, + *, namespace: Any, service: Any, - *, name: Optional[Any] = ..., refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -573,13 +582,13 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_service_token( self, + *, namespace: Any, service: Any, name: Any, - *, refresh: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -593,7 +602,7 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_service_accounts( self, *, @@ -611,12 +620,12 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_service_credentials( self, + *, namespace: Any, service: Any, - *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -629,11 +638,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def saml_complete_logout( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -646,11 +655,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def saml_authenticate( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -663,11 +672,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def saml_invalidate( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -680,11 +689,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def saml_logout( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -697,11 +706,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def saml_prepare_authentication( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -714,11 +723,11 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def saml_service_provider_metadata( self, - realm_name: Any, *, + realm_name: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -731,4 +740,4 @@ class SecurityClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/shutdown.pyi b/elasticsearch/client/shutdown.pyi index 02153dfcc..0d1e1bf58 100644 --- a/elasticsearch/client/shutdown.pyi +++ b/elasticsearch/client/shutdown.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class ShutdownClient(NamespacedClient): def delete_node( self, - node_id: Any, *, + node_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,7 +45,7 @@ class ShutdownClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_node( self, *, @@ -53,12 +62,12 @@ class ShutdownClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_node( self, - node_id: Any, *, - body: Any, + node_id: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -71,4 +80,4 @@ class ShutdownClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/slm.pyi b/elasticsearch/client/slm.pyi index c3fa16f1b..f5d431447 100644 --- a/elasticsearch/client/slm.pyi +++ b/elasticsearch/client/slm.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class SlmClient(NamespacedClient): def delete_lifecycle( self, - policy_id: Any, *, + policy_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,11 +45,11 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def execute_lifecycle( self, - policy_id: Any, *, + policy_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -53,7 +62,7 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def execute_retention( self, *, @@ -69,7 +78,7 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_lifecycle( self, *, @@ -86,7 +95,7 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_stats( self, *, @@ -102,12 +111,12 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_lifecycle( self, - policy_id: Any, *, - body: Optional[Any] = ..., + policy_id: Any, + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -120,7 +129,7 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_status( self, *, @@ -136,7 +145,7 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def start( self, *, @@ -152,7 +161,7 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stop( self, *, @@ -168,4 +177,4 @@ class SlmClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/snapshot.pyi b/elasticsearch/client/snapshot.pyi index f1327b354..7755124b9 100644 --- a/elasticsearch/client/snapshot.pyi +++ b/elasticsearch/client/snapshot.pyi @@ -15,19 +15,28 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class SnapshotClient(NamespacedClient): def create( self, + *, repository: Any, snapshot: Any, - *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., master_timeout: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -40,12 +49,12 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete( self, + *, repository: Any, snapshot: Any, - *, master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -59,17 +68,17 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get( self, + *, repository: Any, snapshot: Any, - *, - ignore_unavailable: Optional[Any] = ..., - include_repository: Optional[Any] = ..., - index_details: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., + include_repository: Optional[bool] = ..., + index_details: Optional[bool] = ..., master_timeout: Optional[Any] = ..., - verbose: Optional[Any] = ..., + verbose: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -82,11 +91,11 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_repository( self, - repository: Any, *, + repository: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -101,12 +110,12 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_repository( self, *, repository: Optional[Any] = ..., - local: Optional[Any] = ..., + local: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -120,15 +129,15 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def create_repository( self, - repository: Any, *, - body: Any, + repository: Any, + body: Mapping[str, Any], master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., - verify: Optional[Any] = ..., + verify: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -141,15 +150,15 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def restore( self, + *, repository: Any, snapshot: Any, - *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., master_timeout: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -162,13 +171,13 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def status( self, *, repository: Optional[Any] = ..., snapshot: Optional[Any] = ..., - ignore_unavailable: Optional[Any] = ..., + ignore_unavailable: Optional[bool] = ..., master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -182,11 +191,11 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def verify_repository( self, - repository: Any, *, + repository: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -201,11 +210,11 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def cleanup_repository( self, - repository: Any, *, + repository: Any, master_timeout: Optional[Any] = ..., timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -220,14 +229,14 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def clone( self, + *, repository: Any, snapshot: Any, target_snapshot: Any, - *, - body: Any, + body: Mapping[str, Any], master_timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -241,19 +250,19 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def repository_analyze( self, - repository: Any, *, + repository: Any, blob_count: Optional[Any] = ..., concurrency: Optional[Any] = ..., - detailed: Optional[Any] = ..., + detailed: Optional[bool] = ..., early_read_node_count: Optional[Any] = ..., max_blob_size: Optional[Any] = ..., max_total_data_size: Optional[Any] = ..., rare_action_probability: Optional[Any] = ..., - rarely_abort_writes: Optional[Any] = ..., + rarely_abort_writes: Optional[bool] = ..., read_node_count: Optional[Any] = ..., seed: Optional[Any] = ..., timeout: Optional[Any] = ..., @@ -269,4 +278,4 @@ class SnapshotClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/sql.pyi b/elasticsearch/client/sql.pyi index 87224ad8b..63ac5e846 100644 --- a/elasticsearch/client/sql.pyi +++ b/elasticsearch/client/sql.pyi @@ -15,7 +15,16 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient @@ -23,7 +32,7 @@ class SqlClient(NamespacedClient): def clear_cursor( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -36,11 +45,11 @@ class SqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def query( self, *, - body: Any, + body: Mapping[str, Any], format: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -53,11 +62,11 @@ class SqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def translate( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -70,11 +79,11 @@ class SqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_async( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -87,11 +96,11 @@ class SqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_async( self, - id: Any, *, + id: Any, delimiter: Optional[Any] = ..., format: Optional[Any] = ..., keep_alive: Optional[Any] = ..., @@ -107,11 +116,11 @@ class SqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_async_status( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -124,4 +133,4 @@ class SqlClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/ssl.pyi b/elasticsearch/client/ssl.pyi index 9d1e41d60..c9c8c8347 100644 --- a/elasticsearch/client/ssl.pyi +++ b/elasticsearch/client/ssl.pyi @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -35,4 +35,4 @@ class SslClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/tasks.pyi b/elasticsearch/client/tasks.pyi index 39567d1c2..672673c2f 100644 --- a/elasticsearch/client/tasks.pyi +++ b/elasticsearch/client/tasks.pyi @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -24,12 +24,12 @@ class TasksClient(NamespacedClient): self, *, actions: Optional[Any] = ..., - detailed: Optional[Any] = ..., + detailed: Optional[bool] = ..., group_by: Optional[Any] = ..., nodes: Optional[Any] = ..., parent_task_id: Optional[Any] = ..., timeout: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -42,7 +42,7 @@ class TasksClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def cancel( self, *, @@ -50,7 +50,7 @@ class TasksClient(NamespacedClient): actions: Optional[Any] = ..., nodes: Optional[Any] = ..., parent_task_id: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -63,13 +63,13 @@ class TasksClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get( self, *, task_id: Optional[Any] = ..., timeout: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -82,4 +82,4 @@ class TasksClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/text_structure.pyi b/elasticsearch/client/text_structure.pyi index d7fc71d8b..abaa45380 100644 --- a/elasticsearch/client/text_structure.pyi +++ b/elasticsearch/client/text_structure.pyi @@ -15,7 +15,17 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Sequence, + Tuple, + Union, +) from .utils import NamespacedClient @@ -23,18 +33,18 @@ class TextStructureClient(NamespacedClient): def find_structure( self, *, - body: Any, + body: Union[Sequence[Mapping[str, Any]], bytes, str], charset: Optional[Any] = ..., column_names: Optional[Any] = ..., delimiter: Optional[Any] = ..., - explain: Optional[Any] = ..., + explain: Optional[bool] = ..., format: Optional[Any] = ..., grok_pattern: Optional[Any] = ..., - has_header_row: Optional[Any] = ..., + has_header_row: Optional[bool] = ..., line_merge_size_limit: Optional[Any] = ..., lines_to_sample: Optional[Any] = ..., quote: Optional[Any] = ..., - should_trim_fields: Optional[Any] = ..., + should_trim_fields: Optional[bool] = ..., timeout: Optional[Any] = ..., timestamp_field: Optional[Any] = ..., timestamp_format: Optional[Any] = ..., @@ -49,4 +59,4 @@ class TextStructureClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/transform.pyi b/elasticsearch/client/transform.pyi index da0e346cc..4ab10ef09 100644 --- a/elasticsearch/client/transform.pyi +++ b/elasticsearch/client/transform.pyi @@ -15,16 +15,25 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class TransformClient(NamespacedClient): def delete_transform( self, - transform_id: Any, *, - force: Optional[Any] = ..., + transform_id: Any, + force: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -37,13 +46,13 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_transform( self, *, transform_id: Optional[Any] = ..., - allow_no_match: Optional[Any] = ..., - exclude_generated: Optional[Any] = ..., + allow_no_match: Optional[bool] = ..., + exclude_generated: Optional[bool] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -58,12 +67,12 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_transform_stats( self, - transform_id: Any, *, - allow_no_match: Optional[Any] = ..., + transform_id: Any, + allow_no_match: Optional[bool] = ..., from_: Optional[Any] = ..., size: Optional[Any] = ..., pretty: Optional[bool] = ..., @@ -78,11 +87,11 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def preview_transform( self, *, - body: Any, + body: Mapping[str, Any], pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -95,13 +104,13 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_transform( self, - transform_id: Any, *, - body: Any, - defer_validation: Optional[Any] = ..., + transform_id: Any, + body: Mapping[str, Any], + defer_validation: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -114,11 +123,11 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def start_transform( self, - transform_id: Any, *, + transform_id: Any, timeout: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -132,16 +141,16 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stop_transform( self, - transform_id: Any, *, - allow_no_match: Optional[Any] = ..., - force: Optional[Any] = ..., + transform_id: Any, + allow_no_match: Optional[bool] = ..., + force: Optional[bool] = ..., timeout: Optional[Any] = ..., - wait_for_checkpoint: Optional[Any] = ..., - wait_for_completion: Optional[Any] = ..., + wait_for_checkpoint: Optional[bool] = ..., + wait_for_completion: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -154,13 +163,13 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def update_transform( self, - transform_id: Any, *, - body: Any, - defer_validation: Optional[Any] = ..., + transform_id: Any, + body: Mapping[str, Any], + defer_validation: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -173,4 +182,4 @@ class TransformClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/utils.pyi b/elasticsearch/client/utils.pyi index e7ec3cad5..9e9489932 100644 --- a/elasticsearch/client/utils.pyi +++ b/elasticsearch/client/utils.pyi @@ -22,7 +22,9 @@ from typing import ( Callable, Collection, Dict, + Iterable, List, + Mapping, Optional, Tuple, TypeVar, @@ -48,8 +50,8 @@ def query_params( *es_query_params: str, ) -> Callable[[Callable[..., T]], Callable[..., T]]: ... def _bulk_body( - serializer: Serializer, body: Union[str, bytes, Collection[Any]] -) -> str: ... + serializer: Serializer, body: Union[str, bytes, Mapping[str, Any], Iterable[Any]] +) -> Union[str, Mapping[str, Any]]: ... class NamespacedClient: client: Elasticsearch diff --git a/elasticsearch/client/watcher.pyi b/elasticsearch/client/watcher.pyi index 38e3fcec1..6b61e2259 100644 --- a/elasticsearch/client/watcher.pyi +++ b/elasticsearch/client/watcher.pyi @@ -15,15 +15,24 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import ( + Any, + Collection, + Dict, + Mapping, + MutableMapping, + Optional, + Tuple, + Union, +) from .utils import NamespacedClient class WatcherClient(NamespacedClient): def ack_watch( self, - watch_id: Any, *, + watch_id: Any, action_id: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -37,11 +46,11 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def activate_watch( self, - watch_id: Any, *, + watch_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -54,11 +63,11 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def deactivate_watch( self, - watch_id: Any, *, + watch_id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -71,11 +80,11 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def delete_watch( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -88,13 +97,13 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def execute_watch( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., id: Optional[Any] = ..., - debug: Optional[Any] = ..., + debug: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -107,11 +116,11 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def get_watch( self, - id: Any, *, + id: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -124,13 +133,13 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def put_watch( self, - id: Any, *, - body: Optional[Any] = ..., - active: Optional[Any] = ..., + id: Any, + body: Optional[Mapping[str, Any]] = ..., + active: Optional[bool] = ..., if_primary_term: Optional[Any] = ..., if_seq_no: Optional[Any] = ..., version: Optional[Any] = ..., @@ -146,7 +155,7 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def start( self, *, @@ -162,12 +171,12 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stats( self, *, metric: Optional[Any] = ..., - emit_stacktraces: Optional[Any] = ..., + emit_stacktraces: Optional[bool] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -180,7 +189,7 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def stop( self, *, @@ -196,11 +205,11 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def query_watches( self, *, - body: Optional[Any] = ..., + body: Optional[Mapping[str, Any]] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -213,4 +222,4 @@ class WatcherClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/elasticsearch/client/xpack.pyi b/elasticsearch/client/xpack.pyi index 67b2fa492..3f337de8b 100644 --- a/elasticsearch/client/xpack.pyi +++ b/elasticsearch/client/xpack.pyi @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -from typing import Any, Collection, MutableMapping, Optional, Tuple, Union +from typing import Any, Collection, Dict, MutableMapping, Optional, Tuple, Union from .utils import NamespacedClient @@ -26,7 +26,7 @@ class XPackClient(NamespacedClient): def info( self, *, - accept_enterprise: Optional[Any] = ..., + accept_enterprise: Optional[bool] = ..., categories: Optional[Any] = ..., pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -40,7 +40,7 @@ class XPackClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... def usage( self, *, @@ -57,4 +57,4 @@ class XPackClient(NamespacedClient): api_key: Optional[Union[str, Tuple[str, str]]] = ..., params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ..., - ) -> Any: ... + ) -> Dict[str, Any]: ... diff --git a/utils/generate-api.py b/utils/generate-api.py deleted file mode 100644 index 82d725c18..000000000 --- a/utils/generate-api.py +++ /dev/null @@ -1,429 +0,0 @@ -#!/usr/bin/env python -# Licensed to Elasticsearch B.V. under one or more contributor -# license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright -# ownership. Elasticsearch B.V. licenses this file to you under -# the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -import contextlib -import io -import json -import os -import re -import shutil -import sys -import tempfile -import zipfile -from functools import lru_cache -from itertools import chain -from pathlib import Path - -import black -import unasync -import urllib3 -from click.testing import CliRunner -from jinja2 import Environment, FileSystemLoader, TemplateNotFound - -http = urllib3.PoolManager() - -# line to look for in the original source file -SEPARATOR = " # AUTO-GENERATED-API-DEFINITIONS #" -# global substitutions for python keywords -SUBSTITUTIONS = {"type": "doc_type", "from": "from_"} -# api path(s) -BRANCH_NAME = "7.x" -CODE_ROOT = Path(__file__).absolute().parent.parent -GLOBAL_QUERY_PARAMS = { - "pretty": "Optional[bool]", - "human": "Optional[bool]", - "error_trace": "Optional[bool]", - "format": "Optional[str]", - "filter_path": "Optional[Union[str, Collection[str]]]", - "request_timeout": "Optional[Union[int, float]]", - "ignore": "Optional[Union[int, Collection[int]]]", - "opaque_id": "Optional[str]", - "http_auth": "Optional[Union[str, Tuple[str, str]]]", - "api_key": "Optional[Union[str, Tuple[str, str]]]", -} - -jinja_env = Environment( - loader=FileSystemLoader([CODE_ROOT / "utils" / "templates"]), - trim_blocks=True, - lstrip_blocks=True, -) - - -def blacken(filename): - runner = CliRunner() - result = runner.invoke(black.main, [str(filename)]) - assert result.exit_code == 0, result.output - - -@lru_cache() -def is_valid_url(url): - return 200 <= http.request("HEAD", url).status < 400 - - -class Module: - def __init__(self, namespace, is_pyi=False): - self.namespace = namespace - self.is_pyi = is_pyi - self._apis = [] - self.parse_orig() - - if not is_pyi: - self.pyi = Module(namespace, is_pyi=True) - self.pyi.orders = self.orders[:] - - def add(self, api): - self._apis.append(api) - - def parse_orig(self): - self.orders = [] - self.header = "class C:" - if os.path.exists(self.filepath): - with open(self.filepath) as f: - content = f.read() - header_lines = [] - for line in content.split("\n"): - header_lines.append(line) - if line == SEPARATOR: - break - # no separator found - else: - header_lines = [] - for line in content.split("\n"): - header_lines.append(line) - if line.startswith("class"): - break - self.header = "\n".join(header_lines) - self.orders = re.findall( - r"\n (?:async )?def ([a-z_]+)\(", content, re.MULTILINE - ) - - def _position(self, api): - try: - return self.orders.index(api.name) - except ValueError: - return len(self.orders) - - def sort(self): - self._apis.sort(key=self._position) - - def dump(self): - self.sort() - with open(self.filepath, "w") as f: - f.write(self.header) - for api in self._apis: - f.write(api.to_python()) - - if not self.is_pyi: - self.pyi.dump() - - @property - def filepath(self): - return ( - CODE_ROOT - / f"elasticsearch/_async/client/{self.namespace}.py{'i' if self.is_pyi else ''}" - ) - - -class API: - def __init__(self, namespace, name, definition, is_pyi=False): - self.namespace = namespace - self.name = name - self.is_pyi = is_pyi - - # overwrite the dict to maintain key order - definition["params"] = { - SUBSTITUTIONS.get(p, p): v for p, v in definition.get("params", {}).items() - } - - self._def = definition - self.description = "" - self.doc_url = "" - self.stability = self._def.get("stability", "stable") - - if isinstance(definition["documentation"], str): - self.doc_url = definition["documentation"] - else: - # set as attribute so it may be overridden by Module.add - self.description = ( - definition["documentation"].get("description", "").strip() - ) - self.doc_url = definition["documentation"].get("url", "") - - # Filter out bad URL refs like 'TODO' - # and serve all docs over HTTPS. - if self.doc_url: - if not self.doc_url.startswith("http"): - self.doc_url = "" - if self.doc_url.startswith("http://"): - self.doc_url = self.doc_url.replace("http://", "https://") - - # Try setting doc refs like 'current' and 'master' to our branches ref. - if BRANCH_NAME is not None: - revised_url = re.sub( - "/elasticsearch/reference/[^/]+/", - f"/elasticsearch/reference/{BRANCH_NAME}/", - self.doc_url, - ) - if is_valid_url(revised_url): - self.doc_url = revised_url - else: - print(f"URL {revised_url!r}, falling back on {self.doc_url!r}") - - @property - def all_parts(self): - parts = {} - for url in self._def["url"]["paths"]: - parts.update(url.get("parts", {})) - - for p in parts: - parts[p]["required"] = all( - p in url.get("parts", {}) for url in self._def["url"]["paths"] - ) - parts[p]["type"] = "Any" - - # This piece of logic corresponds to calling - # client.tasks.get() w/o a task_id which was erroneously - # allowed in the 7.1 client library. This functionality - # is deprecated and will be removed in 8.x. - if self.namespace == "tasks" and self.name == "get": - parts["task_id"]["required"] = False - - for k, sub in SUBSTITUTIONS.items(): - if k in parts: - parts[sub] = parts.pop(k) - - dynamic, components = self.url_parts - - def ind(item): - try: - return components.index(item[0]) - except ValueError: - return len(components) - - parts = dict(sorted(parts.items(), key=ind)) - return parts - - @property - def params(self): - parts = self.all_parts - params = self._def.get("params", {}) - return chain( - ((p, parts[p]) for p in parts if parts[p]["required"]), - (("body", self.body),) if self.body else (), - ( - (p, parts[p]) - for p in parts - if not parts[p]["required"] and p not in params - ), - sorted(params.items(), key=lambda x: (x[0] not in parts, x[0])), - ) - - @property - def body(self): - b = self._def.get("body", {}) - if b: - b.setdefault("required", False) - return b - - @property - def query_params(self): - return ( - k - for k in sorted(self._def.get("params", {}).keys()) - if k not in self.all_parts - ) - - @property - def all_func_params(self): - """Parameters that will be in the '@query_params' decorator list - and parameters that will be in the function signature. - This doesn't include - """ - params = list(self._def.get("params", {}).keys()) - for url in self._def["url"]["paths"]: - params.extend(url.get("parts", {}).keys()) - if self.body: - params.append("body") - return params - - @property - def path(self): - return max( - (path for path in self._def["url"]["paths"]), - key=lambda p: len(re.findall(r"\{([^}]+)\}", p["path"])), - ) - - @property - def method(self): - # To adhere to the HTTP RFC we shouldn't send - # bodies in GET requests. - default_method = self.path["methods"][0] - if self.body and default_method == "GET" and "POST" in self.path["methods"]: - return "POST" - return default_method - - @property - def url_parts(self): - path = self.path["path"] - - dynamic = "{" in path - if not dynamic: - return dynamic, path - - parts = [] - for part in path.split("/"): - if not part: - continue - - if part[0] == "{": - part = part[1:-1] - parts.append(SUBSTITUTIONS.get(part, part)) - else: - parts.append(f"'{part}'") - - return dynamic, parts - - @property - def required_parts(self): - parts = self.all_parts - required = [p for p in parts if parts[p]["required"]] - if self.body.get("required"): - required.append("body") - return required - - def to_python(self): - if self.is_pyi: - t = jinja_env.get_template("base_pyi") - else: - try: - t = jinja_env.get_template(f"overrides/{self.namespace}/{self.name}") - except TemplateNotFound: - t = jinja_env.get_template("base") - - return t.render( - api=self, - substitutions={v: k for k, v in SUBSTITUTIONS.items()}, - global_query_params=GLOBAL_QUERY_PARAMS, - ) - - -@contextlib.contextmanager -def download_artifact(version): - # Download the list of all artifacts for a version - # and find the latest build URL for 'rest-resources-zip-*.zip' - resp = http.request( - "GET", f"https://artifacts-api.elastic.co/v1/versions/{version}" - ) - packages = json.loads(resp.data)["version"]["builds"][0]["projects"][ - "elasticsearch" - ]["packages"] - for package in packages: - if re.match(r"^rest-resources-zip-.*\.zip$", package): - zip_url = packages[package]["url"] - break - else: - raise RuntimeError( - "Could not find the package 'rest-resources-zip-*.zip' in build" - ) - - # Download the .jar file and unzip only the API - # .json files into a temporary directory - resp = http.request("GET", zip_url) - - tmp = Path(tempfile.mkdtemp()) - zip = zipfile.ZipFile(io.BytesIO(resp.data)) - for name in zip.namelist(): - if not name.endswith(".json") or name == "schema.json": - continue - with (tmp / name.replace("rest-api-spec/api/", "")).open("wb") as f: - f.write(zip.read(name)) - - yield tmp - shutil.rmtree(tmp) - - -def read_modules(version): - modules = {} - - with download_artifact(version) as path: - for f in sorted(os.listdir(path)): - name, ext = f.rsplit(".", 1) - - if ext != "json" or name == "_common": - continue - - with open(path / f) as api_def: - api = json.load(api_def)[name] - - namespace = "__init__" - if "." in name: - namespace, name = name.rsplit(".", 1) - - # The data_frame API has been changed to transform. - if namespace == "data_frame_transform_deprecated": - continue - - if namespace not in modules: - modules[namespace] = Module(namespace) - - modules[namespace].add(API(namespace, name, api)) - modules[namespace].pyi.add(API(namespace, name, api, is_pyi=True)) - - return modules - - -def dump_modules(modules): - for mod in modules.values(): - mod.dump() - - # Unasync all the generated async code - additional_replacements = { - # We want to rewrite to 'Transport' instead of 'SyncTransport', etc - "AsyncTransport": "Transport", - "AsyncElasticsearch": "Elasticsearch", - # We don't want to rewrite this class - "AsyncSearchClient": "AsyncSearchClient", - } - rules = [ - unasync.Rule( - fromdir="/elasticsearch/_async/client/", - todir="/elasticsearch/client/", - additional_replacements=additional_replacements, - ), - ] - - filepaths = [] - for root, _, filenames in os.walk(CODE_ROOT / "elasticsearch/_async"): - for filename in filenames: - if ( - filename.rpartition(".")[-1] - in ( - "py", - "pyi", - ) - and not filename.startswith("utils.py") - ): - filepaths.append(os.path.join(root, filename)) - - unasync.unasync_files(filepaths, rules) - blacken(CODE_ROOT / "elasticsearch") - - -if __name__ == "__main__": - version = sys.argv[1] - dump_modules(read_modules(version)) diff --git a/utils/templates/base b/utils/templates/base deleted file mode 100644 index 028fce3e6..000000000 --- a/utils/templates/base +++ /dev/null @@ -1,37 +0,0 @@ - - @query_params({{ api.query_params|map("tojson")|join(", ")}}) - async def {{ api.name }}(self, {% include "func_params" %}): - """ - {% if api.description %} - {{ api.description|replace("\n", " ")|wordwrap(wrapstring="\n ") }} - {% endif %} - {% if api.doc_url %} - - `<{{ api.doc_url }}>`_ - {% endif %} - {% if api.stability != "stable" %} - - .. warning:: - - This API is **{{ api.stability }}** so may include breaking changes - or be removed in a future version - {% endif %} - {% if api.params|list|length %} - - {% for p, info in api.params %} - {% filter wordwrap(72, wrapstring="\n ") %} - :arg {{ p }}: {{ info.description }}{% if info.options %} Valid choices: {{ info.options|join(", ") }}{% endif %}{% if info.default %} Default: {{ info.default }}{% endif %} - {% endfilter %} - - {% endfor %} - {% endif %} - """ - {% include "substitutions" %} - {% include "required" %} - {% if api.body.serialize == "bulk" %} - body = _bulk_body(self.transport.serializer, body) - {% endif %} - {% block request %} - return await self.transport.perform_request("{{ api.method }}", {% include "url" %}, params=params, headers=headers{% if api.body %}, body=body{% endif %}) - {% endblock %} - diff --git a/utils/templates/base_pyi b/utils/templates/base_pyi deleted file mode 100644 index c4dbde158..000000000 --- a/utils/templates/base_pyi +++ /dev/null @@ -1,2 +0,0 @@ - - async def {{ api.name }}(self, {% include "func_params_pyi" %}) -> {% if api.method == 'HEAD' %}bool{% else %}Any{% endif %}: ... diff --git a/utils/templates/func_params b/utils/templates/func_params deleted file mode 100644 index 067e8f128..000000000 --- a/utils/templates/func_params +++ /dev/null @@ -1,14 +0,0 @@ -{% for p, info in api.all_parts.items() %} - {% if info.required %}{{ p }}, {% endif %} -{% endfor %} - -{% if api.body %} - body{% if not api.body.required %}=None{% endif %}, -{% endif %} - -{% for p, info in api.all_parts.items() %} - {% if not info.required %}{{ p }}=None, {% endif %} -{% endfor %} - -params=None, -headers=None diff --git a/utils/templates/func_params_pyi b/utils/templates/func_params_pyi deleted file mode 100644 index cd48f9a6d..000000000 --- a/utils/templates/func_params_pyi +++ /dev/null @@ -1,26 +0,0 @@ -{% for p, info in api.all_parts.items() %} - {% if info.required %}{{ p }}: {{ info.type }}, {% endif %} -{% endfor %} - -*, - -{% if api.body %} - body{% if not api.body.required %}: Optional[Any]=...{% else %}: Any{% endif %}, -{% endif %} - -{% for p, info in api.all_parts.items() %} - {% if not info.required %}{{ p }}: Optional[{{ info.type }}]=..., {% endif %} -{% endfor %} - -{% for p in api.query_params %} - {{ p }}: Optional[Any]=..., -{% endfor %} - -{% for p, p_type in global_query_params.items() %} - {% if p not in api.all_func_params %} - {{ p }}: {{ p_type }}=..., - {% endif %} -{% endfor %} - -params: Optional[MutableMapping[str, Any]]=..., -headers: Optional[MutableMapping[str, str]]=..., diff --git a/utils/templates/overrides/__init__/clear_scroll b/utils/templates/overrides/__init__/clear_scroll deleted file mode 100644 index ecbecd2ac..000000000 --- a/utils/templates/overrides/__init__/clear_scroll +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "base" %} -{% block request %} - if scroll_id in SKIP_IN_PATH and body in SKIP_IN_PATH: - raise ValueError("You need to supply scroll_id or body.") - elif scroll_id and not body: - body = {"scroll_id": [scroll_id]} - elif scroll_id: - params["scroll_id"] = scroll_id - - return await self.transport.perform_request("{{ api.method }}", "/_search/scroll", params=params, headers=headers, body=body) -{% endblock %} - diff --git a/utils/templates/overrides/__init__/create b/utils/templates/overrides/__init__/create deleted file mode 100644 index 0f9d2f92b..000000000 --- a/utils/templates/overrides/__init__/create +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "base" %} -{% block request %} - if doc_type in SKIP_IN_PATH: - path = _make_path(index, "_create", id) - else: - path = _make_path(index, doc_type, id, "_create") - - return await self.transport.perform_request("{{ api.method }}", path, params=params, headers=headers, body=body) -{% endblock %} \ No newline at end of file diff --git a/utils/templates/overrides/__init__/delete b/utils/templates/overrides/__init__/delete deleted file mode 100644 index 5e6bfd6aa..000000000 --- a/utils/templates/overrides/__init__/delete +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "base" %} -{% block request %} - if doc_type in SKIP_IN_PATH: - doc_type = "_doc" - - {{ super()|trim }} -{% endblock %} \ No newline at end of file diff --git a/utils/templates/overrides/__init__/exists b/utils/templates/overrides/__init__/exists deleted file mode 100644 index 5e6bfd6aa..000000000 --- a/utils/templates/overrides/__init__/exists +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "base" %} -{% block request %} - if doc_type in SKIP_IN_PATH: - doc_type = "_doc" - - {{ super()|trim }} -{% endblock %} \ No newline at end of file diff --git a/utils/templates/overrides/__init__/exists_source b/utils/templates/overrides/__init__/exists_source deleted file mode 100644 index 0ca1f55e8..000000000 --- a/utils/templates/overrides/__init__/exists_source +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "base" %} -{% block request %} - if doc_type in SKIP_IN_PATH: - path = _make_path(index, "_source", id) - else: - path = _make_path(index, doc_type, id, "_source") - - return await self.transport.perform_request("{{ api.method }}", path, params=params, headers=headers) -{% endblock %} \ No newline at end of file diff --git a/utils/templates/overrides/__init__/explain b/utils/templates/overrides/__init__/explain deleted file mode 100644 index 266789df8..000000000 --- a/utils/templates/overrides/__init__/explain +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "base" %} -{% block request %} - if doc_type in SKIP_IN_PATH: - path = _make_path(index, "_explain", id) - else: - path = _make_path(index, doc_type, id, "_explain") - - return await self.transport.perform_request("{{ api.method }}", path, params=params, headers=headers, body=body) -{% endblock %} \ No newline at end of file diff --git a/utils/templates/overrides/__init__/get b/utils/templates/overrides/__init__/get deleted file mode 100644 index 5e6bfd6aa..000000000 --- a/utils/templates/overrides/__init__/get +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "base" %} -{% block request %} - if doc_type in SKIP_IN_PATH: - doc_type = "_doc" - - {{ super()|trim }} -{% endblock %} \ No newline at end of file diff --git a/utils/templates/overrides/__init__/get_source b/utils/templates/overrides/__init__/get_source deleted file mode 100644 index 0ca1f55e8..000000000 --- a/utils/templates/overrides/__init__/get_source +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "base" %} -{% block request %} - if doc_type in SKIP_IN_PATH: - path = _make_path(index, "_source", id) - else: - path = _make_path(index, doc_type, id, "_source") - - return await self.transport.perform_request("{{ api.method }}", path, params=params, headers=headers) -{% endblock %} \ No newline at end of file diff --git a/utils/templates/overrides/__init__/index b/utils/templates/overrides/__init__/index deleted file mode 100644 index 1ac073869..000000000 --- a/utils/templates/overrides/__init__/index +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "base" %} -{% block request %} - if doc_type is None: - doc_type = "_doc" - - - return await self.transport.perform_request("POST" if id in SKIP_IN_PATH else "PUT", {% include "url" %}, params=params, headers=headers, body=body) -{% endblock %} - diff --git a/utils/templates/overrides/__init__/mtermvectors b/utils/templates/overrides/__init__/mtermvectors deleted file mode 100644 index 3798d4d2a..000000000 --- a/utils/templates/overrides/__init__/mtermvectors +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "base" %} -{% block request %} - if doc_type in SKIP_IN_PATH: - path = _make_path(index, "_mtermvectors") - else: - path = _make_path(index, doc_type, "_mtermvectors") - - return await self.transport.perform_request("{{ api.method }}", path, params=params, headers=headers, body=body) -{% endblock %} \ No newline at end of file diff --git a/utils/templates/overrides/__init__/ping b/utils/templates/overrides/__init__/ping deleted file mode 100644 index a509a592f..000000000 --- a/utils/templates/overrides/__init__/ping +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "base" %} -{% block request %} - try: - {{ super()|trim }} - except TransportError: - return False -{% endblock %} - diff --git a/utils/templates/overrides/__init__/scroll b/utils/templates/overrides/__init__/scroll deleted file mode 100644 index 243143e42..000000000 --- a/utils/templates/overrides/__init__/scroll +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "base" %} -{% block request %} - if scroll_id in SKIP_IN_PATH and body in SKIP_IN_PATH: - raise ValueError("You need to supply scroll_id or body.") - elif scroll_id and not body: - body = {"scroll_id": scroll_id} - elif scroll_id: - params["scroll_id"] = scroll_id - - return await self.transport.perform_request("{{ api.method }}", "/_search/scroll", params=params, headers=headers, body=body) -{% endblock %} - diff --git a/utils/templates/overrides/__init__/termvectors b/utils/templates/overrides/__init__/termvectors deleted file mode 100644 index eea62439d..000000000 --- a/utils/templates/overrides/__init__/termvectors +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "base" %} -{% block request %} - if doc_type in SKIP_IN_PATH: - path = _make_path(index, "_termvectors", id) - else: - path = _make_path(index, doc_type, id, "_termvectors") - - return await self.transport.perform_request("{{ api.method }}", path, params=params, headers=headers, body=body) -{% endblock %} \ No newline at end of file diff --git a/utils/templates/overrides/__init__/update b/utils/templates/overrides/__init__/update deleted file mode 100644 index 85ca22652..000000000 --- a/utils/templates/overrides/__init__/update +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "base" %} -{% block request %} - if doc_type in SKIP_IN_PATH: - path = _make_path(index, "_update", id) - else: - path = _make_path(index, doc_type, id, "_update") - - return await self.transport.perform_request("{{ api.method }}", path, params=params, headers=headers, body=body) -{% endblock %} \ No newline at end of file diff --git a/utils/templates/overrides/cluster/state b/utils/templates/overrides/cluster/state deleted file mode 100644 index 27d599cbf..000000000 --- a/utils/templates/overrides/cluster/state +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "base" %} -{% block request %} - if index and metric in SKIP_IN_PATH: - metric = "_all" - - {{ super()|trim }} -{% endblock %} - diff --git a/utils/templates/overrides/cluster/stats b/utils/templates/overrides/cluster/stats deleted file mode 100644 index 3223013a7..000000000 --- a/utils/templates/overrides/cluster/stats +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "base" %} -{% block request %} - return await self.transport.perform_request("{{ api.method }}", "/_cluster/stats" if node_id in SKIP_IN_PATH else _make_path("_cluster", "stats", "nodes", node_id), params=params, headers=headers) -{% endblock%} - diff --git a/utils/templates/overrides/indices/put_mapping b/utils/templates/overrides/indices/put_mapping deleted file mode 100644 index 50a1b1b98..000000000 --- a/utils/templates/overrides/indices/put_mapping +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "base" %} -{% block request %} - if doc_type not in SKIP_IN_PATH and index in SKIP_IN_PATH: - index = "_all" - - {{ super()|trim }} -{% endblock %} - diff --git a/utils/templates/overrides/tasks/get b/utils/templates/overrides/tasks/get deleted file mode 100644 index b38a9b632..000000000 --- a/utils/templates/overrides/tasks/get +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "base" %} -{% block request %} - if task_id in SKIP_IN_PATH: - warnings.warn( - "Calling client.tasks.get() without a task_id is deprecated " - "and will be removed in v8.0. Use client.tasks.list() instead.", - category=DeprecationWarning, - stacklevel=3, - ) - - {{ super()|trim }} -{% endblock %} - diff --git a/utils/templates/required b/utils/templates/required deleted file mode 100644 index c1fb503c5..000000000 --- a/utils/templates/required +++ /dev/null @@ -1,11 +0,0 @@ - {% if api.required_parts.1 %} - for param in ({{ api.required_parts|join(", ")}}): - if param in SKIP_IN_PATH: - raise ValueError("Empty value passed for a required argument.") - - {% elif api.required_parts %} - if {{ api.required_parts.0 }} in SKIP_IN_PATH: - raise ValueError("Empty value passed for a required argument '{{ api.required_parts.0 }}'.") - - {% endif %} - diff --git a/utils/templates/substitutions b/utils/templates/substitutions deleted file mode 100644 index d01580753..000000000 --- a/utils/templates/substitutions +++ /dev/null @@ -1,9 +0,0 @@ -{% for p, info in api.params %} - {% if p in substitutions and p not in api.url_parts.1 %} - # {{ substitutions[p] }} is a reserved word so it cannot be used, use {{ p }} instead - if "{{ p }}" in params: - params["{{ substitutions[p] }}"] = params.pop("{{ p }}") - - {% endif %} -{% endfor %} - diff --git a/utils/templates/url b/utils/templates/url deleted file mode 100644 index e89df4907..000000000 --- a/utils/templates/url +++ /dev/null @@ -1 +0,0 @@ -{% if api.url_parts.0 %}_make_path({{ api.url_parts.1|join(", ")}}){% else %}{{ api.url_parts.1|tojson }}{% endif %}