Skip to content

Commit f98a4d3

Browse files
committed
Run code generation
1 parent 6a35578 commit f98a4d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3860
-810
lines changed

elasticsearch_serverless/_async/client/__init__.py

Lines changed: 337 additions & 67 deletions
Large diffs are not rendered by default.

elasticsearch_serverless/_async/client/async_search.py

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ async def delete(
4848
"""
4949
if id in SKIP_IN_PATH:
5050
raise ValueError("Empty value passed for parameter 'id'")
51-
__path = f"/_async_search/{_quote(id)}"
51+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
52+
__path = f'/_async_search/{__path_parts["id"]}'
5253
__query: t.Dict[str, t.Any] = {}
5354
if error_trace is not None:
5455
__query["error_trace"] = error_trace
@@ -60,7 +61,12 @@ async def delete(
6061
__query["pretty"] = pretty
6162
__headers = {"accept": "application/json"}
6263
return await self.perform_request( # type: ignore[return-value]
63-
"DELETE", __path, params=__query, headers=__headers
64+
"DELETE",
65+
__path,
66+
params=__query,
67+
headers=__headers,
68+
endpoint_id="async_search.delete",
69+
path_parts=__path_parts,
6470
)
6571

6672
@_rewrite_parameters()
@@ -104,7 +110,8 @@ async def get(
104110
"""
105111
if id in SKIP_IN_PATH:
106112
raise ValueError("Empty value passed for parameter 'id'")
107-
__path = f"/_async_search/{_quote(id)}"
113+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
114+
__path = f'/_async_search/{__path_parts["id"]}'
108115
__query: t.Dict[str, t.Any] = {}
109116
if error_trace is not None:
110117
__query["error_trace"] = error_trace
@@ -122,7 +129,12 @@ async def get(
122129
__query["wait_for_completion_timeout"] = wait_for_completion_timeout
123130
__headers = {"accept": "application/json"}
124131
return await self.perform_request( # type: ignore[return-value]
125-
"GET", __path, params=__query, headers=__headers
132+
"GET",
133+
__path,
134+
params=__query,
135+
headers=__headers,
136+
endpoint_id="async_search.get",
137+
path_parts=__path_parts,
126138
)
127139

128140
@_rewrite_parameters()
@@ -147,7 +159,8 @@ async def status(
147159
"""
148160
if id in SKIP_IN_PATH:
149161
raise ValueError("Empty value passed for parameter 'id'")
150-
__path = f"/_async_search/status/{_quote(id)}"
162+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
163+
__path = f'/_async_search/status/{__path_parts["id"]}'
151164
__query: t.Dict[str, t.Any] = {}
152165
if error_trace is not None:
153166
__query["error_trace"] = error_trace
@@ -159,7 +172,12 @@ async def status(
159172
__query["pretty"] = pretty
160173
__headers = {"accept": "application/json"}
161174
return await self.perform_request( # type: ignore[return-value]
162-
"GET", __path, params=__query, headers=__headers
175+
"GET",
176+
__path,
177+
params=__query,
178+
headers=__headers,
179+
endpoint_id="async_search.status",
180+
path_parts=__path_parts,
163181
)
164182

165183
@_rewrite_parameters(
@@ -443,9 +461,12 @@ async def submit(
443461
up to a certain timeout. When the async search completes within the timeout,
444462
the response won’t include the ID as the results are not stored in the cluster.
445463
"""
464+
__path_parts: t.Dict[str, str]
446465
if index not in SKIP_IN_PATH:
447-
__path = f"/{_quote(index)}/_async_search"
466+
__path_parts = {"index": _quote(index)}
467+
__path = f'/{__path_parts["index"]}/_async_search'
448468
else:
469+
__path_parts = {}
449470
__path = "/_async_search"
450471
__query: t.Dict[str, t.Any] = {}
451472
__body: t.Dict[str, t.Any] = body if body is not None else {}
@@ -605,5 +626,11 @@ async def submit(
605626
if __body is not None:
606627
__headers["content-type"] = "application/json"
607628
return await self.perform_request( # type: ignore[return-value]
608-
"POST", __path, params=__query, headers=__headers, body=__body
629+
"POST",
630+
__path,
631+
params=__query,
632+
headers=__headers,
633+
body=__body,
634+
endpoint_id="async_search.submit",
635+
path_parts=__path_parts,
609636
)

elasticsearch_serverless/_async/client/cat.py

Lines changed: 97 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,12 @@ async def aliases(
8080
a suffix to the column name.
8181
:param v: When set to `true` will enable verbose output.
8282
"""
83+
__path_parts: t.Dict[str, str]
8384
if name not in SKIP_IN_PATH:
84-
__path = f"/_cat/aliases/{_quote(name)}"
85+
__path_parts = {"name": _quote(name)}
86+
__path = f'/_cat/aliases/{__path_parts["name"]}'
8587
else:
88+
__path_parts = {}
8689
__path = "/_cat/aliases"
8790
__query: t.Dict[str, t.Any] = {}
8891
if error_trace is not None:
@@ -111,7 +114,12 @@ async def aliases(
111114
__query["v"] = v
112115
__headers = {"accept": "text/plain,application/json"}
113116
return await self.perform_request( # type: ignore[return-value]
114-
"GET", __path, params=__query, headers=__headers
117+
"GET",
118+
__path,
119+
params=__query,
120+
headers=__headers,
121+
endpoint_id="cat.aliases",
122+
path_parts=__path_parts,
115123
)
116124

117125
@_rewrite_parameters()
@@ -159,9 +167,12 @@ async def component_templates(
159167
a suffix to the column name.
160168
:param v: When set to `true` will enable verbose output.
161169
"""
170+
__path_parts: t.Dict[str, str]
162171
if name not in SKIP_IN_PATH:
163-
__path = f"/_cat/component_templates/{_quote(name)}"
172+
__path_parts = {"name": _quote(name)}
173+
__path = f'/_cat/component_templates/{__path_parts["name"]}'
164174
else:
175+
__path_parts = {}
165176
__path = "/_cat/component_templates"
166177
__query: t.Dict[str, t.Any] = {}
167178
if error_trace is not None:
@@ -188,7 +199,12 @@ async def component_templates(
188199
__query["v"] = v
189200
__headers = {"accept": "text/plain,application/json"}
190201
return await self.perform_request( # type: ignore[return-value]
191-
"GET", __path, params=__query, headers=__headers
202+
"GET",
203+
__path,
204+
params=__query,
205+
headers=__headers,
206+
endpoint_id="cat.component_templates",
207+
path_parts=__path_parts,
192208
)
193209

194210
@_rewrite_parameters()
@@ -238,9 +254,12 @@ async def count(
238254
a suffix to the column name.
239255
:param v: When set to `true` will enable verbose output.
240256
"""
257+
__path_parts: t.Dict[str, str]
241258
if index not in SKIP_IN_PATH:
242-
__path = f"/_cat/count/{_quote(index)}"
259+
__path_parts = {"index": _quote(index)}
260+
__path = f'/_cat/count/{__path_parts["index"]}'
243261
else:
262+
__path_parts = {}
244263
__path = "/_cat/count"
245264
__query: t.Dict[str, t.Any] = {}
246265
if error_trace is not None:
@@ -267,7 +286,12 @@ async def count(
267286
__query["v"] = v
268287
__headers = {"accept": "text/plain,application/json"}
269288
return await self.perform_request( # type: ignore[return-value]
270-
"GET", __path, params=__query, headers=__headers
289+
"GET",
290+
__path,
291+
params=__query,
292+
headers=__headers,
293+
endpoint_id="cat.count",
294+
path_parts=__path_parts,
271295
)
272296

273297
@_rewrite_parameters()
@@ -308,6 +332,7 @@ async def help(
308332
a suffix to the column name.
309333
:param v: When set to `true` will enable verbose output.
310334
"""
335+
__path_parts: t.Dict[str, str] = {}
311336
__path = "/_cat"
312337
__query: t.Dict[str, t.Any] = {}
313338
if error_trace is not None:
@@ -334,7 +359,12 @@ async def help(
334359
__query["v"] = v
335360
__headers = {"accept": "text/plain"}
336361
return await self.perform_request( # type: ignore[return-value]
337-
"GET", __path, params=__query, headers=__headers
362+
"GET",
363+
__path,
364+
params=__query,
365+
headers=__headers,
366+
endpoint_id="cat.help",
367+
path_parts=__path_parts,
338368
)
339369

340370
@_rewrite_parameters()
@@ -413,9 +443,12 @@ async def indices(
413443
:param time: The unit used to display time values.
414444
:param v: When set to `true` will enable verbose output.
415445
"""
446+
__path_parts: t.Dict[str, str]
416447
if index not in SKIP_IN_PATH:
417-
__path = f"/_cat/indices/{_quote(index)}"
448+
__path_parts = {"index": _quote(index)}
449+
__path = f'/_cat/indices/{__path_parts["index"]}'
418450
else:
451+
__path_parts = {}
419452
__path = "/_cat/indices"
420453
__query: t.Dict[str, t.Any] = {}
421454
if bytes is not None:
@@ -454,7 +487,12 @@ async def indices(
454487
__query["v"] = v
455488
__headers = {"accept": "text/plain,application/json"}
456489
return await self.perform_request( # type: ignore[return-value]
457-
"GET", __path, params=__query, headers=__headers
490+
"GET",
491+
__path,
492+
params=__query,
493+
headers=__headers,
494+
endpoint_id="cat.indices",
495+
path_parts=__path_parts,
458496
)
459497

460498
@_rewrite_parameters()
@@ -534,9 +572,12 @@ async def ml_data_frame_analytics(
534572
:param time: Unit used to display time values.
535573
:param v: When set to `true` will enable verbose output.
536574
"""
575+
__path_parts: t.Dict[str, str]
537576
if id not in SKIP_IN_PATH:
538-
__path = f"/_cat/ml/data_frame/analytics/{_quote(id)}"
577+
__path_parts = {"id": _quote(id)}
578+
__path = f'/_cat/ml/data_frame/analytics/{__path_parts["id"]}'
539579
else:
580+
__path_parts = {}
540581
__path = "/_cat/ml/data_frame/analytics"
541582
__query: t.Dict[str, t.Any] = {}
542583
if allow_no_match is not None:
@@ -569,7 +610,12 @@ async def ml_data_frame_analytics(
569610
__query["v"] = v
570611
__headers = {"accept": "text/plain,application/json"}
571612
return await self.perform_request( # type: ignore[return-value]
572-
"GET", __path, params=__query, headers=__headers
613+
"GET",
614+
__path,
615+
params=__query,
616+
headers=__headers,
617+
endpoint_id="cat.ml_data_frame_analytics",
618+
path_parts=__path_parts,
573619
)
574620

575621
@_rewrite_parameters()
@@ -655,9 +701,12 @@ async def ml_datafeeds(
655701
:param time: The unit used to display time values.
656702
:param v: When set to `true` will enable verbose output.
657703
"""
704+
__path_parts: t.Dict[str, str]
658705
if datafeed_id not in SKIP_IN_PATH:
659-
__path = f"/_cat/ml/datafeeds/{_quote(datafeed_id)}"
706+
__path_parts = {"datafeed_id": _quote(datafeed_id)}
707+
__path = f'/_cat/ml/datafeeds/{__path_parts["datafeed_id"]}'
660708
else:
709+
__path_parts = {}
661710
__path = "/_cat/ml/datafeeds"
662711
__query: t.Dict[str, t.Any] = {}
663712
if allow_no_match is not None:
@@ -688,7 +737,12 @@ async def ml_datafeeds(
688737
__query["v"] = v
689738
__headers = {"accept": "text/plain,application/json"}
690739
return await self.perform_request( # type: ignore[return-value]
691-
"GET", __path, params=__query, headers=__headers
740+
"GET",
741+
__path,
742+
params=__query,
743+
headers=__headers,
744+
endpoint_id="cat.ml_datafeeds",
745+
path_parts=__path_parts,
692746
)
693747

694748
@_rewrite_parameters()
@@ -778,9 +832,12 @@ async def ml_jobs(
778832
:param time: The unit used to display time values.
779833
:param v: When set to `true` will enable verbose output.
780834
"""
835+
__path_parts: t.Dict[str, str]
781836
if job_id not in SKIP_IN_PATH:
782-
__path = f"/_cat/ml/anomaly_detectors/{_quote(job_id)}"
837+
__path_parts = {"job_id": _quote(job_id)}
838+
__path = f'/_cat/ml/anomaly_detectors/{__path_parts["job_id"]}'
783839
else:
840+
__path_parts = {}
784841
__path = "/_cat/ml/anomaly_detectors"
785842
__query: t.Dict[str, t.Any] = {}
786843
if allow_no_match is not None:
@@ -813,7 +870,12 @@ async def ml_jobs(
813870
__query["v"] = v
814871
__headers = {"accept": "text/plain,application/json"}
815872
return await self.perform_request( # type: ignore[return-value]
816-
"GET", __path, params=__query, headers=__headers
873+
"GET",
874+
__path,
875+
params=__query,
876+
headers=__headers,
877+
endpoint_id="cat.ml_jobs",
878+
path_parts=__path_parts,
817879
)
818880

819881
@_rewrite_parameters(
@@ -902,9 +964,12 @@ async def ml_trained_models(
902964
:param size: The maximum number of transforms to display.
903965
:param v: When set to `true` will enable verbose output.
904966
"""
967+
__path_parts: t.Dict[str, str]
905968
if model_id not in SKIP_IN_PATH:
906-
__path = f"/_cat/ml/trained_models/{_quote(model_id)}"
969+
__path_parts = {"model_id": _quote(model_id)}
970+
__path = f'/_cat/ml/trained_models/{__path_parts["model_id"]}'
907971
else:
972+
__path_parts = {}
908973
__path = "/_cat/ml/trained_models"
909974
__query: t.Dict[str, t.Any] = {}
910975
if allow_no_match is not None:
@@ -939,7 +1004,12 @@ async def ml_trained_models(
9391004
__query["v"] = v
9401005
__headers = {"accept": "text/plain,application/json"}
9411006
return await self.perform_request( # type: ignore[return-value]
942-
"GET", __path, params=__query, headers=__headers
1007+
"GET",
1008+
__path,
1009+
params=__query,
1010+
headers=__headers,
1011+
endpoint_id="cat.ml_trained_models",
1012+
path_parts=__path_parts,
9431013
)
9441014

9451015
@_rewrite_parameters(
@@ -1030,9 +1100,12 @@ async def transforms(
10301100
:param time: The unit used to display time values.
10311101
:param v: When set to `true` will enable verbose output.
10321102
"""
1103+
__path_parts: t.Dict[str, str]
10331104
if transform_id not in SKIP_IN_PATH:
1034-
__path = f"/_cat/transforms/{_quote(transform_id)}"
1105+
__path_parts = {"transform_id": _quote(transform_id)}
1106+
__path = f'/_cat/transforms/{__path_parts["transform_id"]}'
10351107
else:
1108+
__path_parts = {}
10361109
__path = "/_cat/transforms"
10371110
__query: t.Dict[str, t.Any] = {}
10381111
if allow_no_match is not None:
@@ -1067,5 +1140,10 @@ async def transforms(
10671140
__query["v"] = v
10681141
__headers = {"accept": "text/plain,application/json"}
10691142
return await self.perform_request( # type: ignore[return-value]
1070-
"GET", __path, params=__query, headers=__headers
1143+
"GET",
1144+
__path,
1145+
params=__query,
1146+
headers=__headers,
1147+
endpoint_id="cat.transforms",
1148+
path_parts=__path_parts,
10711149
)

0 commit comments

Comments
 (0)