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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.serialization import FieldMetadata
from ..core.unchecked_base_model import UncheckedBaseModel
from .default_sharing_group_response_model import DefaultSharingGroupResponseModel
from .workspace_api_key_response_model import WorkspaceApiKeyResponseModel


class WorkspaceServiceAccountResponseModel(UncheckedBaseModel):
    service_account_user_id: str
    name: str
    created_at_unix: typing.Optional[int] = None
    api_keys: typing_extensions.Annotated[
        typing.List[WorkspaceApiKeyResponseModel], FieldMetadata(alias="api-keys"), pydantic.Field(alias="api-keys")
    ]
    default_sharing_groups: typing.Optional[typing.List[DefaultSharingGroupResponseModel]] = 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
