Skip to content

Commit 86e050b

Browse files
Auto-generated code for main (#90)
Auto-generated API code
1 parent de2fbd4 commit 86e050b

File tree

6 files changed

+630
-392
lines changed

6 files changed

+630
-392
lines changed

elasticsearch_serverless/_async/client/enrich.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -213,39 +213,3 @@ async def put_policy(
213213
endpoint_id="enrich.put_policy",
214214
path_parts=__path_parts,
215215
)
216-
217-
@_rewrite_parameters()
218-
async def stats(
219-
self,
220-
*,
221-
error_trace: t.Optional[bool] = None,
222-
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
223-
human: t.Optional[bool] = None,
224-
pretty: t.Optional[bool] = None,
225-
) -> ObjectApiResponse[t.Any]:
226-
"""
227-
Get enrich stats. Returns enrich coordinator statistics and information about
228-
enrich policies that are currently executing.
229-
230-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/enrich-stats-api.html>`_
231-
"""
232-
__path_parts: t.Dict[str, str] = {}
233-
__path = "/_enrich/_stats"
234-
__query: t.Dict[str, t.Any] = {}
235-
if error_trace is not None:
236-
__query["error_trace"] = error_trace
237-
if filter_path is not None:
238-
__query["filter_path"] = filter_path
239-
if human is not None:
240-
__query["human"] = human
241-
if pretty is not None:
242-
__query["pretty"] = pretty
243-
__headers = {"accept": "application/json"}
244-
return await self.perform_request( # type: ignore[return-value]
245-
"GET",
246-
__path,
247-
params=__query,
248-
headers=__headers,
249-
endpoint_id="enrich.stats",
250-
path_parts=__path_parts,
251-
)

elasticsearch_serverless/_async/client/indices.py

Lines changed: 0 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -487,68 +487,6 @@ async def delete_alias(
487487
path_parts=__path_parts,
488488
)
489489

490-
@_rewrite_parameters()
491-
async def delete_data_lifecycle(
492-
self,
493-
*,
494-
name: t.Union[str, t.Sequence[str]],
495-
error_trace: t.Optional[bool] = None,
496-
expand_wildcards: t.Optional[
497-
t.Union[
498-
t.Sequence[
499-
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
500-
],
501-
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
502-
]
503-
] = None,
504-
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
505-
human: t.Optional[bool] = None,
506-
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
507-
pretty: t.Optional[bool] = None,
508-
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
509-
) -> ObjectApiResponse[t.Any]:
510-
"""
511-
Delete data stream lifecycles. Removes the data stream lifecycle from a data
512-
stream, rendering it not managed by the data stream lifecycle.
513-
514-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-delete-lifecycle.html>`_
515-
516-
:param name: A comma-separated list of data streams of which the data stream
517-
lifecycle will be deleted; use `*` to get all data streams
518-
:param expand_wildcards: Whether wildcard expressions should get expanded to
519-
open or closed indices (default: open)
520-
:param master_timeout: Specify timeout for connection to master
521-
:param timeout: Explicit timestamp for the document
522-
"""
523-
if name in SKIP_IN_PATH:
524-
raise ValueError("Empty value passed for parameter 'name'")
525-
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
526-
__path = f'/_data_stream/{__path_parts["name"]}/_lifecycle'
527-
__query: t.Dict[str, t.Any] = {}
528-
if error_trace is not None:
529-
__query["error_trace"] = error_trace
530-
if expand_wildcards is not None:
531-
__query["expand_wildcards"] = expand_wildcards
532-
if filter_path is not None:
533-
__query["filter_path"] = filter_path
534-
if human is not None:
535-
__query["human"] = human
536-
if master_timeout is not None:
537-
__query["master_timeout"] = master_timeout
538-
if pretty is not None:
539-
__query["pretty"] = pretty
540-
if timeout is not None:
541-
__query["timeout"] = timeout
542-
__headers = {"accept": "application/json"}
543-
return await self.perform_request( # type: ignore[return-value]
544-
"DELETE",
545-
__path,
546-
params=__query,
547-
headers=__headers,
548-
endpoint_id="indices.delete_data_lifecycle",
549-
path_parts=__path_parts,
550-
)
551-
552490
@_rewrite_parameters()
553491
async def delete_data_stream(
554492
self,
@@ -2196,104 +2134,6 @@ async def put_settings(
21962134
path_parts=__path_parts,
21972135
)
21982136

2199-
@_rewrite_parameters(
2200-
body_fields=(
2201-
"aliases",
2202-
"index_patterns",
2203-
"mappings",
2204-
"order",
2205-
"settings",
2206-
"version",
2207-
),
2208-
)
2209-
async def put_template(
2210-
self,
2211-
*,
2212-
name: str,
2213-
aliases: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
2214-
cause: t.Optional[str] = None,
2215-
create: t.Optional[bool] = None,
2216-
error_trace: t.Optional[bool] = None,
2217-
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2218-
human: t.Optional[bool] = None,
2219-
index_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2220-
mappings: t.Optional[t.Mapping[str, t.Any]] = None,
2221-
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2222-
order: t.Optional[int] = None,
2223-
pretty: t.Optional[bool] = None,
2224-
settings: t.Optional[t.Mapping[str, t.Any]] = None,
2225-
version: t.Optional[int] = None,
2226-
body: t.Optional[t.Dict[str, t.Any]] = None,
2227-
) -> ObjectApiResponse[t.Any]:
2228-
"""
2229-
Create or update an index template. Index templates define settings, mappings,
2230-
and aliases that can be applied automatically to new indices.
2231-
2232-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html>`_
2233-
2234-
:param name: The name of the template
2235-
:param aliases: Aliases for the index.
2236-
:param cause:
2237-
:param create: If true, this request cannot replace or update existing index
2238-
templates.
2239-
:param index_patterns: Array of wildcard expressions used to match the names
2240-
of indices during creation.
2241-
:param mappings: Mapping for fields in the index.
2242-
:param master_timeout: Period to wait for a connection to the master node. If
2243-
no response is received before the timeout expires, the request fails and
2244-
returns an error.
2245-
:param order: Order in which Elasticsearch applies this template if index matches
2246-
multiple templates. Templates with lower 'order' values are merged first.
2247-
Templates with higher 'order' values are merged later, overriding templates
2248-
with lower values.
2249-
:param settings: Configuration options for the index.
2250-
:param version: Version number used to manage index templates externally. This
2251-
number is not automatically generated by Elasticsearch.
2252-
"""
2253-
if name in SKIP_IN_PATH:
2254-
raise ValueError("Empty value passed for parameter 'name'")
2255-
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
2256-
__path = f'/_template/{__path_parts["name"]}'
2257-
__query: t.Dict[str, t.Any] = {}
2258-
__body: t.Dict[str, t.Any] = body if body is not None else {}
2259-
if cause is not None:
2260-
__query["cause"] = cause
2261-
if create is not None:
2262-
__query["create"] = create
2263-
if error_trace is not None:
2264-
__query["error_trace"] = error_trace
2265-
if filter_path is not None:
2266-
__query["filter_path"] = filter_path
2267-
if human is not None:
2268-
__query["human"] = human
2269-
if master_timeout is not None:
2270-
__query["master_timeout"] = master_timeout
2271-
if pretty is not None:
2272-
__query["pretty"] = pretty
2273-
if not __body:
2274-
if aliases is not None:
2275-
__body["aliases"] = aliases
2276-
if index_patterns is not None:
2277-
__body["index_patterns"] = index_patterns
2278-
if mappings is not None:
2279-
__body["mappings"] = mappings
2280-
if order is not None:
2281-
__body["order"] = order
2282-
if settings is not None:
2283-
__body["settings"] = settings
2284-
if version is not None:
2285-
__body["version"] = version
2286-
__headers = {"accept": "application/json", "content-type": "application/json"}
2287-
return await self.perform_request( # type: ignore[return-value]
2288-
"PUT",
2289-
__path,
2290-
params=__query,
2291-
headers=__headers,
2292-
body=__body,
2293-
endpoint_id="indices.put_template",
2294-
path_parts=__path_parts,
2295-
)
2296-
22972137
@_rewrite_parameters()
22982138
async def refresh(
22992139
self,

0 commit comments

Comments
 (0)