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

import typing

import pydantic
import typing_extensions
from ...common.types.resource_identifier import ResourceIdentifier
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...core.serialization import FieldMetadata


class DocumentMetadataPatch(UniversalBaseModel):
    resource_identifier: typing_extensions.Annotated[ResourceIdentifier, FieldMetadata(alias="resourceIdentifier")] = (
        pydantic.Field()
    )
    """
    The identifier for the resource you want to patch
    """

    metadata: typing.Dict[str, typing.Any] = pydantic.Field()
    """
    Key-value object of metadata for document. Keys will be merged with any existing values but can also be set to `null` to effectively remove
    """

    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
