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

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


class SubscriptionResponseDto(UniversalBaseModel):
    """
    Response model for a successful `Subscription` request retrieving plan information. Response field behavior:
    - Required fields are guaranteed to be present and non-null.
    - Optional fields may be `null`/`undefined` if the data couldn't
    be extracted during processing.
    """

    active: bool = pydantic.Field()
    """
    Indicates whether the subscription is currently active.
    """

    concurrent_calls: int = pydantic.Field()
    """
    The number of API calls allowed per second allowed in the current plan.
    """

    plan: str = pydantic.Field()
    """
    The name of the subscription plan.
    """

    plan_calls: int = pydantic.Field()
    """
    The total number of API calls assigned to the current subscription.
    """

    remaining_calls: int = pydantic.Field()
    """
    The number of API calls remaining for the current subscription period.
    """

    historical_days: int = pydantic.Field()
    """
    The number of historical days accessible under the current subscription plan.
    """

    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
