Skip to content

Commit

Permalink
feat(specs): add watch to pushTask ingestion (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4224

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Clément Vannicatte <[email protected]>
  • Loading branch information
algolia-bot and shortcuts committed Dec 10, 2024
1 parent 41b0ab9 commit fdbd9a2
Showing 1 changed file with 46 additions and 2 deletions.
48 changes: 46 additions & 2 deletions algoliasearch/ingestion/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3459,6 +3459,12 @@ async def push_task_with_http_info(
],
dict[str, Any],
],
watch: Annotated[
Optional[StrictBool],
Field(
description="When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding."
),
] = None,
request_options: Optional[Union[dict, RequestOptions]] = None,
) -> ApiResponse[str]:
"""
Expand All @@ -3473,6 +3479,8 @@ async def push_task_with_http_info(
:type task_id: str
:param push_task_payload: Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
:type push_task_payload: PushTaskPayload
:param watch: When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
:type watch: bool
: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)
:return: Returns the raw algoliasearch 'APIResponse' object.
"""
Expand All @@ -3487,6 +3495,11 @@ async def push_task_with_http_info(
"Parameter `push_task_payload` is required when calling `push_task`."
)

_query_parameters: Dict[str, Any] = {}

if watch is not None:
_query_parameters["watch"] = watch

_data = {}
if push_task_payload is not None:
_data = push_task_payload
Expand All @@ -3497,6 +3510,7 @@ async def push_task_with_http_info(
"{taskID}", quote(str(task_id), safe="")
),
request_options=self._request_options.merge(
query_parameters=_query_parameters,
data=dumps(body_serializer(_data)),
user_request_options=request_options,
),
Expand All @@ -3517,6 +3531,12 @@ async def push_task(
],
dict[str, Any],
],
watch: Annotated[
Optional[StrictBool],
Field(
description="When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding."
),
] = None,
request_options: Optional[Union[dict, RequestOptions]] = None,
) -> RunResponse:
"""
Expand All @@ -3531,11 +3551,13 @@ async def push_task(
:type task_id: str
:param push_task_payload: Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
:type push_task_payload: PushTaskPayload
:param watch: When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
:type watch: bool
: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)
:return: Returns the deserialized response in a 'RunResponse' result object.
"""
resp = await self.push_task_with_http_info(
task_id, push_task_payload, request_options
task_id, push_task_payload, watch, request_options
)
return resp.deserialize(RunResponse, resp.raw_data)

Expand Down Expand Up @@ -8192,6 +8214,12 @@ def push_task_with_http_info(
],
dict[str, Any],
],
watch: Annotated[
Optional[StrictBool],
Field(
description="When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding."
),
] = None,
request_options: Optional[Union[dict, RequestOptions]] = None,
) -> ApiResponse[str]:
"""
Expand All @@ -8206,6 +8234,8 @@ def push_task_with_http_info(
:type task_id: str
:param push_task_payload: Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
:type push_task_payload: PushTaskPayload
:param watch: When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
:type watch: bool
: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)
:return: Returns the raw algoliasearch 'APIResponse' object.
"""
Expand All @@ -8220,6 +8250,11 @@ def push_task_with_http_info(
"Parameter `push_task_payload` is required when calling `push_task`."
)

_query_parameters: Dict[str, Any] = {}

if watch is not None:
_query_parameters["watch"] = watch

_data = {}
if push_task_payload is not None:
_data = push_task_payload
Expand All @@ -8230,6 +8265,7 @@ def push_task_with_http_info(
"{taskID}", quote(str(task_id), safe="")
),
request_options=self._request_options.merge(
query_parameters=_query_parameters,
data=dumps(body_serializer(_data)),
user_request_options=request_options,
),
Expand All @@ -8250,6 +8286,12 @@ def push_task(
],
dict[str, Any],
],
watch: Annotated[
Optional[StrictBool],
Field(
description="When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding."
),
] = None,
request_options: Optional[Union[dict, RequestOptions]] = None,
) -> RunResponse:
"""
Expand All @@ -8264,11 +8306,13 @@ def push_task(
:type task_id: str
:param push_task_payload: Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
:type push_task_payload: PushTaskPayload
:param watch: When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
:type watch: bool
: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)
:return: Returns the deserialized response in a 'RunResponse' result object.
"""
resp = self.push_task_with_http_info(
task_id, push_task_payload, request_options
task_id, push_task_payload, watch, request_options
)
return resp.deserialize(RunResponse, resp.raw_data)

Expand Down

0 comments on commit fdbd9a2

Please sign in to comment.