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

import typing

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


class DatabaseStatusResponse(UniversalBaseModel):
    """
    Response for database status check.

    Used to determine if a serverless database is running or suspended
    (scale-to-zero). Poll this endpoint to know when a database is ready.
    """

    asset_id: str = pydantic.Field()
    """
    The database asset ID
    """

    message: typing.Optional[str] = pydantic.Field(default=None)
    """
    Optional status message or error details
    """

    provider: str = pydantic.Field()
    """
    Database provider ('neon_cloud' or 'kronos')
    """

    status: Status = pydantic.Field()
    """
    Standardized database status
    """

    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
