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

import typing

import pydantic
from ...core.pydantic_utilities import UniversalBaseModel
from ...types.anchor import Anchor
from ...types.link_params import LinkParams
from ...types.text_review_annotation_update import TextReviewAnnotationUpdate
from ...types.time_stamp import TimeStamp


class UpdateCommentParamsData(UniversalBaseModel):
    anchor: typing.Optional[Anchor] = pydantic.Field(default=None)
    """
    Comment anchor location. {(x, y) | 0 <= x <= 1, 0 <= y <= 1}.
    """

    annotation: typing.Optional[str] = pydantic.Field(default=None)
    """
    JSON geometry for on-screen drawings. Allowed for document, image, video, or stream file types. JSON must be stringified.
    """

    completed: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Comment completion status
    """

    duration: typing.Optional[int] = pydantic.Field(default=None)
    """
    Duration of comment in frames. Requires presence of timestamp parameter
    """

    links: typing.Optional[typing.List[LinkParams]] = pydantic.Field(default=None)
    """
    Comment text links.
    """

    page: typing.Optional[int] = pydantic.Field(default=None)
    """
    Document page. Only allowed when file type is a pdf document
    """

    text: typing.Optional[str] = pydantic.Field(default=None)
    """
    Comment text
    """

    text_review_annotation: typing.Optional[TextReviewAnnotationUpdate] = None
    timestamp: typing.Optional[TimeStamp] = None

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)
