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

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

from ..._models import BaseModel

__all__ = ["TransformJobListResponse", "TransformJobListResponseItem"]


class TransformJobListResponseItem(BaseModel):
    """Summarised view of a PII/PHI transform job returned in list endpoints."""

    id: Optional[str] = None
    """Unique identifier for the transform job."""

    completed_at: Optional[datetime] = None
    """When the job completed."""

    created_at: Optional[datetime] = None
    """When the job was created."""

    created_by_email: Optional[str] = None
    """Email of the user who created this job."""

    dataset_name: Optional[str] = None
    """Name of the seed dataset."""

    datasets_id: Optional[str] = None
    """UUID of the seed dataset being transformed."""

    detection_method: Optional[str] = None
    """Entity detection method used."""

    metrics_json: Optional[object] = None
    """Transform results (populated once SUCCEEDED)."""

    name: Optional[str] = None
    """Human-readable name for this job."""

    pii_types: Optional[List[str]] = None
    """List of PII/PHI entity types being detected."""

    started_at: Optional[datetime] = None
    """When processing started."""

    status: Optional[Literal["PENDING", "RUNNING", "SUCCEEDED", "FAILED"]] = None
    """Current status of the transform job."""


TransformJobListResponse: TypeAlias = List[TransformJobListResponseItem]
