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

from ..core.unchecked_base_model import UncheckedBaseModel
from .environment_config import EnvironmentConfig
import datetime as dt
from .identity import Identity
import typing
from .environment_deployment_document import EnvironmentDeploymentDocument
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class Environment(UncheckedBaseModel):
    environment_id: str
    environment_config: EnvironmentConfig
    created_at: dt.datetime
    created_by: Identity
    last_updated_at: dt.datetime
    last_updated_by: Identity
    deployments: typing.List[EnvironmentDeploymentDocument]

    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
