@@ -622,7 +622,7 @@ async def bulk(
622
622
source_includes : t .Optional [
623
623
t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]
624
624
] = None ,
625
- timeout : t .Optional [t .Union [int , str ]] = None ,
625
+ timeout : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
626
626
wait_for_active_shards : t .Optional [
627
627
t .Union [int , t .Union ["t.Literal['all', 'index-setting']" , str ]]
628
628
] = None ,
@@ -939,7 +939,7 @@ async def create(
939
939
t .Union ["t.Literal['false', 'true', 'wait_for']" , bool , str ]
940
940
] = None ,
941
941
routing : t .Optional [str ] = None ,
942
- timeout : t .Optional [t .Union [int , str ]] = None ,
942
+ timeout : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
943
943
version : t .Optional [int ] = None ,
944
944
version_type : t .Optional [
945
945
t .Union ["t.Literal['external', 'external_gte', 'force', 'internal']" , str ]
@@ -1025,7 +1025,7 @@ async def delete(
1025
1025
t .Union ["t.Literal['false', 'true', 'wait_for']" , bool , str ]
1026
1026
] = None ,
1027
1027
routing : t .Optional [str ] = None ,
1028
- timeout : t .Optional [t .Union [int , str ]] = None ,
1028
+ timeout : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
1029
1029
version : t .Optional [int ] = None ,
1030
1030
version_type : t .Optional [
1031
1031
t .Union ["t.Literal['external', 'external_gte', 'force', 'internal']" , str ]
@@ -1140,11 +1140,13 @@ async def delete_by_query(
1140
1140
query : t .Optional [t .Mapping [str , t .Any ]] = None ,
1141
1141
refresh : t .Optional [bool ] = None ,
1142
1142
request_cache : t .Optional [bool ] = None ,
1143
- requests_per_second : t .Optional [int ] = None ,
1143
+ requests_per_second : t .Optional [float ] = None ,
1144
1144
routing : t .Optional [str ] = None ,
1145
- scroll : t .Optional [t .Union [int , str ]] = None ,
1145
+ scroll : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
1146
1146
scroll_size : t .Optional [int ] = None ,
1147
- search_timeout : t .Optional [t .Union [int , str ]] = None ,
1147
+ search_timeout : t .Optional [
1148
+ t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]
1149
+ ] = None ,
1148
1150
search_type : t .Optional [
1149
1151
t .Union ["t.Literal['dfs_query_then_fetch', 'query_then_fetch']" , str ]
1150
1152
] = None ,
@@ -1153,7 +1155,7 @@ async def delete_by_query(
1153
1155
sort : t .Optional [t .Union [t .List [str ], t .Tuple [str , ...]]] = None ,
1154
1156
stats : t .Optional [t .Union [t .List [str ], t .Tuple [str , ...]]] = None ,
1155
1157
terminate_after : t .Optional [int ] = None ,
1156
- timeout : t .Optional [t .Union [int , str ]] = None ,
1158
+ timeout : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
1157
1159
version : t .Optional [bool ] = None ,
1158
1160
wait_for_active_shards : t .Optional [
1159
1161
t .Union [int , t .Union ["t.Literal['all', 'index-setting']" , str ]]
@@ -1322,7 +1324,7 @@ async def delete_by_query_rethrottle(
1322
1324
] = None ,
1323
1325
human : t .Optional [bool ] = None ,
1324
1326
pretty : t .Optional [bool ] = None ,
1325
- requests_per_second : t .Optional [int ] = None ,
1327
+ requests_per_second : t .Optional [float ] = None ,
1326
1328
) -> ObjectApiResponse [t .Any ]:
1327
1329
"""
1328
1330
Changes the number of requests per second for a particular Delete By Query operation.
@@ -1362,9 +1364,11 @@ async def delete_script(
1362
1364
t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]
1363
1365
] = None ,
1364
1366
human : t .Optional [bool ] = None ,
1365
- master_timeout : t .Optional [t .Union [int , str ]] = None ,
1367
+ master_timeout : t .Optional [
1368
+ t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]
1369
+ ] = None ,
1366
1370
pretty : t .Optional [bool ] = None ,
1367
- timeout : t .Optional [t .Union [int , str ]] = None ,
1371
+ timeout : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
1368
1372
) -> ObjectApiResponse [t .Any ]:
1369
1373
"""
1370
1374
Deletes a script.
@@ -1955,7 +1959,9 @@ async def get_script(
1955
1959
t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]
1956
1960
] = None ,
1957
1961
human : t .Optional [bool ] = None ,
1958
- master_timeout : t .Optional [t .Union [int , str ]] = None ,
1962
+ master_timeout : t .Optional [
1963
+ t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]
1964
+ ] = None ,
1959
1965
pretty : t .Optional [bool ] = None ,
1960
1966
) -> ObjectApiResponse [t .Any ]:
1961
1967
"""
@@ -2160,7 +2166,7 @@ async def index(
2160
2166
] = None ,
2161
2167
require_alias : t .Optional [bool ] = None ,
2162
2168
routing : t .Optional [str ] = None ,
2163
- timeout : t .Optional [t .Union [int , str ]] = None ,
2169
+ timeout : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
2164
2170
version : t .Optional [int ] = None ,
2165
2171
version_type : t .Optional [
2166
2172
t .Union ["t.Literal['external', 'external_gte', 'force', 'internal']" , str ]
@@ -2818,7 +2824,7 @@ async def open_point_in_time(
2818
2824
self ,
2819
2825
* ,
2820
2826
index : t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]],
2821
- keep_alive : t .Union [int , str ],
2827
+ keep_alive : t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ],
2822
2828
error_trace : t .Optional [bool ] = None ,
2823
2829
filter_path : t .Optional [
2824
2830
t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]
@@ -2875,9 +2881,11 @@ async def put_script(
2875
2881
t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]
2876
2882
] = None ,
2877
2883
human : t .Optional [bool ] = None ,
2878
- master_timeout : t .Optional [t .Union [int , str ]] = None ,
2884
+ master_timeout : t .Optional [
2885
+ t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]
2886
+ ] = None ,
2879
2887
pretty : t .Optional [bool ] = None ,
2880
- timeout : t .Optional [t .Union [int , str ]] = None ,
2888
+ timeout : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
2881
2889
) -> ObjectApiResponse [t .Any ]:
2882
2890
"""
2883
2891
Creates or updates a script.
@@ -3036,13 +3044,13 @@ async def reindex(
3036
3044
max_docs : t .Optional [int ] = None ,
3037
3045
pretty : t .Optional [bool ] = None ,
3038
3046
refresh : t .Optional [bool ] = None ,
3039
- requests_per_second : t .Optional [int ] = None ,
3047
+ requests_per_second : t .Optional [float ] = None ,
3040
3048
require_alias : t .Optional [bool ] = None ,
3041
3049
script : t .Optional [t .Mapping [str , t .Any ]] = None ,
3042
- scroll : t .Optional [t .Union [int , str ]] = None ,
3050
+ scroll : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
3043
3051
size : t .Optional [int ] = None ,
3044
3052
slices : t .Optional [t .Union [int , t .Union ["t.Literal['auto']" , str ]]] = None ,
3045
- timeout : t .Optional [t .Union [int , str ]] = None ,
3053
+ timeout : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
3046
3054
wait_for_active_shards : t .Optional [
3047
3055
t .Union [int , t .Union ["t.Literal['all', 'index-setting']" , str ]]
3048
3056
] = None ,
@@ -3137,7 +3145,7 @@ async def reindex_rethrottle(
3137
3145
] = None ,
3138
3146
human : t .Optional [bool ] = None ,
3139
3147
pretty : t .Optional [bool ] = None ,
3140
- requests_per_second : t .Optional [int ] = None ,
3148
+ requests_per_second : t .Optional [float ] = None ,
3141
3149
) -> ObjectApiResponse [t .Any ]:
3142
3150
"""
3143
3151
Changes the number of requests per second for a particular Reindex operation.
@@ -3289,7 +3297,7 @@ async def scroll(
3289
3297
human : t .Optional [bool ] = None ,
3290
3298
pretty : t .Optional [bool ] = None ,
3291
3299
rest_total_hits_as_int : t .Optional [bool ] = None ,
3292
- scroll : t .Optional [t .Union [int , str ]] = None ,
3300
+ scroll : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
3293
3301
) -> ObjectApiResponse [t .Any ]:
3294
3302
"""
3295
3303
Allows to retrieve a large numbers of results from a single search request.
@@ -3427,7 +3435,7 @@ async def search(
3427
3435
]
3428
3436
] = None ,
3429
3437
script_fields : t .Optional [t .Mapping [str , t .Mapping [str , t .Any ]]] = None ,
3430
- scroll : t .Optional [t .Union [int , str ]] = None ,
3438
+ scroll : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
3431
3439
search_after : t .Optional [
3432
3440
t .Union [
3433
3441
t .List [t .Union [None , float , int , str ]],
@@ -4042,7 +4050,7 @@ async def search_template(
4042
4050
profile : t .Optional [bool ] = None ,
4043
4051
rest_total_hits_as_int : t .Optional [bool ] = None ,
4044
4052
routing : t .Optional [str ] = None ,
4045
- scroll : t .Optional [t .Union [int , str ]] = None ,
4053
+ scroll : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
4046
4054
search_type : t .Optional [
4047
4055
t .Union ["t.Literal['dfs_query_then_fetch', 'query_then_fetch']" , str ]
4048
4056
] = None ,
@@ -4156,7 +4164,7 @@ async def terms_enum(
4156
4164
search_after : t .Optional [str ] = None ,
4157
4165
size : t .Optional [int ] = None ,
4158
4166
string : t .Optional [str ] = None ,
4159
- timeout : t .Optional [t .Union [int , str ]] = None ,
4167
+ timeout : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
4160
4168
) -> ObjectApiResponse [t .Any ]:
4161
4169
"""
4162
4170
The terms enum API can be used to discover terms in the index that begin with
@@ -4375,7 +4383,7 @@ async def update(
4375
4383
source_includes : t .Optional [
4376
4384
t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]
4377
4385
] = None ,
4378
- timeout : t .Optional [t .Union [int , str ]] = None ,
4386
+ timeout : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
4379
4387
upsert : t .Optional [t .Mapping [str , t .Any ]] = None ,
4380
4388
wait_for_active_shards : t .Optional [
4381
4389
t .Union [int , t .Union ["t.Literal['all', 'index-setting']" , str ]]
@@ -4525,12 +4533,14 @@ async def update_by_query(
4525
4533
query : t .Optional [t .Mapping [str , t .Any ]] = None ,
4526
4534
refresh : t .Optional [bool ] = None ,
4527
4535
request_cache : t .Optional [bool ] = None ,
4528
- requests_per_second : t .Optional [int ] = None ,
4536
+ requests_per_second : t .Optional [float ] = None ,
4529
4537
routing : t .Optional [str ] = None ,
4530
4538
script : t .Optional [t .Mapping [str , t .Any ]] = None ,
4531
- scroll : t .Optional [t .Union [int , str ]] = None ,
4539
+ scroll : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
4532
4540
scroll_size : t .Optional [int ] = None ,
4533
- search_timeout : t .Optional [t .Union [int , str ]] = None ,
4541
+ search_timeout : t .Optional [
4542
+ t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]
4543
+ ] = None ,
4534
4544
search_type : t .Optional [
4535
4545
t .Union ["t.Literal['dfs_query_then_fetch', 'query_then_fetch']" , str ]
4536
4546
] = None ,
@@ -4539,7 +4549,7 @@ async def update_by_query(
4539
4549
sort : t .Optional [t .Union [t .List [str ], t .Tuple [str , ...]]] = None ,
4540
4550
stats : t .Optional [t .Union [t .List [str ], t .Tuple [str , ...]]] = None ,
4541
4551
terminate_after : t .Optional [int ] = None ,
4542
- timeout : t .Optional [t .Union [int , str ]] = None ,
4552
+ timeout : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
4543
4553
version : t .Optional [bool ] = None ,
4544
4554
version_type : t .Optional [bool ] = None ,
4545
4555
wait_for_active_shards : t .Optional [
@@ -4722,7 +4732,7 @@ async def update_by_query_rethrottle(
4722
4732
] = None ,
4723
4733
human : t .Optional [bool ] = None ,
4724
4734
pretty : t .Optional [bool ] = None ,
4725
- requests_per_second : t .Optional [int ] = None ,
4735
+ requests_per_second : t .Optional [float ] = None ,
4726
4736
) -> ObjectApiResponse [t .Any ]:
4727
4737
"""
4728
4738
Changes the number of requests per second for a particular Update By Query operation.
0 commit comments