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