"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
import dateutil.parser
from .evalcriteria import EvalCriteria
from .evalstats import EvalStats
from .evaluationrunjobstatus import EvaluationRunJobStatus
from .getlogssummaryrequest import GetLogsSummaryRequest
from dataclasses_json import Undefined, dataclass_json
from datetime import datetime
from gantry import utils
from typing import Dict, List, Optional


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class EvaluationRun:
    created_at: datetime = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created_at'), 'encoder': utils.datetimeisoformat(False), 'decoder': dateutil.parser.isoparse }})
    evaluation_job_status: EvaluationRunJobStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('evaluation_job_status') }})
    r"""An enumeration."""
    id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
    organization_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('organization_id') }})
    column_mapping: Optional[Dict[str, str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('column_mapping'), 'exclude': lambda f: f is None }})
    completed_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('completed_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'exclude': lambda f: f is None }})
    created_by: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created_by'), 'exclude': lambda f: f is None }})
    is_draft: Optional[bool] = dataclasses.field(default=False, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('is_draft'), 'exclude': lambda f: f is None }})
    llm_evaluation_criterias: Optional[List[EvalCriteria]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('llm_evaluation_criterias'), 'exclude': lambda f: f is None }})
    logs_query: Optional[GetLogsSummaryRequest] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('logs_query'), 'exclude': lambda f: f is None }})
    r"""Base Pydantic model to use when validating API request data instead
    of pydantic.BaseModel.
    This raises validation errors as GantryRequestValidationError so they can
    be caught and returned as 400s.
    """
    name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is None }})
    num_records: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('num_records'), 'exclude': lambda f: f is None }})
    num_tokens: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('num_tokens'), 'exclude': lambda f: f is None }})
    pending_dataset_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pending_dataset_id'), 'exclude': lambda f: f is None }})
    rag_stats: Optional[EvalStats] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rag_stats'), 'exclude': lambda f: f is None }})
    raw_dataset_path: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('raw_dataset_path'), 'exclude': lambda f: f is None }})
    

