# generated by datamodel-codegen:
#   filename:  titles.json
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from enum import Enum

from pydantic import BaseModel, Field, RootModel


class ProcessingStatus(Enum):
    COMPLETED = 'COMPLETED'
    PENDING = 'PENDING'
    FAILED = 'FAILED'


class Kind(RootModel[str]):
    root: str


class ExtendedProcessingTask1(BaseModel):
    comment: str | None = None


class ProcessingStatusUnion(BaseModel):
    id: int | None = None
    description: str | None = None


class ProcessingTask(BaseModel):
    processing_status_union: (
        ProcessingStatusUnion | ExtendedProcessingTask | ProcessingStatus | None
    ) = Field(
        default_factory=lambda: ExtendedProcessingTask('COMPLETED'),
        title='Processing Status Union Title',
    )
    processing_status: ProcessingStatus | None = 'COMPLETED'
    name: str | None = None
    kind: Kind | None = None


class ProcessingTasksTitle(RootModel[list[ProcessingTask]]):
    root: list[ProcessingTask] = Field(..., title='Processing Tasks Title')


class ExtendedProcessingTask(RootModel[ProcessingTasksTitle | ExtendedProcessingTask1]):
    root: ProcessingTasksTitle | ExtendedProcessingTask1 = Field(
        ..., title='Extended Processing Task Title'
    )


class ExtendedProcessingTasks(RootModel[list[ExtendedProcessingTask]]):
    root: list[ExtendedProcessingTask] = Field(
        ..., title='Extended Processing Tasks Title'
    )


ProcessingTask.model_rebuild()
