# Generated by ariadne-codegen
# Source: ./documents

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import (
    CalendarAttendeeResponseStatus,
    CalendarEventStatus,
    CalendarEventVisibility,
    CalendarRecurrencePattern,
    CalendarReminderMethod,
    ContentTypes,
    EntityState,
    FileTypes,
    ImageProjectionTypes,
    MailImportance,
    MailPriority,
    MailSensitivity,
    ObservableTypes,
    OccurrenceTypes,
    OrientationTypes,
    TextRoles,
)


class QueryContentsObservations(BaseModel):
    contents: Optional["QueryContentsObservationsContents"]


class QueryContentsObservationsContents(BaseModel):
    results: Optional[List[Optional["QueryContentsObservationsContentsResults"]]]


class QueryContentsObservationsContentsResults(BaseModel):
    id: str
    name: str
    creation_date: Any = Field(alias="creationDate")
    modified_date: Optional[Any] = Field(alias="modifiedDate")
    relevance: Optional[float]
    owner: "QueryContentsObservationsContentsResultsOwner"
    state: EntityState
    original_date: Optional[Any] = Field(alias="originalDate")
    finished_date: Optional[Any] = Field(alias="finishedDate")
    workflow_duration: Optional[Any] = Field(alias="workflowDuration")
    uri: Optional[Any]
    description: Optional[str]
    identifier: Optional[str]
    address: Optional["QueryContentsObservationsContentsResultsAddress"]
    location: Optional["QueryContentsObservationsContentsResultsLocation"]
    features: Optional[str]
    type: Optional[ContentTypes]
    file_type: Optional[FileTypes] = Field(alias="fileType")
    mime_type: Optional[str] = Field(alias="mimeType")
    format: Optional[str]
    format_name: Optional[str] = Field(alias="formatName")
    file_extension: Optional[str] = Field(alias="fileExtension")
    file_name: Optional[str] = Field(alias="fileName")
    file_size: Optional[Any] = Field(alias="fileSize")
    relative_folder_path: Optional[str] = Field(alias="relativeFolderPath")
    master_uri: Optional[Any] = Field(alias="masterUri")
    image_uri: Optional[Any] = Field(alias="imageUri")
    text_uri: Optional[Any] = Field(alias="textUri")
    audio_uri: Optional[Any] = Field(alias="audioUri")
    transcript_uri: Optional[Any] = Field(alias="transcriptUri")
    snapshots_uri: Optional[Any] = Field(alias="snapshotsUri")
    snapshot_count: Optional[int] = Field(alias="snapshotCount")
    summary: Optional[str]
    custom_summary: Optional[str] = Field(alias="customSummary")
    quotes: Optional[List[str]]
    video: Optional["QueryContentsObservationsContentsResultsVideo"]
    audio: Optional["QueryContentsObservationsContentsResultsAudio"]
    image: Optional["QueryContentsObservationsContentsResultsImage"]
    document: Optional["QueryContentsObservationsContentsResultsDocument"]
    email: Optional["QueryContentsObservationsContentsResultsEmail"]
    event: Optional["QueryContentsObservationsContentsResultsEvent"]
    issue: Optional["QueryContentsObservationsContentsResultsIssue"]
    commit: Optional["QueryContentsObservationsContentsResultsCommit"]
    pull_request: Optional["QueryContentsObservationsContentsResultsPullRequest"] = (
        Field(alias="pullRequest")
    )
    message: Optional["QueryContentsObservationsContentsResultsMessage"]
    post: Optional["QueryContentsObservationsContentsResultsPost"]
    package: Optional["QueryContentsObservationsContentsResultsPackage"]
    language: Optional["QueryContentsObservationsContentsResultsLanguage"]
    feed: Optional["QueryContentsObservationsContentsResultsFeed"]
    workflow: Optional["QueryContentsObservationsContentsResultsWorkflow"]
    pages: Optional[List["QueryContentsObservationsContentsResultsPages"]]
    segments: Optional[List["QueryContentsObservationsContentsResultsSegments"]]
    frames: Optional[List["QueryContentsObservationsContentsResultsFrames"]]
    error: Optional[str]
    markdown: Optional[str]
    observations: Optional[
        List[Optional["QueryContentsObservationsContentsResultsObservations"]]
    ]


class QueryContentsObservationsContentsResultsOwner(BaseModel):
    id: str


class QueryContentsObservationsContentsResultsAddress(BaseModel):
    street_address: Optional[str] = Field(alias="streetAddress")
    city: Optional[str]
    region: Optional[str]
    country: Optional[str]
    postal_code: Optional[str] = Field(alias="postalCode")


class QueryContentsObservationsContentsResultsLocation(BaseModel):
    latitude: Optional[float]
    longitude: Optional[float]


class QueryContentsObservationsContentsResultsVideo(BaseModel):
    width: Optional[int]
    height: Optional[int]
    duration: Optional[Any]
    make: Optional[str]
    model: Optional[str]
    software: Optional[str]
    title: Optional[str]
    description: Optional[str]
    keywords: Optional[List[Optional[str]]]
    author: Optional[str]


class QueryContentsObservationsContentsResultsAudio(BaseModel):
    keywords: Optional[List[Optional[str]]]
    author: Optional[str]
    series: Optional[str]
    episode: Optional[str]
    episode_type: Optional[str] = Field(alias="episodeType")
    season: Optional[str]
    publisher: Optional[str]
    copyright: Optional[str]
    genre: Optional[str]
    title: Optional[str]
    description: Optional[str]
    bitrate: Optional[int]
    channels: Optional[int]
    sample_rate: Optional[int] = Field(alias="sampleRate")
    bits_per_sample: Optional[int] = Field(alias="bitsPerSample")
    duration: Optional[Any]


class QueryContentsObservationsContentsResultsImage(BaseModel):
    width: Optional[int]
    height: Optional[int]
    resolution_x: Optional[int] = Field(alias="resolutionX")
    resolution_y: Optional[int] = Field(alias="resolutionY")
    bits_per_component: Optional[int] = Field(alias="bitsPerComponent")
    components: Optional[int]
    projection_type: Optional[ImageProjectionTypes] = Field(alias="projectionType")
    orientation: Optional[OrientationTypes]
    description: Optional[str]
    make: Optional[str]
    model: Optional[str]
    software: Optional[str]
    lens: Optional[str]
    focal_length: Optional[float] = Field(alias="focalLength")
    exposure_time: Optional[str] = Field(alias="exposureTime")
    f_number: Optional[str] = Field(alias="fNumber")
    iso: Optional[str]
    heading: Optional[float]
    pitch: Optional[float]


class QueryContentsObservationsContentsResultsDocument(BaseModel):
    title: Optional[str]
    subject: Optional[str]
    summary: Optional[str]
    author: Optional[str]
    last_modified_by: Optional[str] = Field(alias="lastModifiedBy")
    publisher: Optional[str]
    description: Optional[str]
    keywords: Optional[List[Optional[str]]]
    page_count: Optional[int] = Field(alias="pageCount")
    worksheet_count: Optional[int] = Field(alias="worksheetCount")
    slide_count: Optional[int] = Field(alias="slideCount")
    word_count: Optional[int] = Field(alias="wordCount")
    line_count: Optional[int] = Field(alias="lineCount")
    paragraph_count: Optional[int] = Field(alias="paragraphCount")
    is_encrypted: Optional[bool] = Field(alias="isEncrypted")
    has_digital_signature: Optional[bool] = Field(alias="hasDigitalSignature")


class QueryContentsObservationsContentsResultsEmail(BaseModel):
    identifier: Optional[str]
    thread_identifier: Optional[str] = Field(alias="threadIdentifier")
    subject: Optional[str]
    labels: Optional[List[Optional[str]]]
    sensitivity: Optional[MailSensitivity]
    priority: Optional[MailPriority]
    importance: Optional[MailImportance]
    unsubscribe_url: Optional[str] = Field(alias="unsubscribeUrl")
    publication_name: Optional[str] = Field(alias="publicationName")
    publication_url: Optional[str] = Field(alias="publicationUrl")
    attachment_count: Optional[int] = Field(alias="attachmentCount")
    from_: Optional[
        List[Optional["QueryContentsObservationsContentsResultsEmailFrom"]]
    ] = Field(alias="from")
    to: Optional[List[Optional["QueryContentsObservationsContentsResultsEmailTo"]]]
    cc: Optional[List[Optional["QueryContentsObservationsContentsResultsEmailCc"]]]
    bcc: Optional[List[Optional["QueryContentsObservationsContentsResultsEmailBcc"]]]


class QueryContentsObservationsContentsResultsEmailFrom(BaseModel):
    name: Optional[str]
    email: Optional[str]
    given_name: Optional[str] = Field(alias="givenName")
    family_name: Optional[str] = Field(alias="familyName")


class QueryContentsObservationsContentsResultsEmailTo(BaseModel):
    name: Optional[str]
    email: Optional[str]
    given_name: Optional[str] = Field(alias="givenName")
    family_name: Optional[str] = Field(alias="familyName")


class QueryContentsObservationsContentsResultsEmailCc(BaseModel):
    name: Optional[str]
    email: Optional[str]
    given_name: Optional[str] = Field(alias="givenName")
    family_name: Optional[str] = Field(alias="familyName")


class QueryContentsObservationsContentsResultsEmailBcc(BaseModel):
    name: Optional[str]
    email: Optional[str]
    given_name: Optional[str] = Field(alias="givenName")
    family_name: Optional[str] = Field(alias="familyName")


class QueryContentsObservationsContentsResultsEvent(BaseModel):
    event_identifier: Optional[str] = Field(alias="eventIdentifier")
    calendar_identifier: Optional[str] = Field(alias="calendarIdentifier")
    subject: Optional[str]
    start_date_time: Optional[Any] = Field(alias="startDateTime")
    end_date_time: Optional[Any] = Field(alias="endDateTime")
    is_all_day: Optional[bool] = Field(alias="isAllDay")
    timezone: Optional[str]
    status: Optional[CalendarEventStatus]
    visibility: Optional[CalendarEventVisibility]
    meeting_link: Optional[str] = Field(alias="meetingLink")
    organizer: Optional["QueryContentsObservationsContentsResultsEventOrganizer"]
    attendees: Optional[
        List[Optional["QueryContentsObservationsContentsResultsEventAttendees"]]
    ]
    categories: Optional[List[Optional[str]]]
    reminders: Optional[
        List[Optional["QueryContentsObservationsContentsResultsEventReminders"]]
    ]
    recurrence: Optional["QueryContentsObservationsContentsResultsEventRecurrence"]
    recurring_event_identifier: Optional[str] = Field(alias="recurringEventIdentifier")
    is_recurring: Optional[bool] = Field(alias="isRecurring")


class QueryContentsObservationsContentsResultsEventOrganizer(BaseModel):
    name: Optional[str]
    email: Optional[str]
    is_optional: Optional[bool] = Field(alias="isOptional")
    is_organizer: Optional[bool] = Field(alias="isOrganizer")
    response_status: Optional[CalendarAttendeeResponseStatus] = Field(
        alias="responseStatus"
    )


class QueryContentsObservationsContentsResultsEventAttendees(BaseModel):
    name: Optional[str]
    email: Optional[str]
    is_optional: Optional[bool] = Field(alias="isOptional")
    is_organizer: Optional[bool] = Field(alias="isOrganizer")
    response_status: Optional[CalendarAttendeeResponseStatus] = Field(
        alias="responseStatus"
    )


class QueryContentsObservationsContentsResultsEventReminders(BaseModel):
    minutes_before: Optional[int] = Field(alias="minutesBefore")
    method: Optional[CalendarReminderMethod]


class QueryContentsObservationsContentsResultsEventRecurrence(BaseModel):
    pattern: Optional[CalendarRecurrencePattern]
    interval: Optional[int]
    count: Optional[int]
    until: Optional[Any]
    days_of_week: Optional[List[Optional[str]]] = Field(alias="daysOfWeek")
    day_of_month: Optional[int] = Field(alias="dayOfMonth")
    month_of_year: Optional[int] = Field(alias="monthOfYear")


class QueryContentsObservationsContentsResultsIssue(BaseModel):
    identifier: Optional[str]
    title: Optional[str]
    project: Optional[str]
    team: Optional[str]
    status: Optional[str]
    priority: Optional[str]
    type: Optional[str]
    labels: Optional[List[Optional[str]]]


class QueryContentsObservationsContentsResultsCommit(BaseModel):
    sha: Optional[str]
    message: Optional[str]
    project: Optional[str]
    team: Optional[str]
    branch: Optional[str]
    parent_shas: Optional[List[Optional[str]]] = Field(alias="parentShas")
    files_changed: Optional[int] = Field(alias="filesChanged")
    additions: Optional[int]
    deletions: Optional[int]
    pull_request_number: Optional[str] = Field(alias="pullRequestNumber")
    author_date: Optional[Any] = Field(alias="authorDate")
    committer_date: Optional[Any] = Field(alias="committerDate")
    authors: Optional[
        List[Optional["QueryContentsObservationsContentsResultsCommitAuthors"]]
    ]
    committers: Optional[
        List[Optional["QueryContentsObservationsContentsResultsCommitCommitters"]]
    ]
    labels: Optional[List[Optional[str]]]
    links: Optional[List[Optional[Any]]]


class QueryContentsObservationsContentsResultsCommitAuthors(BaseModel):
    name: Optional[str]
    email: Optional[str]
    given_name: Optional[str] = Field(alias="givenName")
    family_name: Optional[str] = Field(alias="familyName")


class QueryContentsObservationsContentsResultsCommitCommitters(BaseModel):
    name: Optional[str]
    email: Optional[str]
    given_name: Optional[str] = Field(alias="givenName")
    family_name: Optional[str] = Field(alias="familyName")


class QueryContentsObservationsContentsResultsPullRequest(BaseModel):
    identifier: Optional[str]
    title: Optional[str]
    description: Optional[str]
    project: Optional[str]
    team: Optional[str]
    status: Optional[str]
    type: Optional[str]
    base_branch: Optional[str] = Field(alias="baseBranch")
    head_branch: Optional[str] = Field(alias="headBranch")
    is_draft: Optional[bool] = Field(alias="isDraft")
    is_mergeable: Optional[bool] = Field(alias="isMergeable")
    merge_commit_sha: Optional[str] = Field(alias="mergeCommitSha")
    merged_at: Optional[Any] = Field(alias="mergedAt")
    files_changed: Optional[int] = Field(alias="filesChanged")
    additions: Optional[int]
    deletions: Optional[int]
    authors: Optional[
        List[Optional["QueryContentsObservationsContentsResultsPullRequestAuthors"]]
    ]
    reviewers: Optional[
        List[Optional["QueryContentsObservationsContentsResultsPullRequestReviewers"]]
    ]
    labels: Optional[List[Optional[str]]]
    links: Optional[List[Optional[Any]]]


class QueryContentsObservationsContentsResultsPullRequestAuthors(BaseModel):
    name: Optional[str]
    email: Optional[str]
    given_name: Optional[str] = Field(alias="givenName")
    family_name: Optional[str] = Field(alias="familyName")


class QueryContentsObservationsContentsResultsPullRequestReviewers(BaseModel):
    name: Optional[str]
    email: Optional[str]
    given_name: Optional[str] = Field(alias="givenName")
    family_name: Optional[str] = Field(alias="familyName")


class QueryContentsObservationsContentsResultsMessage(BaseModel):
    identifier: Optional[str]
    conversation_identifier: Optional[str] = Field(alias="conversationIdentifier")
    channel_identifier: Optional[str] = Field(alias="channelIdentifier")
    channel_name: Optional[str] = Field(alias="channelName")
    attachment_count: Optional[int] = Field(alias="attachmentCount")
    links: Optional[List[Optional[Any]]]
    author: Optional["QueryContentsObservationsContentsResultsMessageAuthor"]
    mentions: Optional[
        List[Optional["QueryContentsObservationsContentsResultsMessageMentions"]]
    ]


class QueryContentsObservationsContentsResultsMessageAuthor(BaseModel):
    name: Optional[str]
    email: Optional[str]
    given_name: Optional[str] = Field(alias="givenName")
    family_name: Optional[str] = Field(alias="familyName")


class QueryContentsObservationsContentsResultsMessageMentions(BaseModel):
    name: Optional[str]
    email: Optional[str]
    given_name: Optional[str] = Field(alias="givenName")
    family_name: Optional[str] = Field(alias="familyName")


class QueryContentsObservationsContentsResultsPost(BaseModel):
    identifier: Optional[str]
    title: Optional[str]
    author: Optional["QueryContentsObservationsContentsResultsPostAuthor"]
    upvotes: Optional[int]
    downvotes: Optional[int]
    comment_count: Optional[int] = Field(alias="commentCount")
    links: Optional[List[Optional[Any]]]


class QueryContentsObservationsContentsResultsPostAuthor(BaseModel):
    name: Optional[str]
    email: Optional[str]
    given_name: Optional[str] = Field(alias="givenName")
    family_name: Optional[str] = Field(alias="familyName")


class QueryContentsObservationsContentsResultsPackage(BaseModel):
    file_count: Optional[int] = Field(alias="fileCount")
    folder_count: Optional[int] = Field(alias="folderCount")
    is_encrypted: Optional[bool] = Field(alias="isEncrypted")


class QueryContentsObservationsContentsResultsLanguage(BaseModel):
    languages: Optional[List[Optional[str]]]


class QueryContentsObservationsContentsResultsFeed(BaseModel):
    id: str
    name: str


class QueryContentsObservationsContentsResultsWorkflow(BaseModel):
    id: str
    name: str


class QueryContentsObservationsContentsResultsPages(BaseModel):
    index: Optional[int]
    text: Optional[str]
    relevance: Optional[float]
    images: Optional[
        List[Optional["QueryContentsObservationsContentsResultsPagesImages"]]
    ]
    chunks: Optional[
        List[Optional["QueryContentsObservationsContentsResultsPagesChunks"]]
    ]


class QueryContentsObservationsContentsResultsPagesImages(BaseModel):
    id: Optional[str]
    mime_type: Optional[str] = Field(alias="mimeType")
    data: Optional[str]
    left: Optional[int]
    right: Optional[int]
    top: Optional[int]
    bottom: Optional[int]


class QueryContentsObservationsContentsResultsPagesChunks(BaseModel):
    index: Optional[int]
    page_index: Optional[int] = Field(alias="pageIndex")
    row_index: Optional[int] = Field(alias="rowIndex")
    column_index: Optional[int] = Field(alias="columnIndex")
    confidence: Optional[float]
    text: Optional[str]
    role: Optional[TextRoles]
    language: Optional[str]
    relevance: Optional[float]


class QueryContentsObservationsContentsResultsSegments(BaseModel):
    start_time: Optional[Any] = Field(alias="startTime")
    end_time: Optional[Any] = Field(alias="endTime")
    text: Optional[str]
    relevance: Optional[float]


class QueryContentsObservationsContentsResultsFrames(BaseModel):
    index: Optional[int]
    description: Optional[str]
    text: Optional[str]
    relevance: Optional[float]


class QueryContentsObservationsContentsResultsObservations(BaseModel):
    id: str
    type: ObservableTypes
    observable: "QueryContentsObservationsContentsResultsObservationsObservable"
    related: Optional["QueryContentsObservationsContentsResultsObservationsRelated"]
    related_type: Optional[ObservableTypes] = Field(alias="relatedType")
    relation: Optional[str]
    occurrences: Optional[
        List[
            Optional["QueryContentsObservationsContentsResultsObservationsOccurrences"]
        ]
    ]
    state: EntityState


class QueryContentsObservationsContentsResultsObservationsObservable(BaseModel):
    id: str
    name: Optional[str]


class QueryContentsObservationsContentsResultsObservationsRelated(BaseModel):
    id: str
    name: Optional[str]


class QueryContentsObservationsContentsResultsObservationsOccurrences(BaseModel):
    type: Optional[OccurrenceTypes]
    confidence: Optional[float]
    start_time: Optional[Any] = Field(alias="startTime")
    end_time: Optional[Any] = Field(alias="endTime")
    page_index: Optional[int] = Field(alias="pageIndex")
    bounding_box: Optional[
        "QueryContentsObservationsContentsResultsObservationsOccurrencesBoundingBox"
    ] = Field(alias="boundingBox")


class QueryContentsObservationsContentsResultsObservationsOccurrencesBoundingBox(
    BaseModel
):
    left: Optional[float]
    top: Optional[float]
    width: Optional[float]
    height: Optional[float]


QueryContentsObservations.model_rebuild()
QueryContentsObservationsContents.model_rebuild()
QueryContentsObservationsContentsResults.model_rebuild()
QueryContentsObservationsContentsResultsEmail.model_rebuild()
QueryContentsObservationsContentsResultsEvent.model_rebuild()
QueryContentsObservationsContentsResultsCommit.model_rebuild()
QueryContentsObservationsContentsResultsPullRequest.model_rebuild()
QueryContentsObservationsContentsResultsMessage.model_rebuild()
QueryContentsObservationsContentsResultsPost.model_rebuild()
QueryContentsObservationsContentsResultsPages.model_rebuild()
QueryContentsObservationsContentsResultsObservations.model_rebuild()
QueryContentsObservationsContentsResultsObservationsOccurrences.model_rebuild()
