"""
RCABench API

RCABench - A comprehensive root cause analysis benchmarking platform for microservices

The version of the OpenAPI document: 1.1.55
Contact: team@rcabench.com
Generated by OpenAPI Generator (https://rcabench.openapi-generator.tech)

Do not edit the class manually.
"""  # noqa: E501

from __future__ import annotations

import json
from enum import Enum

from typing_extensions import Self


class EventType(str, Enum):
    """
    EventType
    """

    """
    allowed enum values
    """
    RestartPedestalStarted = "restart.pedestal.started"
    RestartPedestalCompleted = "restart.pedestal.completed"
    RestartPedestalFailed = "restart.pedestal.failed"
    FaultInjectionStarted = "fault.injection.started"
    FaultInjectionCompleted = "fault.injection.completed"
    FaultInjectionFailed = "fault.injection.failed"
    AlgoRunStarted = "algorithm.run.started"
    AlgoRunSucceed = "algorithm.run.succeed"
    AlgoRunFailed = "algorithm.run.failed"
    AlgoResultCollection = "algorithm.result.collection"
    AlgoNoResultData = "algorithm.no_result_data"
    DatapackBuildStarted = "datapack.build.started"
    DatapackBuildSucceed = "datapack.build.succeed"
    DatapackBuildFailed = "datapack.build.failed"
    DatapackResultCollection = "datapack.result.collection"
    DatapackNoAnomaly = "datapack.no_anomaly"
    DatapackNoDetectorData = "datapack.no_detector_data"
    ImageBUildStarted = "image.build.started"
    ImageBuildSucceed = "image.build.succeed"
    ImageBuildFailed = "image.build.failed"
    TaskStarted = "task.started"
    TaskStateUpdate = "task.state.update"
    TaskRetryStatus = "task.retry.status"
    NoNamespaceAvailable = "no.namespace.available"
    NoTokenAvailable = "no.token.available"
    AcquireLock = "acquire.lock"
    ReleaseLock = "release.lock"
    JobSucceed = "k8s.job.succeed"
    JobFailed = "k8s.job.failed"

    @classmethod
    def from_json(cls, json_str: str) -> Self:
        """Create an instance of EventType from a JSON string"""
        return cls(json.loads(json_str))
