# 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_request_body_comparison import BehaviorCountDetailsRequestBodyComparison


class BehaviorCountDetailsRequestBody(UniversalBaseModel):
    """
    Trigger when behavior count meets the specified condition.
    """

    comparison: BehaviorCountDetailsRequestBodyComparison = 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`
    """

    num_behaviors: typing_extensions.Annotated[
        int,
        FieldMetadata(alias="numBehaviors"),
        pydantic.Field(alias="numBehaviors", description="The number of behaviors to compare to."),
    ]
    num_days: typing_extensions.Annotated[
        int,
        FieldMetadata(alias="numDays"),
        pydantic.Field(alias="numDays", description="The number of days 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
