# 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 RunReviewStatusEnum, TemplateType


class GetSingleRunReview(BaseModel):
    single_run_review: Optional["GetSingleRunReviewSingleRunReview"] = Field(
        alias="singleRunReview"
    )


class GetSingleRunReviewSingleRunReview(BaseModel):
    id: Any
    created_by: str = Field(alias="createdBy")
    created_at: datetime = Field(alias="createdAt")
    status: Optional[RunReviewStatusEnum]
    pass_rate: Optional[float] = Field(alias="passRate")
    flagged_rate: Optional[float] = Field(alias="flaggedRate")
    agreement_rate: Optional[float] = Field(alias="agreementRate")
    completed_time: Optional[datetime] = Field(alias="completedTime")
    number_of_reviews: Optional[int] = Field(alias="numberOfReviews")
    assigned_reviewers: Any = Field(alias="assignedReviewers")
    rereview_auto_eval: bool = Field(alias="rereviewAutoEval")
    run: "GetSingleRunReviewSingleRunReviewRun"
    custom_review_templates: List[
        "GetSingleRunReviewSingleRunReviewCustomReviewTemplates"
    ] = Field(alias="customReviewTemplates")


class GetSingleRunReviewSingleRunReviewRun(BaseModel):
    id: str


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


GetSingleRunReview.model_rebuild()
GetSingleRunReviewSingleRunReview.model_rebuild()
