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

from __future__ import annotations

import typing

import pydantic
import typing_extensions

from ...commons.types.claim_id import ClaimId
from ...commons.types.provider_id import ProviderId
from ...commons.types.service_line_id import ServiceLineId


class AllocationTarget_ServiceLine(pydantic.BaseModel):
    type: typing_extensions.Literal["service_line"]
    value: ServiceLineId

    class Config:
        frozen = True
        smart_union = True


class AllocationTarget_Claim(pydantic.BaseModel):
    type: typing_extensions.Literal["claim"]
    value: ClaimId

    class Config:
        frozen = True
        smart_union = True


class AllocationTarget_BillingProviderId(pydantic.BaseModel):
    type: typing_extensions.Literal["billing_provider_id"]
    value: ProviderId

    class Config:
        frozen = True
        smart_union = True


class AllocationTarget_Unattributed(pydantic.BaseModel):
    type: typing_extensions.Literal["unattributed"]

    class Config:
        frozen = True
        smart_union = True


AllocationTarget = typing.Union[
    AllocationTarget_ServiceLine,
    AllocationTarget_Claim,
    AllocationTarget_BillingProviderId,
    AllocationTarget_Unattributed,
]
