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

import datetime as dt
import typing

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


class RuleConditionResponseData(UniversalBaseModel):
    comparison_trait_id: typing.Optional[str] = None
    condition_group_id: typing.Optional[str] = None
    condition_type: str
    created_at: dt.datetime
    environment_id: str
    event_subtype: typing.Optional[str] = None
    flag_id: typing.Optional[str] = None
    id: str
    metric_period: typing.Optional[str] = None
    metric_period_month_reset: typing.Optional[str] = None
    metric_value: typing.Optional[int] = None
    operator: str
    plan_id: typing.Optional[str] = None
    resource_ids: typing.List[str]
    rule_id: str
    trait_entity_type: typing.Optional[str] = None
    trait_id: typing.Optional[str] = None
    trait_value: str
    updated_at: dt.datetime

    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
