"""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 import BenefitDiscord, BenefitDiscordTypedDict
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 import BenefitLicenseKeys, BenefitLicenseKeysTypedDict
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,
    BenefitDiscordTypedDict,
    BenefitGitHubRepositoryTypedDict,
    BenefitDownloadablesTypedDict,
    BenefitLicenseKeysTypedDict,
    BenefitCustomTypedDict,
]
r"""Benefit created."""


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