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

from ....core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from .marking_definition import MarkingDefinition
from ....core.pydantic_utilities import IS_PYDANTIC_V2


class GranularMarking(UncheckedBaseModel):
    lang: typing.Optional[str] = pydantic.Field(default=None)
    """
    The lang property specifies the language used in the properties of the marking_definition object.
    """

    marking_ref: typing.Optional[MarkingDefinition] = pydantic.Field(default=None)
    """
    The marking_ref property specifies the id property of the marking_definition object that applies to this object.
    """

    selectors: typing.List[str] = pydantic.Field()
    """
    The selectors property is an array of strings that represent the selectors that are used to apply the marking_definition object to this object.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
            extra="allow"
        )  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow
