# 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
from .billing_price_view import BillingPriceView
from .credit_usage_response_data import CreditUsageResponseData
from .feature_type import FeatureType


class FeatureUsageDataResponseData(UniversalBaseModel):
    credit_type_id: typing.Optional[str] = None
    credit_usage: typing.Optional[CreditUsageResponseData] = None
    entitlement_source: str
    entitlement_value_type: str
    feature_id: str
    feature_name: str
    feature_type: FeatureType
    hard_limit: str
    has_access: bool
    metric_reset_at: typing.Optional[dt.datetime] = None
    monthly_usage_based_price: typing.Optional[BillingPriceView] = None
    price_behavior: typing.Optional[str] = None
    soft_limit: str
    usage: str
    value_numeric: typing.Optional[int] = None
    yearly_usage_based_price: typing.Optional[BillingPriceView] = None

    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
