# 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 NamespaceOperation(str, Enum):
    """
    Granular operations that can be scoped inside a namespace.  These operations are used to define fine-grained permissions for API keys and users within specific namespaces. Operations can be granted individually or in combination to implement least-privilege access control.  Data operations:     - READ_DATA: View and search documents, retrieve objects from buckets     - WRITE_DATA: Create and update documents, upload objects to buckets     - DELETE_DATA: Remove documents and objects permanently  Retrieval operations:     - EXECUTE_RETRIEVER: Run search queries using configured retrievers     - CREATE_RETRIEVER: Define new retrieval pipelines with custom stages     - DELETE_RETRIEVER: Remove retrieval pipeline configurations  Job execution:     - EXECUTE_JOB: Trigger ingestion pipelines and batch processing jobs     - CANCEL_JOB: Abort running jobs before completion  Cluster management (Ray infrastructure):     - CREATE_CLUSTER: Provision new Ray compute clusters     - DELETE_CLUSTER: Tear down existing compute clusters     - MODIFY_CLUSTER: Scale or reconfigure running clusters  Infrastructure configuration:     - MODIFY_INFRASTRUCTURE: Change namespace settings, storage connections     - MANAGE_PERMISSIONS: Grant and revoke user access within the namespace  Examples:     - Read-only access: [READ_DATA, EXECUTE_RETRIEVER]     - Data engineer access: [READ_DATA, WRITE_DATA, EXECUTE_JOB]     - Full namespace admin: All operations granted
    """

    """
    allowed enum values
    """
    READ_DATA = 'read_data'
    WRITE_DATA = 'write_data'
    DELETE_DATA = 'delete_data'
    EXECUTE_RETRIEVER = 'execute_retriever'
    CREATE_RETRIEVER = 'create_retriever'
    DELETE_RETRIEVER = 'delete_retriever'
    EXECUTE_JOB = 'execute_job'
    CANCEL_JOB = 'cancel_job'
    CREATE_CLUSTER = 'create_cluster'
    DELETE_CLUSTER = 'delete_cluster'
    MODIFY_CLUSTER = 'modify_cluster'
    MODIFY_INFRASTRUCTURE = 'modify_infrastructure'
    MANAGE_PERMISSIONS = 'manage_permissions'

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


