"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .customerindividual import CustomerIndividual, CustomerIndividualTypedDict
from .customerteam import CustomerTeam, CustomerTeamTypedDict
from polar_sdk.utils import get_discriminator
from pydantic import Discriminator, Tag
from typing import Union
from typing_extensions import Annotated, TypeAliasType


CustomerTypedDict = TypeAliasType(
    "CustomerTypedDict", Union[CustomerIndividualTypedDict, CustomerTeamTypedDict]
)


Customer = Annotated[
    Union[
        Annotated[CustomerIndividual, Tag("individual")],
        Annotated[CustomerTeam, Tag("team")],
    ],
    Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
