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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class WorkflowVersion(UncheckedBaseModel):
    object: typing.Literal["workflow_version"] = pydantic.Field(default="workflow_version")
    """
    The type of object. In this case, it will always be `"workflow_version"`.
    """

    id: str = pydantic.Field()
    """
    The ID of the workflow version.
    
    Example: `"workflow_version_Zk9mNP12Qw4-yTv8BdR3H"`
    """

    version: str = pydantic.Field()
    """
    The version of the workflow version.
    
    Example: `"3"`
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of the workflow version.
    
    Example: `"Invoice Processing"`
    """

    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
