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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from .api_role import ApiRole
from .api_policy import ApiPolicy
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class AppClient(UniversalBaseModel):
    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The Vectara App Client ID. This ID is not used during an OAuth
    flow. However, the ID used within the Vectara API.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The human-readable name of the App Client.
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Description of the App Client.
    """

    client_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The client ID used with the OAuth flow.
    """

    client_secret: typing.Optional[str] = pydantic.Field(default=None)
    """
    The client secret used in API requests. The secret should be kept secure.
    """

    api_roles: typing.Optional[typing.List[ApiRole]] = pydantic.Field(default=None)
    """
    The API roles attached to the App Client.
    """

    api_policy: typing.Optional[ApiPolicy] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
