# 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 AuditAction(str, Enum):
    """
    Canonical audit log actions captured for organization events.  These events are written to the audit trail for compliance, security monitoring, and debugging. Each action includes actor, resource, timestamp, and change details.  User lifecycle actions:     - USER_CREATED: New user added to organization     - USER_UPDATED: User role, status, or metadata modified     - USER_DELETED: User removed from organization  API key lifecycle actions:     - API_KEY_CREATED: New API key generated     - API_KEY_ROTATED: Key regenerated (old key revoked, new key issued)     - API_KEY_REVOKED: Key manually revoked     - API_KEY_SCOPE_UPDATED: Key permissions or scopes modified  Permission actions:     - PERMISSION_UPDATED: User or key permissions modified  Storage connection actions:     - STORAGE_CONNECTION_CREATED: New external storage connection configured     - STORAGE_CONNECTION_UPDATED: Connection settings or credentials updated     - STORAGE_CONNECTION_DELETED: Connection permanently removed     - STORAGE_CONNECTION_TESTED: Connection health check performed     - STORAGE_CONNECTION_FAILED: Connection health check or sync failed  Namespace actions:     - NAMESPACE_CREATED: New namespace created     - NAMESPACE_UPDATED: Namespace configuration modified     - NAMESPACE_DELETED: Namespace permanently removed     - NAMESPACE_ACCESSED: Namespace read (when read auditing enabled)  Collection actions:     - COLLECTION_CREATED: New collection created     - COLLECTION_UPDATED: Collection configuration modified     - COLLECTION_DELETED: Collection permanently removed     - COLLECTION_ACCESSED: Collection read (when read auditing enabled)  Bucket actions:     - BUCKET_CREATED: New bucket created     - BUCKET_UPDATED: Bucket configuration modified     - BUCKET_DELETED: Bucket permanently removed     - BUCKET_ACCESSED: Bucket read (when read auditing enabled)  Retriever actions:     - RETRIEVER_CREATED: New retriever pipeline created     - RETRIEVER_UPDATED: Retriever configuration modified     - RETRIEVER_DELETED: Retriever permanently removed     - RETRIEVER_ACCESSED: Retriever read (when read auditing enabled)     - RETRIEVER_QUERIED: Retriever query executed (when read auditing enabled)  Cluster actions:     - CLUSTER_CREATED: New cluster created     - CLUSTER_UPDATED: Cluster configuration modified     - CLUSTER_DELETED: Cluster permanently removed     - CLUSTER_EXECUTED: Cluster job executed     - CLUSTER_ACCESSED: Cluster read (when read auditing enabled)  Taxonomy actions:     - TAXONOMY_CREATED: New taxonomy created     - TAXONOMY_UPDATED: Taxonomy configuration modified     - TAXONOMY_DELETED: Taxonomy permanently removed     - TAXONOMY_ACCESSED: Taxonomy read (when read auditing enabled)
    """

    """
    allowed enum values
    """
    USER_CREATED = 'user_created'
    USER_UPDATED = 'user_updated'
    USER_DELETED = 'user_deleted'
    API_KEY_CREATED = 'api_key_created'
    API_KEY_ROTATED = 'api_key_rotated'
    API_KEY_REVOKED = 'api_key_revoked'
    API_KEY_SCOPE_UPDATED = 'api_key_scope_updated'
    PERMISSION_UPDATED = 'permission_updated'
    STORAGE_CONNECTION_CREATED = 'storage_connection_created'
    STORAGE_CONNECTION_UPDATED = 'storage_connection_updated'
    STORAGE_CONNECTION_DELETED = 'storage_connection_deleted'
    STORAGE_CONNECTION_TESTED = 'storage_connection_tested'
    STORAGE_CONNECTION_FAILED = 'storage_connection_failed'
    NAMESPACE_CREATED = 'namespace_created'
    NAMESPACE_UPDATED = 'namespace_updated'
    NAMESPACE_DELETED = 'namespace_deleted'
    NAMESPACE_ACCESSED = 'namespace_accessed'
    COLLECTION_CREATED = 'collection_created'
    COLLECTION_UPDATED = 'collection_updated'
    COLLECTION_DELETED = 'collection_deleted'
    COLLECTION_ACCESSED = 'collection_accessed'
    BUCKET_CREATED = 'bucket_created'
    BUCKET_UPDATED = 'bucket_updated'
    BUCKET_DELETED = 'bucket_deleted'
    BUCKET_ACCESSED = 'bucket_accessed'
    RETRIEVER_CREATED = 'retriever_created'
    RETRIEVER_UPDATED = 'retriever_updated'
    RETRIEVER_DELETED = 'retriever_deleted'
    RETRIEVER_ACCESSED = 'retriever_accessed'
    RETRIEVER_QUERIED = 'retriever_queried'
    CLUSTER_CREATED = 'cluster_created'
    CLUSTER_UPDATED = 'cluster_updated'
    CLUSTER_DELETED = 'cluster_deleted'
    CLUSTER_EXECUTED = 'cluster_executed'
    CLUSTER_ACCESSED = 'cluster_accessed'
    TAXONOMY_CREATED = 'taxonomy_created'
    TAXONOMY_UPDATED = 'taxonomy_updated'
    TAXONOMY_DELETED = 'taxonomy_deleted'
    TAXONOMY_ACCESSED = 'taxonomy_accessed'
    ALERT_CREATED = 'alert_created'
    ALERT_UPDATED = 'alert_updated'
    ALERT_DELETED = 'alert_deleted'
    ALERT_ACCESSED = 'alert_accessed'
    ALERT_TRIGGERED = 'alert_triggered'

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


