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

from __future__ import annotations
from .customerstateindividual import (
    CustomerStateIndividual,
    CustomerStateIndividualTypedDict,
)
from .customerstateteam import CustomerStateTeam, CustomerStateTeamTypedDict
from polar_sdk.utils import get_discriminator
from pydantic import Discriminator, Tag
from typing import Union
from typing_extensions import Annotated, TypeAliasType


CustomerStateTypedDict = TypeAliasType(
    "CustomerStateTypedDict",
    Union[CustomerStateIndividualTypedDict, CustomerStateTeamTypedDict],
)


CustomerState = Annotated[
    Union[
        Annotated[CustomerStateIndividual, Tag("individual")],
        Annotated[CustomerStateTeam, Tag("team")],
    ],
    Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
