# 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 .....service_lines.resources.v_2.types.denial_reason_content import DenialReasonContent
from .....x_12.resources.v_1.types.claim_adjustment_reason_code import ClaimAdjustmentReasonCode
from .....x_12.resources.v_1.types.remittance_advice_remark_code import RemittanceAdviceRemarkCode


class ServiceLineAdjudicationCreate(UniversalBaseModel):
    denial_reason: typing.Optional[DenialReasonContent] = pydantic.Field(default=None)
    """
    Will be treated as a denial if present
    """

    insurance_allowed_amount_cents: typing.Optional[int] = None
    insurance_paid_amount_cents: typing.Optional[int] = None
    deductible_amount_cents: typing.Optional[int] = None
    coinsurance_amount_cents: typing.Optional[int] = None
    copay_amount_cents: typing.Optional[int] = None
    carcs: typing.List[ClaimAdjustmentReasonCode]
    rarcs: typing.List[RemittanceAdviceRemarkCode]

    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
