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

from __future__ import annotations

from typing import Literal

from pydantic import Field, RootModel

from .base import Envelope


class Response1(Envelope):
    status: Literal['success']
    data: str


class Response2(Envelope):
    status: Literal['error']
    message: str


class Response(RootModel[Response1 | Response2]):
    root: Response1 | Response2 = Field(..., title='Response')
