# generated by datamodel-codegen:
#   filename:  Orderflow/Orderflow.json

from __future__ import annotations

from typing import Annotated, Union

from msgspec import Meta

from .. import definitions
from ..Oms.Cancel import Cancel
from ..Oms.Order import Order


class OrderPending(Order, omit_defaults=True, tag_field="t", tag="w"):
    pass


class TaggedOrderAck(definitions.OrderAck, omit_defaults=True, tag_field="t", tag="a"):
    pass


class TaggedOrderReject(
    definitions.OrderReject, omit_defaults=True, tag_field="t", tag="r"
):
    pass


class TaggedOrderOut(definitions.OrderOut, omit_defaults=True, tag_field="t", tag="o"):
    pass


class OrderReconciledOut(
    definitions.OrderOut, omit_defaults=True, tag_field="t", tag="ox"
):
    pass


class TaggedOrderStale(
    definitions.OrderStale, omit_defaults=True, tag_field="t", tag="z"
):
    pass


class CancelPending(Cancel, omit_defaults=True, tag_field="t", tag="xc"):
    pass


class TaggedCancelReject(
    definitions.CancelReject, omit_defaults=True, tag_field="t", tag="xr"
):
    pass


class TaggedOrderCanceling(
    definitions.OrderCanceling, omit_defaults=True, tag_field="t", tag="xa"
):
    pass


class TaggedOrderCanceled(
    definitions.OrderCanceled, omit_defaults=True, tag_field="t", tag="xx"
):
    pass


class TaggedFill(definitions.Fill, omit_defaults=True, tag_field="t", tag="f"):
    pass


class TaggedAberrantFill(
    definitions.AberrantFill, omit_defaults=True, tag_field="t", tag="af"
):
    pass


Orderflow = Annotated[
    Union[
        OrderPending,
        TaggedOrderAck,
        TaggedOrderReject,
        TaggedOrderOut,
        OrderReconciledOut,
        TaggedOrderStale,
        CancelPending,
        TaggedCancelReject,
        TaggedOrderCanceling,
        TaggedOrderCanceled,
        TaggedFill,
        TaggedAberrantFill,
    ],
    Meta(title="Orderflow"),
]
