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

from ..core.pydantic_utilities import UniversalBaseModel
import pydantic
import typing
from .key_indicators_item_additional_kpis_item import KeyIndicatorsItemAdditionalKpisItem
from .key_indicators_item_extra_kpis_item import KeyIndicatorsItemExtraKpisItem
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class KeyIndicatorsItem(UniversalBaseModel):
    key: str = pydantic.Field()
    """
    The key for this KPI, where you can find the value from inside main_kpi
    """

    title: str = pydantic.Field()
    """
    The title for this metric, to be displayed to the user
    """

    main_kpi: str
    secondary_kpi: typing.Optional[str] = None
    additional_kpis: typing.Optional[typing.List[KeyIndicatorsItemAdditionalKpisItem]] = pydantic.Field(default=None)
    """
    Additional KPIs to be displayed at the bottom of the box
    """

    extra_kpis: typing.Optional[typing.List[KeyIndicatorsItemExtraKpisItem]] = pydantic.Field(default=None)
    """
    Extra KPIs to be displayed in the hover-tootip for that indicator
    """

    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
