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

from __future__ import annotations

import typing

from ...core.pydantic_utilities import pydantic_v1


class ExternalAccountingSystemProviderResponse_None(pydantic_v1.BaseModel):
    type: typing.Literal["none"] = "none"
    has_api_key: bool = pydantic_v1.Field(alias="hasApiKey")

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


class ExternalAccountingSystemProviderResponse_Codat(pydantic_v1.BaseModel):
    type: typing.Literal["codat"] = "codat"
    has_api_key: bool = pydantic_v1.Field(alias="hasApiKey")

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


class ExternalAccountingSystemProviderResponse_Rutter(pydantic_v1.BaseModel):
    type: typing.Literal["rutter"] = "rutter"
    has_client_id: bool = pydantic_v1.Field(alias="hasClientId")
    has_client_secret: bool = pydantic_v1.Field(alias="hasClientSecret")

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


ExternalAccountingSystemProviderResponse = typing.Union[
    ExternalAccountingSystemProviderResponse_None,
    ExternalAccountingSystemProviderResponse_Codat,
    ExternalAccountingSystemProviderResponse_Rutter,
]
