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

from __future__ import annotations
from .creategoogleauthenticator import (
    CreateGoogleAuthenticator,
    CreateGoogleAuthenticatorTypedDict,
)
from .oauthcredentials import OAuthCredentials, OAuthCredentialsTypedDict
from pydantic import Discriminator, Tag
from ragie.utils import get_discriminator
from typing import Union
from typing_extensions import Annotated, TypeAliasType


CreateAuthenticatorPayloadTypedDict = TypeAliasType(
    "CreateAuthenticatorPayloadTypedDict",
    Union[OAuthCredentialsTypedDict, CreateGoogleAuthenticatorTypedDict],
)


CreateAuthenticatorPayload = Annotated[
    Union[
        Annotated[OAuthCredentials, Tag("atlassian")],
        Annotated[OAuthCredentials, Tag("dropbox")],
        Annotated[OAuthCredentials, Tag("microsoft")],
        Annotated[OAuthCredentials, Tag("salesforce")],
        Annotated[OAuthCredentials, Tag("slack")],
        Annotated[OAuthCredentials, Tag("hubspot")],
        Annotated[CreateGoogleAuthenticator, Tag("google")],
    ],
    Discriminator(lambda m: get_discriminator(m, "provider", "provider")),
]
