# 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.attachment_input import AttachmentInput
from ...types.link_params import LinkParams
from ...types.text_review_annotation import TextReviewAnnotation
from ...types.time_stamp import TimeStamp


class CreateCommentParamsData(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
    """

    attachments: typing.Optional[typing.List[AttachmentInput]] = pydantic.Field(default=None)
    """
    Optional attachments to create with the comment (max 6 attachments)
    """

    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: str = pydantic.Field()
    """
    Comment text (required)
    """

    text_review_annotation: typing.Optional[TextReviewAnnotation] = pydantic.Field(default=None)
    """
    Text review annotation details for comments left on text documents.
    """

    timestamp: typing.Optional[TimeStamp] = None

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