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

import datetime as dt
import typing

import pydantic
import typing_extensions
from ..core.serialization import FieldMetadata
from ..core.unchecked_base_model import UncheckedBaseModel
from .account_roles_item import AccountRolesItem


class Account(UncheckedBaseModel):
    """
    Account details
    """

    created_at: dt.datetime = pydantic.Field()
    """
    Created Timestamp
    """

    display_name: str = pydantic.Field()
    """
    Account Name
    """

    id: str = pydantic.Field()
    """
    Account ID
    """

    image: typing.Optional[str] = pydantic.Field(default=None)
    """
    The account image url
    """

    mounted_storage_enabled: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether mounted storage is enabled for this account
    """

    roles: typing.List[AccountRolesItem] = pydantic.Field()
    """
    Account User Roles
    """

    storage_limit: typing.Optional[int] = pydantic.Field(default=None)
    """
    The number of bytes of non-archived storage in the account. Value is nil when there is no limit
    """

    storage_usage: int = pydantic.Field()
    """
    The number of bytes of non-archived storage the account is using
    """

    updated_at: dt.datetime = pydantic.Field()
    """
    Update timestamp
    """

    v_4_migrated_at: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="v4_migrated_at"),
        pydantic.Field(alias="v4_migrated_at", default=None, description="Migration timestamp"),
    ]

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)
