Skip to content

Commit f0652be

Browse files
feat(specs): add subscriptionAction to ingestion specs (generated)
algolia/api-clients-automation#4587 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 65baf21 commit f0652be

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

Diff for: algoliasearch/ingestion/models/task.py

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"enabled": "enabled",
3535
"failure_threshold": "failureThreshold",
3636
"action": "action",
37+
"subscription_action": "subscriptionAction",
3738
"cursor": "cursor",
3839
"notifications": "notifications",
3940
"policies": "policies",
@@ -69,6 +70,7 @@ class Task(BaseModel):
6970
failure_threshold: Optional[int] = None
7071
""" Maximum accepted percentage of failures for a task run to finish successfully. """
7172
action: Optional[ActionType] = None
73+
subscription_action: Optional[ActionType] = None
7274
cursor: Optional[str] = None
7375
""" Date of the last cursor in RFC 3339 format. """
7476
notifications: Optional[Notifications] = None
@@ -117,6 +119,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
117119
TaskInput.from_dict(obj["input"]) if obj.get("input") is not None else None
118120
)
119121
obj["action"] = obj.get("action")
122+
obj["subscriptionAction"] = obj.get("subscriptionAction")
120123
obj["notifications"] = (
121124
Notifications.from_dict(obj["notifications"])
122125
if obj.get("notifications") is not None

Diff for: algoliasearch/ingestion/models/task_create.py

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"source_id": "sourceID",
2828
"destination_id": "destinationID",
2929
"action": "action",
30+
"subscription_action": "subscriptionAction",
3031
"cron": "cron",
3132
"enabled": "enabled",
3233
"failure_threshold": "failureThreshold",
@@ -51,6 +52,7 @@ class TaskCreate(BaseModel):
5152
destination_id: str
5253
""" Universally unique identifier (UUID) of a destination resource. """
5354
action: ActionType
55+
subscription_action: Optional[ActionType] = None
5456
cron: Optional[str] = None
5557
""" Cron expression for the task's schedule. """
5658
enabled: Optional[bool] = None
@@ -99,6 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
99101
return cls.model_validate(obj)
100102

101103
obj["action"] = obj.get("action")
104+
obj["subscriptionAction"] = obj.get("subscriptionAction")
102105
obj["input"] = (
103106
TaskInput.from_dict(obj["input"]) if obj.get("input") is not None else None
104107
)

Diff for: algoliasearch/ingestion/models/task_update.py

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from typing_extensions import Self
1919

2020

21+
from algoliasearch.ingestion.models.action_type import ActionType
2122
from algoliasearch.ingestion.models.notifications import Notifications
2223
from algoliasearch.ingestion.models.policies import Policies
2324
from algoliasearch.ingestion.models.task_input import TaskInput
@@ -27,6 +28,7 @@
2728
"cron": "cron",
2829
"input": "input",
2930
"enabled": "enabled",
31+
"subscription_action": "subscriptionAction",
3032
"failure_threshold": "failureThreshold",
3133
"notifications": "notifications",
3234
"policies": "policies",
@@ -49,6 +51,7 @@ class TaskUpdate(BaseModel):
4951
input: Optional[TaskInput] = None
5052
enabled: Optional[bool] = None
5153
""" Whether the task is enabled. """
54+
subscription_action: Optional[ActionType] = None
5255
failure_threshold: Optional[int] = None
5356
""" Maximum accepted percentage of failures for a task run to finish successfully. """
5457
notifications: Optional[Notifications] = None
@@ -92,6 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
9295
obj["input"] = (
9396
TaskInput.from_dict(obj["input"]) if obj.get("input") is not None else None
9497
)
98+
obj["subscriptionAction"] = obj.get("subscriptionAction")
9599
obj["notifications"] = (
96100
Notifications.from_dict(obj["notifications"])
97101
if obj.get("notifications") is not None

0 commit comments

Comments
 (0)