"""Canonical domain enums for Aegis.

These enums represent core domain concepts and are the single source of
truth.  ``models/enums.py`` re-exports them so that existing ORM code
continues to work without changes.
"""

# Import enum
import enum


# Define class TechniqueStatus
class TechniqueStatus(str, enum.Enum):
    """Coverage and evaluation status for a MITRE ATT&CK technique."""

    # Assign not_evaluated = "not_evaluated"
    not_evaluated = "not_evaluated"
    # Assign in_progress = "in_progress"
    in_progress = "in_progress"
    # Assign validated = "validated"
    validated = "validated"
    # Assign partial = "partial"
    partial = "partial"
    # Assign not_covered = "not_covered"
    not_covered = "not_covered"
    # Assign review_required = "review_required"
    review_required = "review_required"


# Define class TestState
class TestState(str, enum.Enum):
    """Lifecycle states in the security test state machine."""

    # Assign draft = "draft"
    draft = "draft"
    # Assign red_executing = "red_executing"
    red_executing = "red_executing"
    # Red Lead reviews the operator's work before it queues for Blue Team
    red_review = "red_review"
    # Assign blue_evaluating = "blue_evaluating"
    blue_evaluating = "blue_evaluating"
    # Blue Lead reviews the operator's work before cross-validation
    blue_review = "blue_review"
    # Assign in_review = "in_review"
    in_review = "in_review"
    # Assign validated = "validated"
    validated = "validated"
    # Assign rejected = "rejected"
    rejected = "rejected"
    disputed = "disputed"   # one lead approved, the other rejected


# Define class TeamSide
class TeamSide(str, enum.Enum):
    """Identifies which team (red or blue) an action belongs to."""

    # Assign red = "red"
    red = "red"
    # Assign blue = "blue"
    blue = "blue"


# Define class TestResult
class TestResult(str, enum.Enum):
    """Outcome of a red-team test from a detection perspective."""

    # Assign detected = "detected"
    detected = "detected"
    # Assign not_detected = "not_detected"
    not_detected = "not_detected"
    # Assign partially_detected = "partially_detected"
    partially_detected = "partially_detected"


# Define class ContainmentResult
class ContainmentResult(str, enum.Enum):
    """Outcome of the blue team's containment effort."""

    contained = "contained"
    partially_contained = "partially_contained"
    not_contained = "not_contained"


class AttackSuccessResult(str, enum.Enum):
    """Outcome of a red-team attack from a success perspective."""

    successful = "successful"
    not_successful = "not_successful"
    partially_successful = "partially_successful"


# Define class DataClassification
class DataClassification(str, enum.Enum):
    """Data sensitivity classification levels for compliance and retention policies.

    Matches the organization's data protection scheme:
    - public_release: approved for external/public release
    - general_use: general internal information, no special restriction
    - confidential: internal use only, or shared with trusted people
    - restricted: trusted people, customer content, and/or PII
    """

    public_release = "public_release"
    general_use = "general_use"
    confidential = "confidential"
    restricted = "restricted"
