# 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
from .fragments import ResultJsonElementTypeFields, TestResultFields


class SingleTestResultReviewsWithCount(BaseModel):
    test_result_reviews_with_count: (
        "SingleTestResultReviewsWithCountTestResultReviewsWithCount"
    ) = Field(alias="testResultReviewsWithCount")


class SingleTestResultReviewsWithCountTestResultReviewsWithCount(BaseModel):
    count: int
    single_test_results: List[
        "SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResults"
    ] = Field(alias="singleTestResults")


class SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResults(
    TestResultFields
):
    reviewed_by: Optional[List[str]] = Field(alias="reviewedBy")
    single_test_reviews: Optional[
        List[
            "SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviews"
        ]
    ] = Field(alias="singleTestReviews")


class SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviews(
    BaseModel
):
    id: Any
    completed_by: str = Field(alias="completedBy")
    feedback: str
    completed_at: Optional[datetime] = Field(alias="completedAt")
    started_at: datetime = Field(alias="startedAt")
    created_by: str = Field(alias="createdBy")
    status: TestResultReviewStatusEnum
    per_check_test_review: List[
        "SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviewsPerCheckTestReview"
    ] = Field(alias="perCheckTestReview")
    test_result: (
        "SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviewsTestResult"
    ) = Field(alias="testResult")
    custom_review_values: List[
        "SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviewsCustomReviewValues"
    ] = Field(alias="customReviewValues")


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


class SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviewsTestResult(
    BaseModel
):
    id: Any
    result_json: List[
        "SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviewsTestResultResultJson"
    ] = Field(alias="resultJson")


class SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviewsTestResultResultJson(
    ResultJsonElementTypeFields
):
    pass


class SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviewsCustomReviewValues(
    BaseModel
):
    template: "SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviewsCustomReviewValuesTemplate"
    value: str


class SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviewsCustomReviewValuesTemplate(
    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")


SingleTestResultReviewsWithCount.model_rebuild()
SingleTestResultReviewsWithCountTestResultReviewsWithCount.model_rebuild()
SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResults.model_rebuild()
SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviews.model_rebuild()
SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviewsTestResult.model_rebuild()
SingleTestResultReviewsWithCountTestResultReviewsWithCountSingleTestResultsSingleTestReviewsCustomReviewValues.model_rebuild()
