# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import typing

from .failed_task_response import FailedTaskResponse
from .processing_task_response import ProcessingTaskResponse
from .success_task_response import SuccessTaskResponse


class TaskResponse_Success(SuccessTaskResponse):
    status: typing.Literal["SUCCESS"] = "SUCCESS"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


class TaskResponse_Processing(ProcessingTaskResponse):
    status: typing.Literal["PROCESSING"] = "PROCESSING"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


class TaskResponse_Failed(FailedTaskResponse):
    status: typing.Literal["FAILED"] = "FAILED"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


TaskResponse = typing.Union[TaskResponse_Success, TaskResponse_Processing, TaskResponse_Failed]
