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

import typing

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


class UsageTrend(UniversalBaseModel):
    """
    Usage trend information.
    """

    metric: str = pydantic.Field()
    """
    Metric name (syncs, entities, etc)
    """

    direction: str = pydantic.Field()
    """
    Trend direction: up, down, or stable
    """

    percentage_change: float = pydantic.Field()
    """
    Percentage change from previous period
    """

    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
