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

import typing

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


class PromptVersionUpdate(UniversalBaseModel):
    """
    Update to apply to prompt versions.
    Note: Prompt versions are immutable by design.
    Only organizational properties (such as tags etc.) can be updated.
    Core properties like template, metadata etc. cannot be modified after creation.
    """

    tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Tags to set or merge with existing tags. Follows PATCH semantics:
    - If merge_tags is true, these tags will be added to existing tags.
    - If merge_tags is false, these tags will replace all existing tags.
    - null: preserve existing tags (no change).
    - empty set: clear all tags merge_tags is false.
    """

    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
