# 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 .custom_plan_view_config_response_data import CustomPlanViewConfigResponseData
from .plan_group_plan_detail_response_data import PlanGroupPlanDetailResponseData
from .plan_group_plan_entitlements_order import PlanGroupPlanEntitlementsOrder


class PlanGroupDetailResponseData(UniversalBaseModel):
    """
    The returned resource
    """

    add_ons: typing.List[PlanGroupPlanDetailResponseData]
    custom_plan_config: typing.Optional[CustomPlanViewConfigResponseData] = None
    custom_plan_id: typing.Optional[str] = None
    default_plan: typing.Optional[PlanGroupPlanDetailResponseData] = None
    default_plan_id: typing.Optional[str] = None
    id: str
    ordered_plan_list: typing.List[PlanGroupPlanEntitlementsOrder]
    plans: typing.List[PlanGroupPlanDetailResponseData]
    trial_days: typing.Optional[int] = None
    trial_payment_method_required: typing.Optional[bool] = None

    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
