# 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.service_line_id import ServiceLineId
from .....era_commons.types.claim_status_code_create import ClaimStatusCodeCreate
from .....x_12.resources.v_1.types.claim_adjustment_reason_code import ClaimAdjustmentReasonCode
from .service_line_adjudication_create import ServiceLineAdjudicationCreate


class ClaimAdjudicationCreate(UniversalBaseModel):
    claim_status_code: ClaimStatusCodeCreate
    insurance_paid_amount_cents: typing.Optional[int] = None
    charge_amount_cents: typing.Optional[int] = None
    service_lines: typing.Dict[ServiceLineId, typing.List[ServiceLineAdjudicationCreate]]
    payer_claim_number: typing.Optional[str] = None
    carcs: typing.List[ClaimAdjustmentReasonCode]

    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
