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

from ........core.pydantic_utilities import UniversalBaseModel
import typing
from .plan_coverage_details import PlanCoverageDetails
from .coverage_details import CoverageDetails
from ........core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class PlanCoverage(UniversalBaseModel):
    in_network: typing.Optional[PlanCoverageDetails] = None
    in_network_flat: typing.Optional[typing.List[CoverageDetails]] = None
    out_of_network: typing.Optional[PlanCoverageDetails] = None
    out_of_network_flat: typing.Optional[typing.List[CoverageDetails]] = 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
