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

from datetime import datetime
from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import TemplateType, TestResultReviewStatusEnum


class GetSingleTestReviewsWithCount(BaseModel):
    single_test_reviews_with_count: (
        "GetSingleTestReviewsWithCountSingleTestReviewsWithCount"
    ) = Field(alias="singleTestReviewsWithCount")


class GetSingleTestReviewsWithCountSingleTestReviewsWithCount(BaseModel):
    count: int
    single_test_reviews: List[
        "GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviews"
    ] = Field(alias="singleTestReviews")


class GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviews(
    BaseModel
):
    id: Any
    completed_at: Optional[datetime] = Field(alias="completedAt")
    started_at: datetime = Field(alias="startedAt")
    created_by: str = Field(alias="createdBy")
    status: TestResultReviewStatusEnum
    pass_percentage: float = Field(alias="passPercentage")
    completed_by: str = Field(alias="completedBy")
    agreement_rate: float = Field(alias="agreementRate")
    feedback: str
    run_human_review: Optional[
        "GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsRunHumanReview"
    ] = Field(alias="runHumanReview")
    per_check_test_review_typed: List[
        "GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsPerCheckTestReviewTyped"
    ] = Field(alias="perCheckTestReviewTyped")
    test_result: (
        "GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsTestResult"
    ) = Field(alias="testResult")
    custom_review_values: List[
        "GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsCustomReviewValues"
    ] = Field(alias="customReviewValues")


class GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsRunHumanReview(
    BaseModel
):
    rereview_auto_eval: bool = Field(alias="rereviewAutoEval")


class GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsPerCheckTestReviewTyped(
    BaseModel
):
    binary_human_eval: Optional[int] = Field(alias="binaryHumanEval")
    is_flagged: Optional[bool] = Field(alias="isFlagged")


class GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsTestResult(
    BaseModel
):
    id: str
    llm_output: str = Field(alias="llmOutput")
    pass_percentage: float = Field(alias="passPercentage")
    pass_percentage_with_optional: float = Field(alias="passPercentageWithOptional")
    result_json: Any = Field(alias="resultJson")
    qa_pair: Optional[
        "GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsTestResultQaPair"
    ] = Field(alias="qaPair")
    test: "GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsTestResultTest"
    metadata: Optional[Any]


class GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsTestResultQaPair(
    BaseModel
):
    context: Any
    output_context: Any = Field(alias="outputContext")
    error_message: str = Field(alias="errorMessage")


class GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsTestResultTest(
    BaseModel
):
    test_id: str = Field(alias="testId")
    input_under_test: str = Field(alias="inputUnderTest")
    context: Any


class GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsCustomReviewValues(
    BaseModel
):
    template: "GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsCustomReviewValuesTemplate"
    value: str


class GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsCustomReviewValuesTemplate(
    BaseModel
):
    id: Any
    name: str
    instructions: str
    optional: bool
    categories: Optional[List[str]]
    type: TemplateType
    min_value: Optional[int] = Field(alias="minValue")
    max_value: Optional[int] = Field(alias="maxValue")


GetSingleTestReviewsWithCount.model_rebuild()
GetSingleTestReviewsWithCountSingleTestReviewsWithCount.model_rebuild()
GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviews.model_rebuild()
GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsTestResult.model_rebuild()
GetSingleTestReviewsWithCountSingleTestReviewsWithCountSingleTestReviewsCustomReviewValues.model_rebuild()
