Skip to content

Commit 2b18edb

Browse files
algolia-botmillotp
andcommitted
fix(specs): add getVersion parameter to getSettings (generated)
algolia/api-clients-automation#5254 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 44a73d1 commit 2b18edb

File tree

1 file changed

+50
-2
lines changed

1 file changed

+50
-2
lines changed

algoliasearch/search/client.py

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2990,6 +2990,12 @@ async def get_settings_with_http_info(
29902990
StrictStr,
29912991
Field(description="Name of the index on which to perform the operation."),
29922992
],
2993+
get_version: Annotated[
2994+
Optional[StrictInt],
2995+
Field(
2996+
description="When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility."
2997+
),
2998+
] = None,
29932999
request_options: Optional[Union[dict, RequestOptions]] = None,
29943000
) -> ApiResponse[str]:
29953001
"""
@@ -3000,6 +3006,8 @@ async def get_settings_with_http_info(
30003006
30013007
:param index_name: Name of the index on which to perform the operation. (required)
30023008
:type index_name: str
3009+
:param get_version: When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
3010+
:type get_version: int
30033011
:param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
30043012
:return: Returns the raw algoliasearch 'APIResponse' object.
30053013
"""
@@ -3009,12 +3017,18 @@ async def get_settings_with_http_info(
30093017
"Parameter `index_name` is required when calling `get_settings`."
30103018
)
30113019

3020+
_query_parameters: Dict[str, Any] = {}
3021+
3022+
if get_version is not None:
3023+
_query_parameters["getVersion"] = get_version
3024+
30123025
return await self._transporter.request(
30133026
verb=Verb.GET,
30143027
path="/1/indexes/{indexName}/settings".replace(
30153028
"{indexName}", quote(str(index_name), safe="")
30163029
),
30173030
request_options=self._request_options.merge(
3031+
query_parameters=_query_parameters,
30183032
user_request_options=request_options,
30193033
),
30203034
use_read_transporter=False,
@@ -3026,6 +3040,12 @@ async def get_settings(
30263040
StrictStr,
30273041
Field(description="Name of the index on which to perform the operation."),
30283042
],
3043+
get_version: Annotated[
3044+
Optional[StrictInt],
3045+
Field(
3046+
description="When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility."
3047+
),
3048+
] = None,
30293049
request_options: Optional[Union[dict, RequestOptions]] = None,
30303050
) -> SettingsResponse:
30313051
"""
@@ -3036,10 +3056,14 @@ async def get_settings(
30363056
30373057
:param index_name: Name of the index on which to perform the operation. (required)
30383058
:type index_name: str
3059+
:param get_version: When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
3060+
:type get_version: int
30393061
:param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
30403062
:return: Returns the deserialized response in a 'SettingsResponse' result object.
30413063
"""
3042-
resp = await self.get_settings_with_http_info(index_name, request_options)
3064+
resp = await self.get_settings_with_http_info(
3065+
index_name, get_version, request_options
3066+
)
30433067
return resp.deserialize(SettingsResponse, resp.raw_data)
30443068

30453069
async def get_sources_with_http_info(
@@ -8188,6 +8212,12 @@ def get_settings_with_http_info(
81888212
StrictStr,
81898213
Field(description="Name of the index on which to perform the operation."),
81908214
],
8215+
get_version: Annotated[
8216+
Optional[StrictInt],
8217+
Field(
8218+
description="When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility."
8219+
),
8220+
] = None,
81918221
request_options: Optional[Union[dict, RequestOptions]] = None,
81928222
) -> ApiResponse[str]:
81938223
"""
@@ -8198,6 +8228,8 @@ def get_settings_with_http_info(
81988228
81998229
:param index_name: Name of the index on which to perform the operation. (required)
82008230
:type index_name: str
8231+
:param get_version: When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
8232+
:type get_version: int
82018233
:param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
82028234
:return: Returns the raw algoliasearch 'APIResponse' object.
82038235
"""
@@ -8207,12 +8239,18 @@ def get_settings_with_http_info(
82078239
"Parameter `index_name` is required when calling `get_settings`."
82088240
)
82098241

8242+
_query_parameters: Dict[str, Any] = {}
8243+
8244+
if get_version is not None:
8245+
_query_parameters["getVersion"] = get_version
8246+
82108247
return self._transporter.request(
82118248
verb=Verb.GET,
82128249
path="/1/indexes/{indexName}/settings".replace(
82138250
"{indexName}", quote(str(index_name), safe="")
82148251
),
82158252
request_options=self._request_options.merge(
8253+
query_parameters=_query_parameters,
82168254
user_request_options=request_options,
82178255
),
82188256
use_read_transporter=False,
@@ -8224,6 +8262,12 @@ def get_settings(
82248262
StrictStr,
82258263
Field(description="Name of the index on which to perform the operation."),
82268264
],
8265+
get_version: Annotated[
8266+
Optional[StrictInt],
8267+
Field(
8268+
description="When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility."
8269+
),
8270+
] = None,
82278271
request_options: Optional[Union[dict, RequestOptions]] = None,
82288272
) -> SettingsResponse:
82298273
"""
@@ -8234,10 +8278,14 @@ def get_settings(
82348278
82358279
:param index_name: Name of the index on which to perform the operation. (required)
82368280
:type index_name: str
8281+
:param get_version: When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
8282+
:type get_version: int
82378283
:param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
82388284
:return: Returns the deserialized response in a 'SettingsResponse' result object.
82398285
"""
8240-
resp = self.get_settings_with_http_info(index_name, request_options)
8286+
resp = self.get_settings_with_http_info(
8287+
index_name, get_version, request_options
8288+
)
82418289
return resp.deserialize(SettingsResponse, resp.raw_data)
82428290

82438291
def get_sources_with_http_info(

0 commit comments

Comments
 (0)