# Generated by ariadne-codegen
# Source: vals/graphql/

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel


class TestFragment(BaseModel):
    id: str
    input_under_test: str = Field(alias="inputUnderTest")
    typed_context: Any = Field(alias="typedContext")
    typed_tags: List[str] = Field(alias="typedTags")
    cross_version_id: str = Field(alias="crossVersionId")
    golden_output: str = Field(alias="goldenOutput")
    typed_file_ids: List[str] = Field(alias="typedFileIds")
    typed_checks: List["TestFragmentTypedChecks"] = Field(alias="typedChecks")
    test_suite: "TestFragmentTestSuite" = Field(alias="testSuite")


class TestFragmentTypedChecks(BaseModel):
    operator: str
    criteria: str
    modifiers: "TestFragmentTypedChecksModifiers"


class TestFragmentTypedChecksModifiers(BaseModel):
    optional: bool
    severity: Optional[float]
    examples: List["TestFragmentTypedChecksModifiersExamples"]
    extractor: Optional[str]
    conditional: Optional["TestFragmentTypedChecksModifiersConditional"]
    category: Optional[str]
    display_metrics: bool = Field(alias="displayMetrics")


class TestFragmentTypedChecksModifiersExamples(BaseModel):
    type: str
    text: str


class TestFragmentTypedChecksModifiersConditional(BaseModel):
    operator: str
    criteria: str


class TestFragmentTestSuite(BaseModel):
    id: str


TestFragment.model_rebuild()
