|
| 1 | +# This file was auto-generated by Fern from our API Definition. |
| 2 | + |
| 3 | +import datetime as dt |
| 4 | +import typing |
| 5 | + |
| 6 | +from ..core.datetime_utils import serialize_datetime |
| 7 | + |
| 8 | +try: |
| 9 | + import pydantic.v1 as pydantic # type: ignore |
| 10 | +except ImportError: |
| 11 | + import pydantic # type: ignore |
| 12 | + |
| 13 | + |
| 14 | +class AlertOpenedDetails(pydantic.BaseModel): |
| 15 | + alert_id: typing.Optional[str] = pydantic.Field(alias="alertId") |
| 16 | + status: typing.Optional[str] |
| 17 | + transaction_ids: typing.Optional[typing.List[str]] = pydantic.Field(alias="transactionIds") |
| 18 | + rule_name: typing.Optional[str] = pydantic.Field(alias="ruleName") |
| 19 | + rule_description: typing.Optional[str] = pydantic.Field(alias="ruleDescription") |
| 20 | + rule_id: typing.Optional[str] = pydantic.Field(alias="ruleId") |
| 21 | + rule_instance_id: typing.Optional[str] = pydantic.Field(alias="ruleInstanceId") |
| 22 | + case_id: typing.Optional[str] = pydantic.Field(alias="caseId") |
| 23 | + user_id: typing.Optional[str] = pydantic.Field(alias="userId") |
| 24 | + |
| 25 | + def json(self, **kwargs: typing.Any) -> str: |
| 26 | + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} |
| 27 | + return super().json(**kwargs_with_defaults) |
| 28 | + |
| 29 | + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: |
| 30 | + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} |
| 31 | + return super().dict(**kwargs_with_defaults) |
| 32 | + |
| 33 | + class Config: |
| 34 | + frozen = True |
| 35 | + smart_union = True |
| 36 | + allow_population_by_field_name = True |
| 37 | + json_encoders = {dt.datetime: serialize_datetime} |
0 commit comments