Skip to content

Commit

Permalink
Auto-generated API code
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Oct 7, 2024
1 parent 4095a21 commit 0b92af4
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 10 deletions.
9 changes: 8 additions & 1 deletion elasticsearch/_async/client/esql.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ async def query(
error_trace: t.Optional[bool] = None,
filter: t.Optional[t.Mapping[str, t.Any]] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
format: t.Optional[
t.Union[
str,
t.Literal[
"arrow", "cbor", "csv", "json", "smile", "tsv", "txt", "yaml"
],
]
] = None,
human: t.Optional[bool] = None,
locale: t.Optional[str] = None,
params: t.Optional[t.Sequence[t.Union[None, bool, float, int, str]]] = None,
Expand Down
6 changes: 5 additions & 1 deletion elasticsearch/_async/client/ilm.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ async def move_to_step(
*,
index: str,
current_step: t.Optional[t.Mapping[str, t.Any]] = None,
next_step: t.Optional[t.Mapping[str, t.Any]] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
next_step: t.Optional[t.Mapping[str, t.Any]] = None,
pretty: t.Optional[bool] = None,
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
Expand All @@ -322,6 +322,10 @@ async def move_to_step(
"""
if index in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'index'")
if current_step is None and body is None:
raise ValueError("Empty value passed for parameter 'current_step'")
if next_step is None and body is None:
raise ValueError("Empty value passed for parameter 'next_step'")
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
__path = f'/_ilm/move/{__path_parts["index"]}'
__query: t.Dict[str, t.Any] = {}
Expand Down
6 changes: 3 additions & 3 deletions elasticsearch/_async/client/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def delete_geoip_database(
"""
Deletes a geoip database configuration.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html>`_
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/delete-geoip-database-api.html>`_
:param id: A comma-separated list of geoip database configurations to delete
:param master_timeout: Period to wait for a connection to the master node. If
Expand Down Expand Up @@ -177,7 +177,7 @@ async def get_geoip_database(
"""
Returns information about one or more geoip database configurations.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html>`_
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/get-geoip-database-api.html>`_
:param id: Comma-separated list of database configuration IDs to retrieve. Wildcard
(`*`) expressions are supported. To get all database configurations, omit
Expand Down Expand Up @@ -327,7 +327,7 @@ async def put_geoip_database(
"""
Returns information about one or more geoip database configurations.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html>`_
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/put-geoip-database-api.html>`_
:param id: ID of the database configuration to create or update.
:param maxmind: The configuration necessary to identify which IP geolocation
Expand Down
9 changes: 8 additions & 1 deletion elasticsearch/_sync/client/esql.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ def query(
error_trace: t.Optional[bool] = None,
filter: t.Optional[t.Mapping[str, t.Any]] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
format: t.Optional[
t.Union[
str,
t.Literal[
"arrow", "cbor", "csv", "json", "smile", "tsv", "txt", "yaml"
],
]
] = None,
human: t.Optional[bool] = None,
locale: t.Optional[str] = None,
params: t.Optional[t.Sequence[t.Union[None, bool, float, int, str]]] = None,
Expand Down
6 changes: 5 additions & 1 deletion elasticsearch/_sync/client/ilm.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ def move_to_step(
*,
index: str,
current_step: t.Optional[t.Mapping[str, t.Any]] = None,
next_step: t.Optional[t.Mapping[str, t.Any]] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
next_step: t.Optional[t.Mapping[str, t.Any]] = None,
pretty: t.Optional[bool] = None,
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
Expand All @@ -322,6 +322,10 @@ def move_to_step(
"""
if index in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'index'")
if current_step is None and body is None:
raise ValueError("Empty value passed for parameter 'current_step'")
if next_step is None and body is None:
raise ValueError("Empty value passed for parameter 'next_step'")
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
__path = f'/_ilm/move/{__path_parts["index"]}'
__query: t.Dict[str, t.Any] = {}
Expand Down
6 changes: 3 additions & 3 deletions elasticsearch/_sync/client/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def delete_geoip_database(
"""
Deletes a geoip database configuration.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html>`_
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/delete-geoip-database-api.html>`_
:param id: A comma-separated list of geoip database configurations to delete
:param master_timeout: Period to wait for a connection to the master node. If
Expand Down Expand Up @@ -177,7 +177,7 @@ def get_geoip_database(
"""
Returns information about one or more geoip database configurations.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html>`_
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/get-geoip-database-api.html>`_
:param id: Comma-separated list of database configuration IDs to retrieve. Wildcard
(`*`) expressions are supported. To get all database configurations, omit
Expand Down Expand Up @@ -327,7 +327,7 @@ def put_geoip_database(
"""
Returns information about one or more geoip database configurations.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html>`_
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/put-geoip-database-api.html>`_
:param id: ID of the database configuration to create or update.
:param maxmind: The configuration necessary to identify which IP geolocation
Expand Down

0 comments on commit 0b92af4

Please sign in to comment.