# 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 ProcessingStatusTitle(Enum):
    COMPLETED = 'COMPLETED'
    PENDING = 'PENDING'
    FAILED = 'FAILED'


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


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


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


class ProcessingTaskTitle(BaseModel):
    processing_status_union: ProcessingStatusUnionTitle | None = Field(
        'COMPLETED', title='Processing Status Union Title', validate_default=True
    )
    processing_status: ProcessingStatusTitle | None = 'COMPLETED'
    name: str | None = None
    kind: Kind | None = None


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


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


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


class ProcessingStatusUnionTitle(
    RootModel[ProcessingStatusDetail | ExtendedProcessingTask | ProcessingStatusTitle]
):
    root: ProcessingStatusDetail | ExtendedProcessingTask | ProcessingStatusTitle = (
        Field('COMPLETED', title='Processing Status Union Title', validate_default=True)
    )


ProcessingTaskTitle.model_rebuild()
