# 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 .deployment_release_tag_deployment_history_item import DeploymentReleaseTagDeploymentHistoryItem
from .release_tag_release import ReleaseTagRelease
from .release_tag_source import ReleaseTagSource


class DeploymentReleaseTagRead(UniversalBaseModel):
    name: str = pydantic.Field()
    """
    The name of the Release Tag
    """

    source: ReleaseTagSource = pydantic.Field()
    """
    The source of how the Release Tag was originally created
    
    * `SYSTEM` - System
    * `USER` - User
    """

    history_item: DeploymentReleaseTagDeploymentHistoryItem = pydantic.Field()
    """
    Deprecated. Reference the `release` field instead.
    """

    release: ReleaseTagRelease = pydantic.Field()
    """
    The Release that this Release Tag points to.
    """

    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
