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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .safety_score_details_request_body_comparison import SafetyScoreDetailsRequestBodyComparison


class SafetyScoreDetailsRequestBody(UniversalBaseModel):
    """
    Trigger when safety score meets the specified condition.
    """

    comparison: SafetyScoreDetailsRequestBodyComparison = pydantic.Field()
    """
    The comparison to use when comparing the value to the threshold.  Valid values: `EQUAL_TO`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL_TO`, `LESS_THAN`, `LESS_THAN_OR_EQUAL_TO`
    """

    score: int = pydantic.Field()
    """
    The score to compare to.
    """

    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
