# coding: utf-8

"""
    Mixpeek API

    This is the Mixpeek API, providing access to various endpoints for data processing and retrieval.

    The version of the OpenAPI document: 1.3.0
    Contact: info@mixpeek.com
    Generated by OpenAPI Generator (https://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 WebhookEventType(str, Enum):
    """
    Webhook event types for real-time notifications.  These events are emitted when significant state changes occur in the system. Webhooks subscribe to specific event types and receive notifications via configured channels (email, Slack, HTTP webhooks).  Event Naming Convention:     {resource}.{action}[.{sub-resource}[.{sub-action}]]  Examples:     - object.created: New object ingested     - collection.documents.written: Documents indexed     - cluster.execution.completed: Cluster job finished  Cache Invalidation Annotations:     Each event type includes a comment indicating recommended cache invalidation scope:     - [KEY] = Invalidate specific document/object keys     - [COLLECTION] = Invalidate collection-level cache     - [NAMESPACE] = Invalidate namespace-level cache  Event Categories:     - Object Lifecycle: Events for individual objects (create, update, delete)     - Collection Lifecycle: Events for collections (create, update, delete, documents written)     - Cluster Lifecycle: Events for clusters (create, update, delete, execution status)     - Trigger Lifecycle: Events for cluster triggers (create, update, fire, execution status)     - Taxonomy Lifecycle: Events for taxonomies (create, update, delete)  Use Cases:     - Real-time sync with external systems     - Audit trail and compliance logging     - Automated workflows triggered by state changes     - Cache invalidation for distributed systems     - Notifications to team members via Slack/email
    """

    """
    allowed enum values
    """
    OBJECT_DOT_CREATED = 'object.created'
    OBJECTS_DOT_CREATED_DOT_BATCH = 'objects.created.batch'
    OBJECT_DOT_UPDATED = 'object.updated'
    OBJECT_DOT_DELETED = 'object.deleted'
    COLLECTION_DOT_CREATED = 'collection.created'
    COLLECTION_DOT_UPDATED = 'collection.updated'
    COLLECTION_DOT_DELETED = 'collection.deleted'
    COLLECTION_DOT_DOCUMENTS_DOT_WRITTEN = 'collection.documents.written'
    CLUSTER_DOT_CREATED = 'cluster.created'
    CLUSTER_DOT_UPDATED = 'cluster.updated'
    CLUSTER_DOT_DELETED = 'cluster.deleted'
    CLUSTER_DOT_EXECUTION_DOT_STARTED = 'cluster.execution.started'
    CLUSTER_DOT_EXECUTION_DOT_COMPLETED = 'cluster.execution.completed'
    CLUSTER_DOT_EXECUTION_DOT_FAILED = 'cluster.execution.failed'
    TRIGGER_DOT_CREATED = 'trigger.created'
    TRIGGER_DOT_UPDATED = 'trigger.updated'
    TRIGGER_DOT_DELETED = 'trigger.deleted'
    TRIGGER_DOT_PAUSED = 'trigger.paused'
    TRIGGER_DOT_RESUMED = 'trigger.resumed'
    TRIGGER_DOT_FIRED = 'trigger.fired'
    TRIGGER_DOT_EXECUTION_DOT_COMPLETED = 'trigger.execution.completed'
    TRIGGER_DOT_EXECUTION_DOT_FAILED = 'trigger.execution.failed'
    TAXONOMY_DOT_CREATED = 'taxonomy.created'
    TAXONOMY_DOT_UPDATED = 'taxonomy.updated'
    TAXONOMY_DOT_DELETED = 'taxonomy.deleted'
    ALERT_DOT_CREATED = 'alert.created'
    ALERT_DOT_UPDATED = 'alert.updated'
    ALERT_DOT_DELETED = 'alert.deleted'
    ALERT_DOT_TRIGGERED = 'alert.triggered'
    ALERT_DOT_EXECUTION_DOT_COMPLETED = 'alert.execution.completed'
    ALERT_DOT_EXECUTION_DOT_FAILED = 'alert.execution.failed'

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


