# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import typing

from .bridge_aws_credential import BridgeAwsCredential
from .bridge_basic_credential import BridgeBasicCredential
from .bridge_o_auth_client_credential import BridgeOAuthClientCredential
from .bridge_secret_credential import BridgeSecretCredential
from .bridge_token_credential import BridgeTokenCredential


class BridgeCredential_BridgeAws(BridgeAwsCredential):
    type: typing.Literal["bridge_aws"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class BridgeCredential_BridgeToken(BridgeTokenCredential):
    type: typing.Literal["bridge_token"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class BridgeCredential_BridgeBasic(BridgeBasicCredential):
    type: typing.Literal["bridge_basic"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class BridgeCredential_BridgeSecret(BridgeSecretCredential):
    type: typing.Literal["bridge_secret"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class BridgeCredential_BridgeOAuthClient(BridgeOAuthClientCredential):
    type: typing.Literal["bridge_o_auth_client"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


BridgeCredential = typing.Union[
    BridgeCredential_BridgeAws,
    BridgeCredential_BridgeToken,
    BridgeCredential_BridgeBasic,
    BridgeCredential_BridgeSecret,
    BridgeCredential_BridgeOAuthClient,
]
