# coding: utf-8

"""
    File Service API v2

    File Service API v2 - Main endpoints (excludes token and tenant management)

    The version of the OpenAPI document: 0.1.0
    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 Permission(str, Enum):
    """
    Permission types defined in permissions schema.
    """

    """
    allowed enum values
    """
    MEMBER = 'member'
    MANAGE = 'manage'
    VIEW = 'view'
    EDIT = 'edit'
    EXECUTE = 'execute'
    ARCHIVE = 'archive'
    TENANT_ACCESS = 'tenant_access'
    CONTROLTAG_ACCESS = 'controltag_access'
    CONTROLTAG_MANAGE = 'controltag_manage'
    INFOSECLEVEL_ACCESS = 'infoseclevel_access'
    INFOSECLEVEL_MANAGE = 'infoseclevel_manage'
    ACCESS_OWN_MANAGE = 'access_own_manage'
    ACCESS_ADMINISTRATE_MANAGE = 'access_administrate_manage'
    ACCESS_EDIT_MANAGE = 'access_edit_manage'
    ACCESS_VIEW_MANAGE = 'access_view_manage'
    UPSTREAM_REMOTE_SYNC = 'upstream_remote_sync'
    ACCESS = 'access'

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