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

from typing import Any, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import (
    ContentTypes,
    EntityState,
    FileTypes,
    ObservableTypes,
    OccurrenceTypes,
)


class IngestEvent(BaseModel):
    ingest_event: Optional["IngestEventIngestEvent"] = Field(alias="ingestEvent")


class IngestEventIngestEvent(BaseModel):
    id: str
    name: str
    state: EntityState
    type: Optional[ContentTypes]
    file_type: Optional[FileTypes] = Field(alias="fileType")
    mime_type: Optional[str] = Field(alias="mimeType")
    uri: Optional[Any]
    identifier: Optional[str]
    collections: Optional[list[Optional["IngestEventIngestEventCollections"]]]
    observations: Optional[list[Optional["IngestEventIngestEventObservations"]]]


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


class IngestEventIngestEventObservations(BaseModel):
    id: str
    type: ObservableTypes
    observable: "IngestEventIngestEventObservationsObservable"
    related: Optional["IngestEventIngestEventObservationsRelated"]
    related_type: Optional[ObservableTypes] = Field(alias="relatedType")
    relation: Optional[str]
    occurrences: Optional[
        list[Optional["IngestEventIngestEventObservationsOccurrences"]]
    ]
    state: EntityState


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


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


class IngestEventIngestEventObservationsOccurrences(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")
    turn_index: Optional[int] = Field(alias="turnIndex")
    bounding_box: Optional[
        "IngestEventIngestEventObservationsOccurrencesBoundingBox"
    ] = Field(alias="boundingBox")


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


IngestEvent.model_rebuild()
IngestEventIngestEvent.model_rebuild()
IngestEventIngestEventObservations.model_rebuild()
IngestEventIngestEventObservationsOccurrences.model_rebuild()
