@@ -45,9 +45,7 @@ async def delete(
45
45
"""
46
46
if id in SKIP_IN_PATH :
47
47
raise ValueError ("Empty value passed for parameter 'id'" )
48
- __path_parts : t .Dict [str , str ]
49
- __path_parts = {"id" : _quote (id )}
50
- __path = f'/_async_search/{ __path_parts ["id" ]} '
48
+ __path = f"/_async_search/{ _quote (id )} "
51
49
__query : t .Dict [str , t .Any ] = {}
52
50
if error_trace is not None :
53
51
__query ["error_trace" ] = error_trace
@@ -59,12 +57,7 @@ async def delete(
59
57
__query ["pretty" ] = pretty
60
58
__headers = {"accept" : "application/json" }
61
59
return await self .perform_request ( # type: ignore[return-value]
62
- "DELETE" ,
63
- __path ,
64
- params = __query ,
65
- headers = __headers ,
66
- endpoint_id = "async_search.delete" ,
67
- path_parts = __path_parts ,
60
+ "DELETE" , __path , params = __query , headers = __headers
68
61
)
69
62
70
63
@_rewrite_parameters ()
@@ -106,9 +99,7 @@ async def get(
106
99
"""
107
100
if id in SKIP_IN_PATH :
108
101
raise ValueError ("Empty value passed for parameter 'id'" )
109
- __path_parts : t .Dict [str , str ]
110
- __path_parts = {"id" : _quote (id )}
111
- __path = f'/_async_search/{ __path_parts ["id" ]} '
102
+ __path = f"/_async_search/{ _quote (id )} "
112
103
__query : t .Dict [str , t .Any ] = {}
113
104
if error_trace is not None :
114
105
__query ["error_trace" ] = error_trace
@@ -126,12 +117,7 @@ async def get(
126
117
__query ["wait_for_completion_timeout" ] = wait_for_completion_timeout
127
118
__headers = {"accept" : "application/json" }
128
119
return await self .perform_request ( # type: ignore[return-value]
129
- "GET" ,
130
- __path ,
131
- params = __query ,
132
- headers = __headers ,
133
- endpoint_id = "async_search.get" ,
134
- path_parts = __path_parts ,
120
+ "GET" , __path , params = __query , headers = __headers
135
121
)
136
122
137
123
@_rewrite_parameters ()
@@ -154,9 +140,7 @@ async def status(
154
140
"""
155
141
if id in SKIP_IN_PATH :
156
142
raise ValueError ("Empty value passed for parameter 'id'" )
157
- __path_parts : t .Dict [str , str ]
158
- __path_parts = {"id" : _quote (id )}
159
- __path = f'/_async_search/status/{ __path_parts ["id" ]} '
143
+ __path = f"/_async_search/status/{ _quote (id )} "
160
144
__query : t .Dict [str , t .Any ] = {}
161
145
if error_trace is not None :
162
146
__query ["error_trace" ] = error_trace
@@ -168,12 +152,7 @@ async def status(
168
152
__query ["pretty" ] = pretty
169
153
__headers = {"accept" : "application/json" }
170
154
return await self .perform_request ( # type: ignore[return-value]
171
- "GET" ,
172
- __path ,
173
- params = __query ,
174
- headers = __headers ,
175
- endpoint_id = "async_search.status" ,
176
- path_parts = __path_parts ,
155
+ "GET" , __path , params = __query , headers = __headers
177
156
)
178
157
179
158
@_rewrite_parameters (
@@ -449,12 +428,9 @@ async def submit(
449
428
up to a certain timeout. When the async search completes within the timeout,
450
429
the response won’t include the ID as the results are not stored in the cluster.
451
430
"""
452
- __path_parts : t .Dict [str , str ]
453
431
if index not in SKIP_IN_PATH :
454
- __path_parts = {"index" : _quote (index )}
455
- __path = f'/{ __path_parts ["index" ]} /_async_search'
432
+ __path = f"/{ _quote (index )} /_async_search"
456
433
else :
457
- __path_parts = {}
458
434
__path = "/_async_search"
459
435
__query : t .Dict [str , t .Any ] = {}
460
436
__body : t .Dict [str , t .Any ] = body if body is not None else {}
@@ -614,11 +590,5 @@ async def submit(
614
590
if __body is not None :
615
591
__headers ["content-type" ] = "application/json"
616
592
return await self .perform_request ( # type: ignore[return-value]
617
- "POST" ,
618
- __path ,
619
- params = __query ,
620
- headers = __headers ,
621
- body = __body ,
622
- endpoint_id = "async_search.submit" ,
623
- path_parts = __path_parts ,
593
+ "POST" , __path , params = __query , headers = __headers , body = __body
624
594
)
0 commit comments