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

from __future__ import annotations
from .benefitads import BenefitAds, BenefitAdsTypedDict
from .benefitadscreate import BenefitAdsCreate, BenefitAdsCreateTypedDict
from .benefitarticles import BenefitArticles, BenefitArticlesTypedDict
from .benefitcustom import BenefitCustom, BenefitCustomTypedDict
from .benefitcustomcreate import BenefitCustomCreate, BenefitCustomCreateTypedDict
from .benefitdiscord_output import BenefitDiscordOutput, BenefitDiscordOutputTypedDict
from .benefitdiscordcreate import BenefitDiscordCreate, BenefitDiscordCreateTypedDict
from .benefitdownloadables import BenefitDownloadables, BenefitDownloadablesTypedDict
from .benefitdownloadablescreate import (
    BenefitDownloadablesCreate,
    BenefitDownloadablesCreateTypedDict,
)
from .benefitgithubrepository import (
    BenefitGitHubRepository,
    BenefitGitHubRepositoryTypedDict,
)
from .benefitgithubrepositorycreate import (
    BenefitGitHubRepositoryCreate,
    BenefitGitHubRepositoryCreateTypedDict,
)
from .benefitlicensekeys_output import (
    BenefitLicenseKeysOutput,
    BenefitLicenseKeysOutputTypedDict,
)
from .benefitlicensekeyscreate import (
    BenefitLicenseKeysCreate,
    BenefitLicenseKeysCreateTypedDict,
)
from polar_sdk.utils import get_discriminator
from pydantic import Discriminator, Tag
from typing import Union
from typing_extensions import Annotated


BenefitsCreateBenefitCreateTypedDict = Union[
    BenefitAdsCreateTypedDict,
    BenefitDiscordCreateTypedDict,
    BenefitGitHubRepositoryCreateTypedDict,
    BenefitDownloadablesCreateTypedDict,
    BenefitLicenseKeysCreateTypedDict,
    BenefitCustomCreateTypedDict,
]


BenefitsCreateBenefitCreate = Annotated[
    Union[
        Annotated[BenefitCustomCreate, Tag("custom")],
        Annotated[BenefitAdsCreate, Tag("ads")],
        Annotated[BenefitDiscordCreate, Tag("discord")],
        Annotated[BenefitGitHubRepositoryCreate, Tag("github_repository")],
        Annotated[BenefitDownloadablesCreate, Tag("downloadables")],
        Annotated[BenefitLicenseKeysCreate, Tag("license_keys")],
    ],
    Discriminator(lambda m: get_discriminator(m, "type", "type")),
]


BenefitsCreateResponseBenefitsCreateTypedDict = Union[
    BenefitArticlesTypedDict,
    BenefitAdsTypedDict,
    BenefitDiscordOutputTypedDict,
    BenefitGitHubRepositoryTypedDict,
    BenefitDownloadablesTypedDict,
    BenefitLicenseKeysOutputTypedDict,
    BenefitCustomTypedDict,
]
r"""Benefit created."""


BenefitsCreateResponseBenefitsCreate = Union[
    BenefitArticles,
    BenefitAds,
    BenefitDiscordOutput,
    BenefitGitHubRepository,
    BenefitDownloadables,
    BenefitLicenseKeysOutput,
    BenefitCustom,
]
r"""Benefit created."""
