# generated by datamodel-codegen:
#   filename:  infer_union_variant_names_edges.json

from __future__ import annotations

from enum import Enum
from typing import Any, Literal

from external.models import ExternalKind
from pydantic import BaseModel, Field, RootModel


class ObjectDiscriminatorObjectCreated(BaseModel):
    kind: Literal['object.created']
    value: str


class ObjectDiscriminatorObjectFailed(BaseModel):
    kind: Literal['object.failed']
    reason: str


class ScalarSuffixesBoolTrue(BaseModel):
    kind: Literal[True]
    ok: str


class ScalarSuffixesInt7(BaseModel):
    kind: Literal[7]
    count: int


class Kind(Enum):
    enum_kind = 'enum.kind'


class EnumLiteralEnumKind(BaseModel):
    kind: Kind
    label: str


class EnumLiteralDirect(BaseModel):
    kind: Literal['direct']
    label: str


class EmptyLiteral(BaseModel):
    kind: Literal['']
    label: str


class EmptyLiteralNamed(BaseModel):
    kind: Literal['named']
    label: str


class RefLiteralDirect(BaseModel):
    kind: Literal['direct']
    value: str


class DuplicateGenerated(BaseModel):
    kind: Literal[True]
    flag: str


class DuplicateGenerated1(BaseModel):
    kind: Literal['bool_true']
    text: str


class DuplicateLiteral(BaseModel):
    kind: Literal['same']
    a: str


class DuplicateLiteral1(BaseModel):
    kind: Literal['same']
    b: str


class MissingLiteral(BaseModel):
    kind: str
    a: str


class MissingLiteral1(BaseModel):
    kind: Literal['ok']
    b: str


class MissingProperties(BaseModel):
    kind: Literal['ok']
    b: str


class ExternalRef(BaseModel):
    kind: ExternalKind
    a: str


class ExternalRef1(BaseModel):
    kind: Literal['ok']
    b: str


class BooleanSchemaField(BaseModel):
    kind: Any | None = None
    a: str


class BooleanSchemaField1(BaseModel):
    kind: Literal['ok']
    b: str


class KindRef(RootModel[Literal['ref.kind']]):
    root: Literal['ref.kind']


class RefLiteralRefKind(BaseModel):
    kind: KindRef
    value: str


class UnionVariantNameEdges(BaseModel):
    object_discriminator: (
        ObjectDiscriminatorObjectCreated | ObjectDiscriminatorObjectFailed
    ) = Field(..., discriminator='kind')
    scalar_suffixes: ScalarSuffixesBoolTrue | ScalarSuffixesInt7 = Field(
        ..., discriminator='kind'
    )
    enum_literal: EnumLiteralEnumKind | EnumLiteralDirect
    empty_literal: EmptyLiteral | EmptyLiteralNamed
    ref_literal: RefLiteralRefKind | RefLiteralDirect
    duplicate_generated: DuplicateGenerated | DuplicateGenerated1
    duplicate_literal: DuplicateLiteral | DuplicateLiteral1
    missing_literal: MissingLiteral | MissingLiteral1
    missing_properties: dict[str, Any] | MissingProperties
    external_ref: ExternalRef | ExternalRef1
    boolean_schema_field: BooleanSchemaField | BooleanSchemaField1
