Skip to content

Commit b1c8ce7

Browse files
first generator run for 9.1 (#3011)
1 parent fe4a246 commit b1c8ce7

File tree

14 files changed

+244
-372
lines changed

14 files changed

+244
-372
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,7 +2234,6 @@ async def field_caps(
22342234
@_rewrite_parameters(
22352235
parameter_aliases={
22362236
"_source": "source",
2237-
"_source_exclude_vectors": "source_exclude_vectors",
22382237
"_source_excludes": "source_excludes",
22392238
"_source_includes": "source_includes",
22402239
},
@@ -2254,7 +2253,6 @@ async def get(
22542253
refresh: t.Optional[bool] = None,
22552254
routing: t.Optional[str] = None,
22562255
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
2257-
source_exclude_vectors: t.Optional[bool] = None,
22582256
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
22592257
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
22602258
stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -2328,7 +2326,6 @@ async def get(
23282326
:param routing: A custom value used to route operations to a specific shard.
23292327
:param source: Indicates whether to return the `_source` field (`true` or `false`)
23302328
or lists the fields to return.
2331-
:param source_exclude_vectors: Whether vectors should be excluded from _source
23322329
:param source_excludes: A comma-separated list of source fields to exclude from
23332330
the response. You can also use this parameter to exclude fields from the
23342331
subset specified in `_source_includes` query parameter. If the `_source`
@@ -2374,8 +2371,6 @@ async def get(
23742371
__query["routing"] = routing
23752372
if source is not None:
23762373
__query["_source"] = source
2377-
if source_exclude_vectors is not None:
2378-
__query["_source_exclude_vectors"] = source_exclude_vectors
23792374
if source_excludes is not None:
23802375
__query["_source_excludes"] = source_excludes
23812376
if source_includes is not None:
@@ -4309,7 +4304,6 @@ async def scroll(
43094304
),
43104305
parameter_aliases={
43114306
"_source": "source",
4312-
"_source_exclude_vectors": "source_exclude_vectors",
43134307
"_source_excludes": "source_excludes",
43144308
"_source_includes": "source_includes",
43154309
"from": "from_",
@@ -4393,7 +4387,6 @@ async def search(
43934387
]
43944388
] = None,
43954389
source: t.Optional[t.Union[bool, t.Mapping[str, t.Any]]] = None,
4396-
source_exclude_vectors: t.Optional[bool] = None,
43974390
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
43984391
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
43994392
stats: t.Optional[t.Sequence[str]] = None,
@@ -4588,7 +4581,6 @@ async def search(
45884581
fields are returned in the `hits._source` property of the search response.
45894582
If the `stored_fields` property is specified, the `_source` property defaults
45904583
to `false`. Otherwise, it defaults to `true`.
4591-
:param source_exclude_vectors: Whether vectors should be excluded from _source
45924584
:param source_excludes: A comma-separated list of source fields to exclude from
45934585
the response. You can also use this parameter to exclude fields from the
45944586
subset specified in `_source_includes` query parameter. If the `_source`
@@ -4713,8 +4705,6 @@ async def search(
47134705
__query["scroll"] = scroll
47144706
if search_type is not None:
47154707
__query["search_type"] = search_type
4716-
if source_exclude_vectors is not None:
4717-
__query["_source_exclude_vectors"] = source_exclude_vectors
47184708
if source_excludes is not None:
47194709
__query["_source_excludes"] = source_excludes
47204710
if source_includes is not None:

elasticsearch/_async/client/cluster.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ async def allocation_explain(
4949
5050
<p>Explain the shard allocations.
5151
Get explanations for shard allocations in the cluster.
52-
This API accepts the current_node, index, primary and shard parameters in the request body or in query parameters, but not in both at the same time.
5352
For unassigned shards, it provides an explanation for why the shard is unassigned.
5453
For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node.
5554
This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise.
@@ -58,16 +57,17 @@ async def allocation_explain(
5857
5958
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain>`_
6059
61-
:param current_node: Explain a shard only if it is currently located on the specified
62-
node name or node ID.
60+
:param current_node: Specifies the node ID or the name of the node to only explain
61+
a shard that is currently located on the specified node.
6362
:param include_disk_info: If true, returns information about disk usage and shard
6463
sizes.
6564
:param include_yes_decisions: If true, returns YES decisions in explanation.
66-
:param index: The name of the index that you would like an explanation for.
65+
:param index: Specifies the name of the index that you would like an explanation
66+
for.
6767
:param master_timeout: Period to wait for a connection to the master node.
68-
:param primary: If true, returns an explanation for the primary shard for the
69-
specified shard ID.
70-
:param shard: An identifier for the shard that you would like an explanation
68+
:param primary: If true, returns explanation for the primary shard for the given
69+
shard ID.
70+
:param shard: Specifies the ID of the shard that you would like an explanation
7171
for.
7272
"""
7373
__path_parts: t.Dict[str, str] = {}
@@ -1119,8 +1119,7 @@ async def state(
11191119
when unavailable (missing or closed)
11201120
:param local: Return local information, do not retrieve the state from master
11211121
node (default: false)
1122-
:param master_timeout: Timeout for waiting for new cluster state in case it is
1123-
blocked
1122+
:param master_timeout: Specify timeout for connection to master
11241123
:param wait_for_metadata_version: Wait for the metadata version to be equal or
11251124
greater than the specified metadata version
11261125
:param wait_for_timeout: The maximum time to wait for wait_for_metadata_version

elasticsearch/_async/client/indices.py

Lines changed: 3 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ async def delete_data_stream_options(
12081208
Removes the data stream options from a data stream.</p>
12091209
12101210
1211-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/index.html>`_
1211+
`<https://www.elastic.co/guide/en/elasticsearch/reference/9.1/index.html>`_
12121212
12131213
:param name: A comma-separated list of data streams of which the data stream
12141214
options will be deleted; use `*` to get all data streams
@@ -2542,57 +2542,6 @@ async def get_data_stream(
25422542
path_parts=__path_parts,
25432543
)
25442544

2545-
@_rewrite_parameters()
2546-
async def get_data_stream_mappings(
2547-
self,
2548-
*,
2549-
name: t.Union[str, t.Sequence[str]],
2550-
error_trace: t.Optional[bool] = None,
2551-
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2552-
human: t.Optional[bool] = None,
2553-
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2554-
pretty: t.Optional[bool] = None,
2555-
) -> ObjectApiResponse[t.Any]:
2556-
"""
2557-
.. raw:: html
2558-
2559-
<p>Get data stream mappings.</p>
2560-
<p>Get mapping information for one or more data streams.</p>
2561-
2562-
2563-
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-mappings>`_
2564-
2565-
:param name: A comma-separated list of data streams or data stream patterns.
2566-
Supports wildcards (`*`).
2567-
:param master_timeout: The period to wait for a connection to the master node.
2568-
If no response is received before the timeout expires, the request fails
2569-
and returns an error.
2570-
"""
2571-
if name in SKIP_IN_PATH:
2572-
raise ValueError("Empty value passed for parameter 'name'")
2573-
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
2574-
__path = f'/_data_stream/{__path_parts["name"]}/_mappings'
2575-
__query: t.Dict[str, t.Any] = {}
2576-
if error_trace is not None:
2577-
__query["error_trace"] = error_trace
2578-
if filter_path is not None:
2579-
__query["filter_path"] = filter_path
2580-
if human is not None:
2581-
__query["human"] = human
2582-
if master_timeout is not None:
2583-
__query["master_timeout"] = master_timeout
2584-
if pretty is not None:
2585-
__query["pretty"] = pretty
2586-
__headers = {"accept": "application/json"}
2587-
return await self.perform_request( # type: ignore[return-value]
2588-
"GET",
2589-
__path,
2590-
params=__query,
2591-
headers=__headers,
2592-
endpoint_id="indices.get_data_stream_mappings",
2593-
path_parts=__path_parts,
2594-
)
2595-
25962545
@_rewrite_parameters()
25972546
async def get_data_stream_options(
25982547
self,
@@ -2619,7 +2568,7 @@ async def get_data_stream_options(
26192568
<p>Get the data stream options configuration of one or more data streams.</p>
26202569
26212570
2622-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/index.html>`_
2571+
`<https://www.elastic.co/guide/en/elasticsearch/reference/9.1/index.html>`_
26232572
26242573
:param name: Comma-separated list of data streams to limit the request. Supports
26252574
wildcards (`*`). To target all data streams, omit this parameter or use `*`
@@ -3704,83 +3653,6 @@ async def put_data_lifecycle(
37043653
path_parts=__path_parts,
37053654
)
37063655

3707-
@_rewrite_parameters(
3708-
body_name="mappings",
3709-
)
3710-
async def put_data_stream_mappings(
3711-
self,
3712-
*,
3713-
name: t.Union[str, t.Sequence[str]],
3714-
mappings: t.Optional[t.Mapping[str, t.Any]] = None,
3715-
body: t.Optional[t.Mapping[str, t.Any]] = None,
3716-
dry_run: t.Optional[bool] = None,
3717-
error_trace: t.Optional[bool] = None,
3718-
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3719-
human: t.Optional[bool] = None,
3720-
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3721-
pretty: t.Optional[bool] = None,
3722-
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3723-
) -> ObjectApiResponse[t.Any]:
3724-
"""
3725-
.. raw:: html
3726-
3727-
<p>Update data stream mappings.</p>
3728-
<p>This API can be used to override mappings on specific data streams. These overrides will take precedence over what
3729-
is specified in the template that the data stream matches. The mapping change is only applied to new write indices
3730-
that are created during rollover after this API is called. No indices are changed by this API.</p>
3731-
3732-
3733-
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-mappings>`_
3734-
3735-
:param name: A comma-separated list of data streams or data stream patterns.
3736-
:param mappings:
3737-
:param dry_run: If `true`, the request does not actually change the mappings
3738-
on any data streams. Instead, it simulates changing the settings and reports
3739-
back to the user what would have happened had these settings actually been
3740-
applied.
3741-
:param master_timeout: The period to wait for a connection to the master node.
3742-
If no response is received before the timeout expires, the request fails
3743-
and returns an error.
3744-
:param timeout: The period to wait for a response. If no response is received
3745-
before the timeout expires, the request fails and returns an error.
3746-
"""
3747-
if name in SKIP_IN_PATH:
3748-
raise ValueError("Empty value passed for parameter 'name'")
3749-
if mappings is None and body is None:
3750-
raise ValueError(
3751-
"Empty value passed for parameters 'mappings' and 'body', one of them should be set."
3752-
)
3753-
elif mappings is not None and body is not None:
3754-
raise ValueError("Cannot set both 'mappings' and 'body'")
3755-
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
3756-
__path = f'/_data_stream/{__path_parts["name"]}/_mappings'
3757-
__query: t.Dict[str, t.Any] = {}
3758-
if dry_run is not None:
3759-
__query["dry_run"] = dry_run
3760-
if error_trace is not None:
3761-
__query["error_trace"] = error_trace
3762-
if filter_path is not None:
3763-
__query["filter_path"] = filter_path
3764-
if human is not None:
3765-
__query["human"] = human
3766-
if master_timeout is not None:
3767-
__query["master_timeout"] = master_timeout
3768-
if pretty is not None:
3769-
__query["pretty"] = pretty
3770-
if timeout is not None:
3771-
__query["timeout"] = timeout
3772-
__body = mappings if mappings is not None else body
3773-
__headers = {"accept": "application/json", "content-type": "application/json"}
3774-
return await self.perform_request( # type: ignore[return-value]
3775-
"PUT",
3776-
__path,
3777-
params=__query,
3778-
headers=__headers,
3779-
body=__body,
3780-
endpoint_id="indices.put_data_stream_mappings",
3781-
path_parts=__path_parts,
3782-
)
3783-
37843656
@_rewrite_parameters(
37853657
body_fields=("failure_store",),
37863658
)
@@ -3812,7 +3684,7 @@ async def put_data_stream_options(
38123684
Update the data stream options of the specified data streams.</p>
38133685
38143686
3815-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/index.html>`_
3687+
`<https://www.elastic.co/guide/en/elasticsearch/reference/9.1/index.html>`_
38163688
38173689
:param name: Comma-separated list of data streams used to limit the request.
38183690
Supports wildcards (`*`). To target all data streams use `*` or `_all`.

0 commit comments

Comments
 (0)