# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .behavior_count_details_response_body import BehaviorCountDetailsResponseBody
from .driver_or_tag_ids_details_response_body import DriverOrTagIdsDetailsResponseBody
from .safety_behavior_trigger_details_object_response_body_behaviors_item import (
    SafetyBehaviorTriggerDetailsObjectResponseBodyBehaviorsItem,
)
from .safety_behavior_trigger_details_object_response_body_severities_item import (
    SafetyBehaviorTriggerDetailsObjectResponseBodySeveritiesItem,
)
from .safety_behavior_trigger_details_object_response_body_statuses_item import (
    SafetyBehaviorTriggerDetailsObjectResponseBodyStatusesItem,
)
from .safety_score_details_response_body import SafetyScoreDetailsResponseBody


class SafetyBehaviorTriggerDetailsObjectResponseBody(UniversalBaseModel):
    """
    Details specific to Safety Behavior
    """

    behavior_count: typing_extensions.Annotated[
        typing.Optional[BehaviorCountDetailsResponseBody],
        FieldMetadata(alias="behaviorCount"),
        pydantic.Field(alias="behaviorCount"),
    ] = None
    behaviors: typing.List[SafetyBehaviorTriggerDetailsObjectResponseBodyBehaviorsItem] = pydantic.Field()
    """
    On which safety behaviors to trigger on.
    """

    drivers: typing.Optional[DriverOrTagIdsDetailsResponseBody] = None
    safety_score: typing_extensions.Annotated[
        typing.Optional[SafetyScoreDetailsResponseBody],
        FieldMetadata(alias="safetyScore"),
        pydantic.Field(alias="safetyScore"),
    ] = None
    severities: typing.Optional[typing.List[SafetyBehaviorTriggerDetailsObjectResponseBodySeveritiesItem]] = (
        pydantic.Field(default=None)
    )
    """
    On which event severity to trigger on.
    """

    statuses: typing.Optional[typing.List[SafetyBehaviorTriggerDetailsObjectResponseBodyStatusesItem]] = pydantic.Field(
        default=None
    )
    """
    On which event status to trigger on.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
