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

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...types.plan_type import PlanType


class ListPlansParams(UniversalBaseModel):
    """
    Input parameters
    """

    company_id: typing.Optional[str] = None
    for_fallback_plan: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Filter for plans valid as fallback plans (not linked to billing)
    """

    for_initial_plan: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial)
    """

    for_trial_expiry_plan: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Filter for plans valid as trial expiry plans (not linked to billing or free)
    """

    has_product_id: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Filter out plans that do not have a billing product ID
    """

    ids: typing.Optional[typing.List[str]] = None
    limit: typing.Optional[int] = pydantic.Field(default=None)
    """
    Page limit (default 100)
    """

    offset: typing.Optional[int] = pydantic.Field(default=None)
    """
    Page offset (default 0)
    """

    plan_type: typing.Optional[PlanType] = None
    q: typing.Optional[str] = None
    without_entitlement_for: typing.Optional[str] = pydantic.Field(default=None)
    """
    Filter out plans that already have a plan entitlement for the specified feature ID
    """

    without_paid_product_id: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Filter out plans that have a paid billing product ID
    """

    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
