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

from __future__ import annotations
from .productpriceonetime import ProductPriceOneTime, ProductPriceOneTimeTypedDict
from .productpricerecurring import ProductPriceRecurring, ProductPriceRecurringTypedDict
from polar_sdk.utils import get_discriminator
from pydantic import Discriminator, Tag
from typing import Union
from typing_extensions import Annotated


ProductPriceInputTypedDict = Union[
    ProductPriceOneTimeTypedDict, ProductPriceRecurringTypedDict
]


ProductPriceInput = Annotated[
    Union[
        Annotated[ProductPriceOneTime, Tag("one_time")],
        Annotated[ProductPriceRecurring, Tag("recurring")],
    ],
    Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
