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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
from .update_entitlement_req_common_metric_period import (
    UpdateEntitlementReqCommonMetricPeriod,
)
from .update_entitlement_req_common_metric_period_month_reset import (
    UpdateEntitlementReqCommonMetricPeriodMonthReset,
)
from .update_entitlement_req_common_value_type import (
    UpdateEntitlementReqCommonValueType,
)
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class UpdateEntitlementReqCommon(UniversalBaseModel):
    metric_period: typing.Optional[UpdateEntitlementReqCommonMetricPeriod] = None
    metric_period_month_reset: typing.Optional[UpdateEntitlementReqCommonMetricPeriodMonthReset] = None
    value_bool: typing.Optional[bool] = None
    value_numeric: typing.Optional[int] = None
    value_trait_id: typing.Optional[str] = None
    value_type: UpdateEntitlementReqCommonValueType

    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
