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

import datetime as dt
import typing

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


class EnvSecretInfo(UniversalBaseModel):
    """
    Secret presence in one environment.
    """

    env_name: str = pydantic.Field()
    """
    Environment name
    """

    is_secret: bool = pydantic.Field()
    """
    Whether this is a secret in this environment
    """

    updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Last update timestamp
    """

    value: typing.Optional[str] = pydantic.Field(default=None)
    """
    Value for non-secrets (is_secret=False) only. Always None for secrets.
    """

    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
