@@ -876,11 +876,7 @@ async def clear_scroll(
876876        if  not  __body :
877877            if  scroll_id  is  not None :
878878                __body ["scroll_id" ] =  scroll_id 
879-         if  not  __body :
880-             __body  =  None   # type: ignore[assignment] 
881-         __headers  =  {"accept" : "application/json" }
882-         if  __body  is  not None :
883-             __headers ["content-type" ] =  "application/json" 
879+         __headers  =  {"accept" : "application/json" , "content-type" : "application/json" }
884880        return  await  self .perform_request (  # type: ignore[return-value] 
885881            "DELETE" ,
886882            __path ,
@@ -935,11 +931,7 @@ async def close_point_in_time(
935931        if  not  __body :
936932            if  id  is  not None :
937933                __body ["id" ] =  id 
938-         if  not  __body :
939-             __body  =  None   # type: ignore[assignment] 
940-         __headers  =  {"accept" : "application/json" }
941-         if  __body  is  not None :
942-             __headers ["content-type" ] =  "application/json" 
934+         __headers  =  {"accept" : "application/json" , "content-type" : "application/json" }
943935        return  await  self .perform_request (  # type: ignore[return-value] 
944936            "DELETE" ,
945937            __path ,
@@ -1094,11 +1086,7 @@ async def count(
10941086        if  not  __body :
10951087            if  query  is  not None :
10961088                __body ["query" ] =  query 
1097-         if  not  __body :
1098-             __body  =  None   # type: ignore[assignment] 
1099-         __headers  =  {"accept" : "application/json" }
1100-         if  __body  is  not None :
1101-             __headers ["content-type" ] =  "application/json" 
1089+         __headers  =  {"accept" : "application/json" , "content-type" : "application/json" }
11021090        return  await  self .perform_request (  # type: ignore[return-value] 
11031091            "POST" ,
11041092            __path ,
@@ -2182,11 +2170,7 @@ async def explain(
21822170        if  not  __body :
21832171            if  query  is  not None :
21842172                __body ["query" ] =  query 
2185-         if  not  __body :
2186-             __body  =  None   # type: ignore[assignment] 
2187-         __headers  =  {"accept" : "application/json" }
2188-         if  __body  is  not None :
2189-             __headers ["content-type" ] =  "application/json" 
2173+         __headers  =  {"accept" : "application/json" , "content-type" : "application/json" }
21902174        return  await  self .perform_request (  # type: ignore[return-value] 
21912175            "POST" ,
21922176            __path ,
@@ -2312,11 +2296,7 @@ async def field_caps(
23122296                __body ["index_filter" ] =  index_filter 
23132297            if  runtime_mappings  is  not None :
23142298                __body ["runtime_mappings" ] =  runtime_mappings 
2315-         if  not  __body :
2316-             __body  =  None   # type: ignore[assignment] 
2317-         __headers  =  {"accept" : "application/json" }
2318-         if  __body  is  not None :
2319-             __headers ["content-type" ] =  "application/json" 
2299+         __headers  =  {"accept" : "application/json" , "content-type" : "application/json" }
23202300        return  await  self .perform_request (  # type: ignore[return-value] 
23212301            "POST" ,
23222302            __path ,
@@ -3185,11 +3165,7 @@ async def knn_search(
31853165                __body ["_source" ] =  source 
31863166            if  stored_fields  is  not None :
31873167                __body ["stored_fields" ] =  stored_fields 
3188-         if  not  __body :
3189-             __body  =  None   # type: ignore[assignment] 
3190-         __headers  =  {"accept" : "application/json" }
3191-         if  __body  is  not None :
3192-             __headers ["content-type" ] =  "application/json" 
3168+         __headers  =  {"accept" : "application/json" , "content-type" : "application/json" }
31933169        return  await  self .perform_request (  # type: ignore[return-value] 
31943170            "POST" ,
31953171            __path ,
@@ -3831,11 +3807,7 @@ async def open_point_in_time(
38313807        if  not  __body :
38323808            if  index_filter  is  not None :
38333809                __body ["index_filter" ] =  index_filter 
3834-         if  not  __body :
3835-             __body  =  None   # type: ignore[assignment] 
3836-         __headers  =  {"accept" : "application/json" }
3837-         if  __body  is  not None :
3838-             __headers ["content-type" ] =  "application/json" 
3810+         __headers  =  {"accept" : "application/json" , "content-type" : "application/json" }
38393811        return  await  self .perform_request (  # type: ignore[return-value] 
38403812            "POST" ,
38413813            __path ,
@@ -4407,11 +4379,7 @@ async def render_search_template(
44074379                __body ["params" ] =  params 
44084380            if  source  is  not None :
44094381                __body ["source" ] =  source 
4410-         if  not  __body :
4411-             __body  =  None   # type: ignore[assignment] 
4412-         __headers  =  {"accept" : "application/json" }
4413-         if  __body  is  not None :
4414-             __headers ["content-type" ] =  "application/json" 
4382+         __headers  =  {"accept" : "application/json" , "content-type" : "application/json" }
44154383        return  await  self .perform_request (  # type: ignore[return-value] 
44164384            "POST" ,
44174385            __path ,
@@ -4494,11 +4462,7 @@ async def scripts_painless_execute(
44944462                __body ["context_setup" ] =  context_setup 
44954463            if  script  is  not None :
44964464                __body ["script" ] =  script 
4497-         if  not  __body :
4498-             __body  =  None   # type: ignore[assignment] 
4499-         __headers  =  {"accept" : "application/json" }
4500-         if  __body  is  not None :
4501-             __headers ["content-type" ] =  "application/json" 
4465+         __headers  =  {"accept" : "application/json" , "content-type" : "application/json" }
45024466        return  await  self .perform_request (  # type: ignore[return-value] 
45034467            "POST" ,
45044468            __path ,
@@ -4568,11 +4532,7 @@ async def scroll(
45684532                __body ["scroll_id" ] =  scroll_id 
45694533            if  scroll  is  not None :
45704534                __body ["scroll" ] =  scroll 
4571-         if  not  __body :
4572-             __body  =  None   # type: ignore[assignment] 
4573-         __headers  =  {"accept" : "application/json" }
4574-         if  __body  is  not None :
4575-             __headers ["content-type" ] =  "application/json" 
4535+         __headers  =  {"accept" : "application/json" , "content-type" : "application/json" }
45764536        return  await  self .perform_request (  # type: ignore[return-value] 
45774537            "POST" ,
45784538            __path ,
@@ -5113,11 +5073,7 @@ async def search(
51135073                __body ["track_total_hits" ] =  track_total_hits 
51145074            if  version  is  not None :
51155075                __body ["version" ] =  version 
5116-         if  not  __body :
5117-             __body  =  None   # type: ignore[assignment] 
5118-         __headers  =  {"accept" : "application/json" }
5119-         if  __body  is  not None :
5120-             __headers ["content-type" ] =  "application/json" 
5076+         __headers  =  {"accept" : "application/json" , "content-type" : "application/json" }
51215077        return  await  self .perform_request (  # type: ignore[return-value] 
51225078            "POST" ,
51235079            __path ,
@@ -5977,11 +5933,7 @@ async def terms_enum(
59775933                __body ["string" ] =  string 
59785934            if  timeout  is  not None :
59795935                __body ["timeout" ] =  timeout 
5980-         if  not  __body :
5981-             __body  =  None   # type: ignore[assignment] 
5982-         __headers  =  {"accept" : "application/json" }
5983-         if  __body  is  not None :
5984-             __headers ["content-type" ] =  "application/json" 
5936+         __headers  =  {"accept" : "application/json" , "content-type" : "application/json" }
59855937        return  await  self .perform_request (  # type: ignore[return-value] 
59865938            "POST" ,
59875939            __path ,
@@ -6666,11 +6618,7 @@ async def update_by_query(
66666618                __body ["script" ] =  script 
66676619            if  slice  is  not None :
66686620                __body ["slice" ] =  slice 
6669-         if  not  __body :
6670-             __body  =  None   # type: ignore[assignment] 
6671-         __headers  =  {"accept" : "application/json" }
6672-         if  __body  is  not None :
6673-             __headers ["content-type" ] =  "application/json" 
6621+         __headers  =  {"accept" : "application/json" , "content-type" : "application/json" }
66746622        return  await  self .perform_request (  # type: ignore[return-value] 
66756623            "POST" ,
66766624            __path ,
0 commit comments