# 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
from .action_module_dependency import ActionModuleDependency
from .action_module_secret import ActionModuleSecret


class CreateActionModuleVersionResponseContent(UniversalBaseModel):
    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The unique ID for this version.
    """

    module_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The ID of the parent module.
    """

    version_number: typing.Optional[int] = pydantic.Field(default=None)
    """
    The sequential version number.
    """

    code: typing.Optional[str] = pydantic.Field(default=None)
    """
    The exact source code that was published with this version.
    """

    secrets: typing.Optional[typing.List[ActionModuleSecret]] = pydantic.Field(default=None)
    """
    Secrets available to this version (name and updated_at only, values never returned).
    """

    dependencies: typing.Optional[typing.List[ActionModuleDependency]] = pydantic.Field(default=None)
    """
    Dependencies locked to this version.
    """

    created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    The timestamp when this version was created.
    """

    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
