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

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class ServiceAccountMetadata(UniversalBaseModel):
    """
    Non-sensitive metadata from a Google Cloud Service Account, exposed in API responses to help identify auth configurations without revealing sensitive credentials.
    """

    type: typing.Optional[str] = pydantic.Field(default=None)
    """
    Account type (always "service_account")
    """

    project_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Google Cloud project ID
    """

    client_email: typing.Optional[str] = pydantic.Field(default=None)
    """
    Service account email address
    """

    client_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Service account client ID
    """

    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
