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

from __future__ import annotations

from enum import Enum
from typing import List, Optional, Union

from pydantic import BaseModel, Field


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


class Kind(BaseModel):
    __root__: str


class ExtendedProcessingTask1(BaseModel):
    comment: Optional[str] = None


class ProcessingStatusUnion(BaseModel):
    id: Optional[int] = None
    description: Optional[str] = None


class ProcessingTasksTitle(BaseModel):
    __root__: List[ProcessingTask] = Field(..., title='Processing Tasks Title')


class ExtendedProcessingTask(BaseModel):
    __root__: Union[ProcessingTasksTitle, ExtendedProcessingTask1] = Field(
        ..., title='Extended Processing Task Title'
    )


class ExtendedProcessingTasks(BaseModel):
    __root__: List[ExtendedProcessingTask] = Field(
        ..., title='Extended Processing Tasks Title'
    )


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


ProcessingTasksTitle.update_forward_refs()
