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

from .basic_metric import BasicMetric
import typing
import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class Percentile(BasicMetric):
    """
    Calculates specified percentiles for a numeric field.
    """

    percentiles: typing.List[float] = pydantic.Field()
    """
    List of percentiles to calculate. Example: [25, 50, 75] computes the 25th, 50th, and 75th percentiles.
    """

    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
