# coding: utf-8

"""
Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
"""
from __future__ import annotations

from enum import Enum
from json import loads
from typing import Self


class Acl(str, Enum):
    """
    API key permissions:  `addObject`: required to add or update records, copy or move an index. `analytics`: required to access the Analytics API. `browse`: required to view records `deleteIndex`: required to delete indices. `deleteObject`: required to delete records. `editSettings`: required to change index settings. `inference`: required to access the Inference API. `listIndexes`: required to list indices. `logs`: required to access logs of search and indexing operations. `recommendation`: required to access the Personalization and Recommend APIs. `search`: required to search records `seeUnretrievableAttributes`: required to retrieve [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) for all operations that return records. `settings`: required to examine index settings.
    """

    """
    allowed enum values
    """
    ADDOBJECT = "addObject"
    ANALYTICS = "analytics"
    BROWSE = "browse"
    DELETEOBJECT = "deleteObject"
    DELETEINDEX = "deleteIndex"
    EDITSETTINGS = "editSettings"
    INFERENCE = "inference"
    LISTINDEXES = "listIndexes"
    LOGS = "logs"
    PERSONALIZATION = "personalization"
    RECOMMENDATION = "recommendation"
    SEARCH = "search"
    SEEUNRETRIEVABLEATTRIBUTES = "seeUnretrievableAttributes"
    SETTINGS = "settings"
    USAGE = "usage"

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