# 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 .....commons.types.date import Date
from ...v_2.types.authorized_signatory_update import AuthorizedSignatoryUpdate
from ...v_2.types.contract_status import ContractStatus
from ...v_2.types.date_update import DateUpdate
from ...v_2.types.insurance_types import InsuranceTypes
from ...v_2.types.regions_update import RegionsUpdate


class ContractUpdate(UniversalBaseModel):
    effective_date: typing.Optional[Date] = pydantic.Field(default=None)
    """
    The starting day upon which the contract is effective
    """

    expiration_date: typing.Optional[DateUpdate] = pydantic.Field(default=None)
    """
    An optional end day upon which the contract expires
    """

    regions: typing.Optional[RegionsUpdate] = pydantic.Field(default=None)
    """
    If present, the contract's rendering providers will be patched to this exact
    value, overriding what was set before.
    """

    contract_status: typing.Optional[ContractStatus] = None
    authorized_signatory: typing.Optional[AuthorizedSignatoryUpdate] = None
    commercial_insurance_types: typing.Optional[InsuranceTypes] = None
    medicare_insurance_types: typing.Optional[InsuranceTypes] = None
    medicaid_insurance_types: typing.Optional[InsuranceTypes] = 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
