# 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 IngestMemory(BaseModel):
    ingest_memory: Optional["IngestMemoryIngestMemory"] = Field(alias="ingestMemory")


class IngestMemoryIngestMemory(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]
    collections: Optional[List[Optional["IngestMemoryIngestMemoryCollections"]]]
    observations: Optional[List[Optional["IngestMemoryIngestMemoryObservations"]]]


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


class IngestMemoryIngestMemoryObservations(BaseModel):
    id: str
    type: ObservableTypes
    observable: "IngestMemoryIngestMemoryObservationsObservable"
    related: Optional["IngestMemoryIngestMemoryObservationsRelated"]
    related_type: Optional[ObservableTypes] = Field(alias="relatedType")
    relation: Optional[str]
    occurrences: Optional[
        List[Optional["IngestMemoryIngestMemoryObservationsOccurrences"]]
    ]
    state: EntityState


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


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


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


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


IngestMemory.model_rebuild()
IngestMemoryIngestMemory.model_rebuild()
IngestMemoryIngestMemoryObservations.model_rebuild()
IngestMemoryIngestMemoryObservationsOccurrences.model_rebuild()
