Skip to content

Commit b87cc6a

Browse files
fix(specs): enable watcher for push [skip-bc] (generated)
algolia/api-clients-automation#4229 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent eaf6650 commit b87cc6a

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

algoliasearch/ingestion/client.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292
from algoliasearch.ingestion.models.source_type import SourceType
9393
from algoliasearch.ingestion.models.source_update import SourceUpdate
9494
from algoliasearch.ingestion.models.source_update_response import SourceUpdateResponse
95-
from algoliasearch.ingestion.models.source_watch_response import SourceWatchResponse
9695
from algoliasearch.ingestion.models.task import Task
9796
from algoliasearch.ingestion.models.task_create import TaskCreate
9897
from algoliasearch.ingestion.models.task_create_response import TaskCreateResponse
@@ -120,6 +119,7 @@
120119
TransformationUpdateResponse,
121120
)
122121
from algoliasearch.ingestion.models.trigger_type import TriggerType
122+
from algoliasearch.ingestion.models.watch_response import WatchResponse
123123

124124

125125
class IngestionClient:
@@ -3538,7 +3538,7 @@ async def push_task(
35383538
),
35393539
] = None,
35403540
request_options: Optional[Union[dict, RequestOptions]] = None,
3541-
) -> RunResponse:
3541+
) -> WatchResponse:
35423542
"""
35433543
Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
35443544
@@ -3554,12 +3554,12 @@ async def push_task(
35543554
:param watch: When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
35553555
:type watch: bool
35563556
: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)
3557-
:return: Returns the deserialized response in a 'RunResponse' result object.
3557+
:return: Returns the deserialized response in a 'WatchResponse' result object.
35583558
"""
35593559
resp = await self.push_task_with_http_info(
35603560
task_id, push_task_payload, watch, request_options
35613561
)
3562-
return resp.deserialize(RunResponse, resp.raw_data)
3562+
return resp.deserialize(WatchResponse, resp.raw_data)
35633563

35643564
async def run_source_with_http_info(
35653565
self,
@@ -4155,7 +4155,7 @@ async def trigger_docker_source_discover(
41554155
StrictStr, Field(description="Unique identifier of a source.")
41564156
],
41574157
request_options: Optional[Union[dict, RequestOptions]] = None,
4158-
) -> SourceWatchResponse:
4158+
) -> WatchResponse:
41594159
"""
41604160
Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: singer`.
41614161
@@ -4167,12 +4167,12 @@ async def trigger_docker_source_discover(
41674167
:param source_id: Unique identifier of a source. (required)
41684168
:type source_id: str
41694169
: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)
4170-
:return: Returns the deserialized response in a 'SourceWatchResponse' result object.
4170+
:return: Returns the deserialized response in a 'WatchResponse' result object.
41714171
"""
41724172
resp = await self.trigger_docker_source_discover_with_http_info(
41734173
source_id, request_options
41744174
)
4175-
return resp.deserialize(SourceWatchResponse, resp.raw_data)
4175+
return resp.deserialize(WatchResponse, resp.raw_data)
41764176

41774177
async def try_transformation_with_http_info(
41784178
self,
@@ -4792,7 +4792,7 @@ async def validate_source(
47924792
self,
47934793
source_create: Union[Optional[SourceCreate], dict[str, Any]] = None,
47944794
request_options: Optional[Union[dict, RequestOptions]] = None,
4795-
) -> SourceWatchResponse:
4795+
) -> WatchResponse:
47964796
"""
47974797
Validates a source payload to ensure it can be created and that the data source can be reached by Algolia.
47984798
@@ -4804,10 +4804,10 @@ async def validate_source(
48044804
:param source_create:
48054805
:type source_create: SourceCreate
48064806
: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)
4807-
:return: Returns the deserialized response in a 'SourceWatchResponse' result object.
4807+
:return: Returns the deserialized response in a 'WatchResponse' result object.
48084808
"""
48094809
resp = await self.validate_source_with_http_info(source_create, request_options)
4810-
return resp.deserialize(SourceWatchResponse, resp.raw_data)
4810+
return resp.deserialize(WatchResponse, resp.raw_data)
48114811

48124812
async def validate_source_before_update_with_http_info(
48134813
self,
@@ -4866,7 +4866,7 @@ async def validate_source_before_update(
48664866
],
48674867
source_update: Union[SourceUpdate, dict[str, Any]],
48684868
request_options: Optional[Union[dict, RequestOptions]] = None,
4869-
) -> SourceWatchResponse:
4869+
) -> WatchResponse:
48704870
"""
48714871
Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.
48724872
@@ -4880,12 +4880,12 @@ async def validate_source_before_update(
48804880
:param source_update: (required)
48814881
:type source_update: SourceUpdate
48824882
: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)
4883-
:return: Returns the deserialized response in a 'SourceWatchResponse' result object.
4883+
:return: Returns the deserialized response in a 'WatchResponse' result object.
48844884
"""
48854885
resp = await self.validate_source_before_update_with_http_info(
48864886
source_id, source_update, request_options
48874887
)
4888-
return resp.deserialize(SourceWatchResponse, resp.raw_data)
4888+
return resp.deserialize(WatchResponse, resp.raw_data)
48894889

48904890

48914891
class IngestionClientSync:
@@ -8293,7 +8293,7 @@ def push_task(
82938293
),
82948294
] = None,
82958295
request_options: Optional[Union[dict, RequestOptions]] = None,
8296-
) -> RunResponse:
8296+
) -> WatchResponse:
82978297
"""
82988298
Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
82998299
@@ -8309,12 +8309,12 @@ def push_task(
83098309
:param watch: When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
83108310
:type watch: bool
83118311
: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)
8312-
:return: Returns the deserialized response in a 'RunResponse' result object.
8312+
:return: Returns the deserialized response in a 'WatchResponse' result object.
83138313
"""
83148314
resp = self.push_task_with_http_info(
83158315
task_id, push_task_payload, watch, request_options
83168316
)
8317-
return resp.deserialize(RunResponse, resp.raw_data)
8317+
return resp.deserialize(WatchResponse, resp.raw_data)
83188318

83198319
def run_source_with_http_info(
83208320
self,
@@ -8910,7 +8910,7 @@ def trigger_docker_source_discover(
89108910
StrictStr, Field(description="Unique identifier of a source.")
89118911
],
89128912
request_options: Optional[Union[dict, RequestOptions]] = None,
8913-
) -> SourceWatchResponse:
8913+
) -> WatchResponse:
89148914
"""
89158915
Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: singer`.
89168916
@@ -8922,12 +8922,12 @@ def trigger_docker_source_discover(
89228922
:param source_id: Unique identifier of a source. (required)
89238923
:type source_id: str
89248924
: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)
8925-
:return: Returns the deserialized response in a 'SourceWatchResponse' result object.
8925+
:return: Returns the deserialized response in a 'WatchResponse' result object.
89268926
"""
89278927
resp = self.trigger_docker_source_discover_with_http_info(
89288928
source_id, request_options
89298929
)
8930-
return resp.deserialize(SourceWatchResponse, resp.raw_data)
8930+
return resp.deserialize(WatchResponse, resp.raw_data)
89318931

89328932
def try_transformation_with_http_info(
89338933
self,
@@ -9543,7 +9543,7 @@ def validate_source(
95439543
self,
95449544
source_create: Union[Optional[SourceCreate], dict[str, Any]] = None,
95459545
request_options: Optional[Union[dict, RequestOptions]] = None,
9546-
) -> SourceWatchResponse:
9546+
) -> WatchResponse:
95479547
"""
95489548
Validates a source payload to ensure it can be created and that the data source can be reached by Algolia.
95499549
@@ -9555,10 +9555,10 @@ def validate_source(
95559555
:param source_create:
95569556
:type source_create: SourceCreate
95579557
: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)
9558-
:return: Returns the deserialized response in a 'SourceWatchResponse' result object.
9558+
:return: Returns the deserialized response in a 'WatchResponse' result object.
95599559
"""
95609560
resp = self.validate_source_with_http_info(source_create, request_options)
9561-
return resp.deserialize(SourceWatchResponse, resp.raw_data)
9561+
return resp.deserialize(WatchResponse, resp.raw_data)
95629562

95639563
def validate_source_before_update_with_http_info(
95649564
self,
@@ -9617,7 +9617,7 @@ def validate_source_before_update(
96179617
],
96189618
source_update: Union[SourceUpdate, dict[str, Any]],
96199619
request_options: Optional[Union[dict, RequestOptions]] = None,
9620-
) -> SourceWatchResponse:
9620+
) -> WatchResponse:
96219621
"""
96229622
Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.
96239623
@@ -9631,9 +9631,9 @@ def validate_source_before_update(
96319631
:param source_update: (required)
96329632
:type source_update: SourceUpdate
96339633
: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)
9634-
:return: Returns the deserialized response in a 'SourceWatchResponse' result object.
9634+
:return: Returns the deserialized response in a 'WatchResponse' result object.
96359635
"""
96369636
resp = self.validate_source_before_update_with_http_info(
96379637
source_id, source_update, request_options
96389638
)
9639-
return resp.deserialize(SourceWatchResponse, resp.raw_data)
9639+
return resp.deserialize(WatchResponse, resp.raw_data)

algoliasearch/ingestion/models/source_watch_response.py renamed to algoliasearch/ingestion/models/watch_response.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ def _alias_generator(name: str) -> str:
3232
return _ALIASES.get(name, name)
3333

3434

35-
class SourceWatchResponse(BaseModel):
35+
class WatchResponse(BaseModel):
3636
"""
37-
SourceWatchResponse
37+
WatchResponse
3838
"""
3939

4040
run_id: Optional[str] = None
4141
""" Universally unique identifier (UUID) of a task run. """
4242
data: Optional[List[object]] = None
43-
""" depending on the source type, the validation returns sampling data of your source (JSON, CSV, BigQuery). """
43+
""" when used with discovering or validating sources, the sampled data of your source is returned. """
4444
events: Optional[List[Event]] = None
4545
""" in case of error, observability events will be added to the response, if any. """
4646
message: str
@@ -59,7 +59,7 @@ def to_json(self) -> str:
5959

6060
@classmethod
6161
def from_json(cls, json_str: str) -> Optional[Self]:
62-
"""Create an instance of SourceWatchResponse from a JSON string"""
62+
"""Create an instance of WatchResponse from a JSON string"""
6363
return cls.from_dict(loads(json_str))
6464

6565
def to_dict(self) -> Dict[str, Any]:
@@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]:
7272

7373
@classmethod
7474
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75-
"""Create an instance of SourceWatchResponse from a dict"""
75+
"""Create an instance of WatchResponse from a dict"""
7676
if obj is None:
7777
return None
7878

0 commit comments

Comments
 (0)