"""Auto-generated from octomil-contracts. Do not edit."""

from enum import Enum


class FederatedParticipationState(str, Enum):
    NOT_ENROLLED = "not_enrolled"
    """Device has not been offered or enrolled in any round."""
    OFFERED = "offered"
    """Server has offered the device a participation slot for this round."""
    ACCEPTED = "accepted"
    """Device accepted the participation offer."""
    PLAN_FETCHING = "plan_fetching"
    """Device is downloading the training plan from the server."""
    PLAN_READY = "plan_ready"
    """Training plan downloaded and validated; ready to begin local training."""
    WAITING_FOR_WINDOW = "waiting_for_window"
    """Waiting for an eligible execution window (e.g., idle + charging + Wi-Fi)."""
    LOCAL_TRAINING = "local_training"
    """Device is executing local training steps on its private data."""
    LOCAL_EVAL = "local_eval"
    """Device is evaluating the trained model on a local held-out set."""
    UPDATE_PREPARING = "update_preparing"
    """Preparing the model update (delta or full weights) for upload."""
    CLIPPING = "clipping"
    """Applying gradient or weight clipping for differential privacy."""
    NOISING = "noising"
    """Adding calibrated Gaussian noise for differential privacy."""
    ENCRYPTING = "encrypting"
    """Encrypting the update payload (e.g., secure aggregation mask)."""
    UPLOADING = "uploading"
    """Device is actively uploading the encrypted update to the server."""
    UPLOADED = "uploaded"
    """Upload completed; server acknowledgement pending."""
    ACKNOWLEDGED = "acknowledged"
    """Server confirmed receipt of the device update."""
    COMPLETED = "completed"
    """Device's participation in this round is complete."""
    DECLINED_POLICY = "declined_policy"
    """Device declined the offer due to a local policy rule (e.g., low battery, no Wi-Fi)."""
    FAILED_RETRYABLE = "failed_retryable"
    """Transient failure (e.g., upload interrupted); device may retry within the round window."""
    ABORTED_POLICY = "aborted_policy"
    """Participation aborted mid-execution due to a policy condition (e.g., app foregrounded)."""
    REJECTED_LOCAL = "rejected_local"
    """Local evaluation showed negative impact; device opted out of uploading."""
    UPLOAD_DEFERRED = "upload_deferred"
    """Upload deferred because required conditions (Wi-Fi, power) were not met in time."""
    EXPIRED_ROUND = "expired_round"
    """Round deadline passed before the device could complete participation."""
