Skip to content

Auto-generated code for main #2467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 27 additions & 54 deletions elasticsearch/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,7 @@ async def clear_scroll(

:param scroll_id: Scroll IDs to clear. To clear all scroll IDs, use `_all`.
"""
__path_parts: t.Dict[str, str]
__path_parts = {}
__path_parts: t.Dict[str, str] = {}
__path = "/_search/scroll"
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
Expand Down Expand Up @@ -796,8 +795,7 @@ async def close_point_in_time(
"""
if id is None and body is None:
raise ValueError("Empty value passed for parameter 'id'")
__path_parts: t.Dict[str, str]
__path_parts = {}
__path_parts: t.Dict[str, str] = {}
__path = "/_pit"
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
Expand Down Expand Up @@ -1038,8 +1036,7 @@ async def create(
)
elif document is not None and body is not None:
raise ValueError("Cannot set both 'document' and 'body'")
__path_parts: t.Dict[str, str]
__path_parts = {"index": _quote(index), "id": _quote(id)}
__path_parts: t.Dict[str, str] = {"index": _quote(index), "id": _quote(id)}
__path = f'/{__path_parts["index"]}/_create/{__path_parts["id"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -1130,8 +1127,7 @@ async def delete(
raise ValueError("Empty value passed for parameter 'index'")
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path_parts: t.Dict[str, str]
__path_parts = {"index": _quote(index), "id": _quote(id)}
__path_parts: t.Dict[str, str] = {"index": _quote(index), "id": _quote(id)}
__path = f'/{__path_parts["index"]}/_doc/{__path_parts["id"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -1296,8 +1292,7 @@ async def delete_by_query(
"""
if index in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'index'")
__path_parts: t.Dict[str, str]
__path_parts = {"index": _quote(index)}
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
__path = f'/{__path_parts["index"]}/_delete_by_query'
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
Expand Down Expand Up @@ -1416,8 +1411,7 @@ async def delete_by_query_rethrottle(
"""
if task_id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'task_id'")
__path_parts: t.Dict[str, str]
__path_parts = {"task_id": _quote(task_id)}
__path_parts: t.Dict[str, str] = {"task_id": _quote(task_id)}
__path = f'/_delete_by_query/{__path_parts["task_id"]}/_rethrottle'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -1468,8 +1462,7 @@ async def delete_script(
"""
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path_parts: t.Dict[str, str]
__path_parts = {"id": _quote(id)}
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
__path = f'/_scripts/{__path_parts["id"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -1555,8 +1548,7 @@ async def exists(
raise ValueError("Empty value passed for parameter 'index'")
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path_parts: t.Dict[str, str]
__path_parts = {"index": _quote(index), "id": _quote(id)}
__path_parts: t.Dict[str, str] = {"index": _quote(index), "id": _quote(id)}
__path = f'/{__path_parts["index"]}/_doc/{__path_parts["id"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -1654,8 +1646,7 @@ async def exists_source(
raise ValueError("Empty value passed for parameter 'index'")
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path_parts: t.Dict[str, str]
__path_parts = {"index": _quote(index), "id": _quote(id)}
__path_parts: t.Dict[str, str] = {"index": _quote(index), "id": _quote(id)}
__path = f'/{__path_parts["index"]}/_source/{__path_parts["id"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -1761,8 +1752,7 @@ async def explain(
raise ValueError("Empty value passed for parameter 'index'")
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path_parts: t.Dict[str, str]
__path_parts = {"index": _quote(index), "id": _quote(id)}
__path_parts: t.Dict[str, str] = {"index": _quote(index), "id": _quote(id)}
__path = f'/{__path_parts["index"]}/_explain/{__path_parts["id"]}'
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
Expand Down Expand Up @@ -1992,8 +1982,7 @@ async def get(
raise ValueError("Empty value passed for parameter 'index'")
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path_parts: t.Dict[str, str]
__path_parts = {"index": _quote(index), "id": _quote(id)}
__path_parts: t.Dict[str, str] = {"index": _quote(index), "id": _quote(id)}
__path = f'/{__path_parts["index"]}/_doc/{__path_parts["id"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -2057,8 +2046,7 @@ async def get_script(
"""
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path_parts: t.Dict[str, str]
__path_parts = {"id": _quote(id)}
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
__path = f'/_scripts/{__path_parts["id"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -2095,8 +2083,7 @@ async def get_script_context(

`<https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html>`_
"""
__path_parts: t.Dict[str, str]
__path_parts = {}
__path_parts: t.Dict[str, str] = {}
__path = "/_script_context"
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -2131,8 +2118,7 @@ async def get_script_languages(

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html>`_
"""
__path_parts: t.Dict[str, str]
__path_parts = {}
__path_parts: t.Dict[str, str] = {}
__path = "/_script_language"
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -2211,8 +2197,7 @@ async def get_source(
raise ValueError("Empty value passed for parameter 'index'")
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path_parts: t.Dict[str, str]
__path_parts = {"index": _quote(index), "id": _quote(id)}
__path_parts: t.Dict[str, str] = {"index": _quote(index), "id": _quote(id)}
__path = f'/{__path_parts["index"]}/_source/{__path_parts["id"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -2455,8 +2440,7 @@ async def info(

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/index.html>`_
"""
__path_parts: t.Dict[str, str]
__path_parts = {}
__path_parts: t.Dict[str, str] = {}
__path = "/"
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -2537,8 +2521,7 @@ async def knn_search(
raise ValueError("Empty value passed for parameter 'index'")
if knn is None and body is None:
raise ValueError("Empty value passed for parameter 'knn'")
__path_parts: t.Dict[str, str]
__path_parts = {"index": _quote(index)}
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
__path = f'/{__path_parts["index"]}/_knn_search'
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
Expand Down Expand Up @@ -3069,8 +3052,7 @@ async def open_point_in_time(
raise ValueError("Empty value passed for parameter 'index'")
if keep_alive is None:
raise ValueError("Empty value passed for parameter 'keep_alive'")
__path_parts: t.Dict[str, str]
__path_parts = {"index": _quote(index)}
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
__path = f'/{__path_parts["index"]}/_pit'
__query: t.Dict[str, t.Any] = {}
if keep_alive is not None:
Expand Down Expand Up @@ -3335,8 +3317,7 @@ async def reindex(
raise ValueError("Empty value passed for parameter 'dest'")
if source is None and body is None:
raise ValueError("Empty value passed for parameter 'source'")
__path_parts: t.Dict[str, str]
__path_parts = {}
__path_parts: t.Dict[str, str] = {}
__path = "/_reindex"
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
Expand Down Expand Up @@ -3410,8 +3391,7 @@ async def reindex_rethrottle(
"""
if task_id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'task_id'")
__path_parts: t.Dict[str, str]
__path_parts = {"task_id": _quote(task_id)}
__path_parts: t.Dict[str, str] = {"task_id": _quote(task_id)}
__path = f'/_reindex/{__path_parts["task_id"]}/_rethrottle'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -3528,8 +3508,7 @@ async def scripts_painless_execute(
:param context_setup: Additional parameters for the `context`.
:param script: The Painless script to execute.
"""
__path_parts: t.Dict[str, str]
__path_parts = {}
__path_parts: t.Dict[str, str] = {}
__path = "/_scripts/painless/_execute"
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
Expand Down Expand Up @@ -3591,8 +3570,7 @@ async def scroll(
"""
if scroll_id is None and body is None:
raise ValueError("Empty value passed for parameter 'scroll_id'")
__path_parts: t.Dict[str, str]
__path_parts = {}
__path_parts: t.Dict[str, str] = {}
__path = "/_search/scroll"
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
Expand Down Expand Up @@ -4234,8 +4212,7 @@ async def search_mvt(
raise ValueError("Empty value passed for parameter 'x'")
if y in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'y'")
__path_parts: t.Dict[str, str]
__path_parts = {
__path_parts: t.Dict[str, str] = {
"index": _quote(index),
"field": _quote(field),
"zoom": _quote(zoom),
Expand Down Expand Up @@ -4593,8 +4570,7 @@ async def terms_enum(
raise ValueError("Empty value passed for parameter 'index'")
if field is None and body is None:
raise ValueError("Empty value passed for parameter 'field'")
__path_parts: t.Dict[str, str]
__path_parts = {"index": _quote(index)}
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
__path = f'/{__path_parts["index"]}/_terms_enum'
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
Expand Down Expand Up @@ -4854,8 +4830,7 @@ async def update(
raise ValueError("Empty value passed for parameter 'index'")
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path_parts: t.Dict[str, str]
__path_parts = {"index": _quote(index), "id": _quote(id)}
__path_parts: t.Dict[str, str] = {"index": _quote(index), "id": _quote(id)}
__path = f'/{__path_parts["index"]}/_update/{__path_parts["id"]}'
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
Expand Down Expand Up @@ -5054,8 +5029,7 @@ async def update_by_query(
"""
if index in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'index'")
__path_parts: t.Dict[str, str]
__path_parts = {"index": _quote(index)}
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
__path = f'/{__path_parts["index"]}/_update_by_query'
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
Expand Down Expand Up @@ -5182,8 +5156,7 @@ async def update_by_query_rethrottle(
"""
if task_id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'task_id'")
__path_parts: t.Dict[str, str]
__path_parts = {"task_id": _quote(task_id)}
__path_parts: t.Dict[str, str] = {"task_id": _quote(task_id)}
__path = f'/_update_by_query/{__path_parts["task_id"]}/_rethrottle'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down
9 changes: 3 additions & 6 deletions elasticsearch/_async/client/async_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ async def delete(
"""
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path_parts: t.Dict[str, str]
__path_parts = {"id": _quote(id)}
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
__path = f'/_async_search/{__path_parts["id"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -106,8 +105,7 @@ async def get(
"""
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path_parts: t.Dict[str, str]
__path_parts = {"id": _quote(id)}
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
__path = f'/_async_search/{__path_parts["id"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -154,8 +152,7 @@ async def status(
"""
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path_parts: t.Dict[str, str]
__path_parts = {"id": _quote(id)}
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
__path = f'/_async_search/status/{__path_parts["id"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down
12 changes: 4 additions & 8 deletions elasticsearch/_async/client/autoscaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ async def delete_autoscaling_policy(
"""
if name in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'name'")
__path_parts: t.Dict[str, str]
__path_parts = {"name": _quote(name)}
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
__path = f'/_autoscaling/policy/{__path_parts["name"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -82,8 +81,7 @@ async def get_autoscaling_capacity(

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-get-autoscaling-capacity.html>`_
"""
__path_parts: t.Dict[str, str]
__path_parts = {}
__path_parts: t.Dict[str, str] = {}
__path = "/_autoscaling/capacity"
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -124,8 +122,7 @@ async def get_autoscaling_policy(
"""
if name in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'name'")
__path_parts: t.Dict[str, str]
__path_parts = {"name": _quote(name)}
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
__path = f'/_autoscaling/policy/{__path_parts["name"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down Expand Up @@ -177,8 +174,7 @@ async def put_autoscaling_policy(
)
elif policy is not None and body is not None:
raise ValueError("Cannot set both 'policy' and 'body'")
__path_parts: t.Dict[str, str]
__path_parts = {"name": _quote(name)}
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
__path = f'/_autoscaling/policy/{__path_parts["name"]}'
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
Expand Down
Loading