# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Dict, List, Optional
from datetime import datetime
from typing_extensions import Literal

from .._models import BaseModel

__all__ = ["EvaluationGroup", "Member", "RowIdentifier"]


class Member(BaseModel):
    """Response model for evaluation group member"""

    id: str
    """Unique identifier of the member record"""

    created_at: datetime
    """When this member was added to the group"""

    evaluation_group_id: str
    """ID of the evaluation group"""

    evaluation_id: str
    """ID of the evaluation"""

    deleted_at: Optional[datetime] = None
    """When this membership was soft-deleted (if applicable)"""

    evaluation_created_at: Optional[datetime] = None
    """When the evaluation was created"""

    evaluation_name: Optional[str] = None
    """Name of the evaluation"""

    evaluation_tags: Optional[List[str]] = None
    """Tags of the evaluation"""

    object: Optional[Literal["evaluation_group.member"]] = None


class RowIdentifier(BaseModel):
    """Response model for evaluation group row identifier"""

    column_name: str
    """Name of the column used as row identifier"""

    evaluation_id: str
    """ID of the evaluation"""

    object: Optional[Literal["evaluation_group.row_identifier"]] = None


class EvaluationGroup(BaseModel):
    """Response model for evaluation group"""

    id: str
    """Unique identifier of the evaluation group"""

    account_id: str
    """Account that owns this evaluation group"""

    created_at: datetime
    """When the group was created"""

    name: str
    """Name of the evaluation group"""

    tags: List[str]
    """The tags associated with the entity"""

    deleted_at: Optional[datetime] = None
    """When the group was soft-deleted"""

    description: Optional[str] = None
    """Optional description"""

    evaluation_group_metadata: Optional[Dict[str, object]] = None
    """Optional metadata key-value pairs"""

    members: Optional[List[Member]] = None
    """Evaluation members in this group. Populated with 'members' view."""

    object: Optional[Literal["evaluation_group"]] = None

    row_identifiers: Optional[List[RowIdentifier]] = None
    """Row identifier mappings. Populated with 'row_identifiers' view."""
