Skip to content
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

Auto-generated code for 8.11 #2358

Merged
merged 1 commit into from
Nov 3, 2023
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
4 changes: 4 additions & 0 deletions elasticsearch/_async/client/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -3303,6 +3303,7 @@ async def put_trained_model_vocabulary(
human: t.Optional[bool] = None,
merges: t.Optional[t.Sequence[str]] = None,
pretty: t.Optional[bool] = None,
scores: t.Optional[t.Sequence[float]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Creates a trained model vocabulary
Expand All @@ -3312,6 +3313,7 @@ async def put_trained_model_vocabulary(
:param model_id: The unique identifier of the trained model.
:param vocabulary: The model vocabulary, which must not be empty.
:param merges: The optional model merges if required by the tokenizer.
:param scores: The optional vocabulary value scores if required by the tokenizer.
"""
if model_id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'model_id'")
Expand All @@ -3332,6 +3334,8 @@ async def put_trained_model_vocabulary(
__body["merges"] = merges
if pretty is not None:
__query["pretty"] = pretty
if scores is not None:
__body["scores"] = scores
__headers = {"accept": "application/json", "content-type": "application/json"}
return await self.perform_request( # type: ignore[return-value]
"PUT", __path, params=__query, headers=__headers, body=__body
Expand Down
6 changes: 6 additions & 0 deletions elasticsearch/_async/client/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ async def delete_transform(
self,
*,
transform_id: str,
delete_dest_index: t.Optional[bool] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
force: t.Optional[bool] = None,
Expand All @@ -42,6 +43,9 @@ async def delete_transform(
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/delete-transform.html>`_

:param transform_id: Identifier for the transform.
:param delete_dest_index: If this value is true, the destination index is deleted
together with the transform. If false, the destination index will not be
deleted
:param force: If this value is false, the transform must be stopped before it
can be deleted. If true, the transform is deleted regardless of its current
state.
Expand All @@ -52,6 +56,8 @@ async def delete_transform(
raise ValueError("Empty value passed for parameter 'transform_id'")
__path = f"/_transform/{_quote(transform_id)}"
__query: t.Dict[str, t.Any] = {}
if delete_dest_index is not None:
__query["delete_dest_index"] = delete_dest_index
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
Expand Down
4 changes: 4 additions & 0 deletions elasticsearch/_sync/client/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -3303,6 +3303,7 @@ def put_trained_model_vocabulary(
human: t.Optional[bool] = None,
merges: t.Optional[t.Sequence[str]] = None,
pretty: t.Optional[bool] = None,
scores: t.Optional[t.Sequence[float]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Creates a trained model vocabulary
Expand All @@ -3312,6 +3313,7 @@ def put_trained_model_vocabulary(
:param model_id: The unique identifier of the trained model.
:param vocabulary: The model vocabulary, which must not be empty.
:param merges: The optional model merges if required by the tokenizer.
:param scores: The optional vocabulary value scores if required by the tokenizer.
"""
if model_id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'model_id'")
Expand All @@ -3332,6 +3334,8 @@ def put_trained_model_vocabulary(
__body["merges"] = merges
if pretty is not None:
__query["pretty"] = pretty
if scores is not None:
__body["scores"] = scores
__headers = {"accept": "application/json", "content-type": "application/json"}
return self.perform_request( # type: ignore[return-value]
"PUT", __path, params=__query, headers=__headers, body=__body
Expand Down
6 changes: 6 additions & 0 deletions elasticsearch/_sync/client/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def delete_transform(
self,
*,
transform_id: str,
delete_dest_index: t.Optional[bool] = None,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
force: t.Optional[bool] = None,
Expand All @@ -42,6 +43,9 @@ def delete_transform(
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/delete-transform.html>`_

:param transform_id: Identifier for the transform.
:param delete_dest_index: If this value is true, the destination index is deleted
together with the transform. If false, the destination index will not be
deleted
:param force: If this value is false, the transform must be stopped before it
can be deleted. If true, the transform is deleted regardless of its current
state.
Expand All @@ -52,6 +56,8 @@ def delete_transform(
raise ValueError("Empty value passed for parameter 'transform_id'")
__path = f"/_transform/{_quote(transform_id)}"
__query: t.Dict[str, t.Any] = {}
if delete_dest_index is not None:
__query["delete_dest_index"] = delete_dest_index
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
Expand Down