Skip to content

Commit 34deed5

Browse files
authored
Update generated code (#33)
This adds the Inference API
1 parent 917ad0b commit 34deed5

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

+2012
-3458
lines changed

docs/sphinx/api.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ Indices
6666
.. autoclass:: IndicesClient
6767
:members:
6868

69+
Inference
70+
---------
71+
72+
.. autoclass:: InferenceClient
73+
:members:
74+
6975
Ingest Pipelines
7076
----------------
7177

elasticsearch_serverless/_async/client/__init__.py

Lines changed: 161 additions & 402 deletions
Large diffs are not rendered by default.

elasticsearch_serverless/_async/client/async_search.py

Lines changed: 20 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@
2424

2525

2626
class AsyncSearchClient(NamespacedClient):
27+
2728
@_rewrite_parameters()
2829
async def delete(
2930
self,
3031
*,
3132
id: str,
3233
error_trace: t.Optional[bool] = None,
33-
filter_path: t.Optional[
34-
t.Union[str, t.Union[t.List[str], t.Tuple[str, ...]]]
35-
] = None,
34+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3635
human: t.Optional[bool] = None,
3736
pretty: t.Optional[bool] = None,
3837
) -> ObjectApiResponse[t.Any]:
@@ -67,9 +66,7 @@ async def get(
6766
*,
6867
id: str,
6968
error_trace: t.Optional[bool] = None,
70-
filter_path: t.Optional[
71-
t.Union[str, t.Union[t.List[str], t.Tuple[str, ...]]]
72-
] = None,
69+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
7370
human: t.Optional[bool] = None,
7471
keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
7572
pretty: t.Optional[bool] = None,
@@ -129,9 +126,7 @@ async def status(
129126
*,
130127
id: str,
131128
error_trace: t.Optional[bool] = None,
132-
filter_path: t.Optional[
133-
t.Union[str, t.Union[t.List[str], t.Tuple[str, ...]]]
134-
] = None,
129+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
135130
human: t.Optional[bool] = None,
136131
pretty: t.Optional[bool] = None,
137132
) -> ObjectApiResponse[t.Any]:
@@ -172,7 +167,7 @@ async def status(
172167
async def submit(
173168
self,
174169
*,
175-
index: t.Optional[t.Union[str, t.Union[t.List[str], t.Tuple[str, ...]]]] = None,
170+
index: t.Optional[t.Union[str, t.Sequence[str]]] = None,
176171
aggregations: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
177172
aggs: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
178173
allow_no_indices: t.Optional[bool] = None,
@@ -184,53 +179,30 @@ async def submit(
184179
collapse: t.Optional[t.Mapping[str, t.Any]] = None,
185180
default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None,
186181
df: t.Optional[str] = None,
187-
docvalue_fields: t.Optional[
188-
t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]]
189-
] = None,
182+
docvalue_fields: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
190183
error_trace: t.Optional[bool] = None,
191184
expand_wildcards: t.Optional[
192185
t.Union[
193-
t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
194-
t.Union[
195-
t.List[
196-
t.Union[
197-
"t.Literal['all', 'closed', 'hidden', 'none', 'open']", str
198-
]
199-
],
200-
t.Tuple[
201-
t.Union[
202-
"t.Literal['all', 'closed', 'hidden', 'none', 'open']", str
203-
],
204-
...,
205-
],
186+
t.Sequence[
187+
t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
206188
],
189+
t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
207190
]
208191
] = None,
209192
explain: t.Optional[bool] = None,
210193
ext: t.Optional[t.Mapping[str, t.Any]] = None,
211-
fields: t.Optional[
212-
t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]]
213-
] = None,
214-
filter_path: t.Optional[
215-
t.Union[str, t.Union[t.List[str], t.Tuple[str, ...]]]
216-
] = None,
194+
fields: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
195+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
217196
from_: t.Optional[int] = None,
218197
highlight: t.Optional[t.Mapping[str, t.Any]] = None,
219198
human: t.Optional[bool] = None,
220199
ignore_throttled: t.Optional[bool] = None,
221200
ignore_unavailable: t.Optional[bool] = None,
222-
indices_boost: t.Optional[
223-
t.Union[t.List[t.Mapping[str, float]], t.Tuple[t.Mapping[str, float], ...]]
224-
] = None,
201+
indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
225202
keep_alive: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
226203
keep_on_completion: t.Optional[bool] = None,
227204
knn: t.Optional[
228-
t.Union[
229-
t.Mapping[str, t.Any],
230-
t.Union[
231-
t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]
232-
],
233-
]
205+
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
234206
] = None,
235207
lenient: t.Optional[bool] = None,
236208
max_concurrent_shard_requests: t.Optional[int] = None,
@@ -246,23 +218,15 @@ async def submit(
246218
query: t.Optional[t.Mapping[str, t.Any]] = None,
247219
request_cache: t.Optional[bool] = None,
248220
rescore: t.Optional[
249-
t.Union[
250-
t.Mapping[str, t.Any],
251-
t.Union[
252-
t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]
253-
],
254-
]
221+
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
255222
] = None,
256223
rest_total_hits_as_int: t.Optional[bool] = None,
257224
routing: t.Optional[str] = None,
258225
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
259226
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
260227
scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
261228
search_after: t.Optional[
262-
t.Union[
263-
t.List[t.Union[None, bool, float, int, str, t.Any]],
264-
t.Tuple[t.Union[None, bool, float, int, str, t.Any], ...],
265-
]
229+
t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
266230
] = None,
267231
search_type: t.Optional[
268232
t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str]
@@ -272,24 +236,15 @@ async def submit(
272236
slice: t.Optional[t.Mapping[str, t.Any]] = None,
273237
sort: t.Optional[
274238
t.Union[
239+
t.Sequence[t.Union[str, t.Mapping[str, t.Any]]],
275240
t.Union[str, t.Mapping[str, t.Any]],
276-
t.Union[
277-
t.List[t.Union[str, t.Mapping[str, t.Any]]],
278-
t.Tuple[t.Union[str, t.Mapping[str, t.Any]], ...],
279-
],
280241
]
281242
] = None,
282243
source: t.Optional[t.Union[bool, t.Mapping[str, t.Any]]] = None,
283-
source_excludes: t.Optional[
284-
t.Union[str, t.Union[t.List[str], t.Tuple[str, ...]]]
285-
] = None,
286-
source_includes: t.Optional[
287-
t.Union[str, t.Union[t.List[str], t.Tuple[str, ...]]]
288-
] = None,
289-
stats: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None,
290-
stored_fields: t.Optional[
291-
t.Union[str, t.Union[t.List[str], t.Tuple[str, ...]]]
292-
] = None,
244+
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
245+
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
246+
stats: t.Optional[t.Sequence[str]] = None,
247+
stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
293248
suggest: t.Optional[t.Mapping[str, t.Any]] = None,
294249
suggest_field: t.Optional[str] = None,
295250
suggest_mode: t.Optional[

0 commit comments

Comments
 (0)