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

from typing import Any, List, Optional

from pydantic import Field

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


class IngestTextBatch(BaseModel):
    ingest_text_batch: Optional[List[Optional["IngestTextBatchIngestTextBatch"]]] = (
        Field(alias="ingestTextBatch")
    )


class IngestTextBatchIngestTextBatch(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["IngestTextBatchIngestTextBatchCollections"]]]
    observations: Optional[List[Optional["IngestTextBatchIngestTextBatchObservations"]]]


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


class IngestTextBatchIngestTextBatchObservations(BaseModel):
    id: str
    type: ObservableTypes
    observable: "IngestTextBatchIngestTextBatchObservationsObservable"
    related: Optional["IngestTextBatchIngestTextBatchObservationsRelated"]
    related_type: Optional[ObservableTypes] = Field(alias="relatedType")
    relation: Optional[str]
    occurrences: Optional[
        List[Optional["IngestTextBatchIngestTextBatchObservationsOccurrences"]]
    ]
    state: EntityState


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


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


class IngestTextBatchIngestTextBatchObservationsOccurrences(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[
        "IngestTextBatchIngestTextBatchObservationsOccurrencesBoundingBox"
    ] = Field(alias="boundingBox")


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


IngestTextBatch.model_rebuild()
IngestTextBatchIngestTextBatch.model_rebuild()
IngestTextBatchIngestTextBatchObservations.model_rebuild()
IngestTextBatchIngestTextBatchObservationsOccurrences.model_rebuild()
