| 1 |
|
| 2 |
|
| 3 |
import datetime as dt |
| 4 |
import typing |
| 5 |
|
| 6 |
import pydantic |
| 7 |
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel |
| 8 |
from .action_trigger import ActionTrigger |
| 9 |
|
| 10 |
|
| 11 |
class ActionBase(UniversalBaseModel): |
| 12 |
""" |
| 13 |
The action to which this version belongs. |
| 14 |
""" |
| 15 |
|
| 16 |
id: typing.Optional[str] = pydantic.Field(default=None) |
| 17 |
""" |
| 18 |
The unique ID of the action. |
| 19 |
""" |
| 20 |
|
| 21 |
name: typing.Optional[str] = pydantic.Field(default=None) |
| 22 |
""" |
| 23 |
The name of an action. |
| 24 |
""" |
| 25 |
|
| 26 |
supported_triggers: typing.Optional[typing.List[ActionTrigger]] = pydantic.Field(default=None) |
| 27 |
""" |
| 28 |
The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. |
| 29 |
""" |
| 30 |
|
| 31 |
all_changes_deployed: typing.Optional[bool] = pydantic.Field(default=None) |
| 32 |
""" |
| 33 |
True if all of an Action's contents have been deployed. |
| 34 |
""" |
| 35 |
|
| 36 |
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) |
| 37 |
""" |
| 38 |
The time when this action was created. |
| 39 |
""" |
| 40 |
|
| 41 |
updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) |
| 42 |
""" |
| 43 |
The time when this action was updated. |
| 44 |
""" |
| 45 |
|
| 46 |
if IS_PYDANTIC_V2: |
| 47 |
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) |
| 48 |
else: |
| 49 |
|
| 50 |
class Config: |
| 51 |
frozen = True |
| 52 |
smart_union = True |
| 53 |
extra = pydantic.Extra.allow |