# coding: utf-8

"""
    Lumos Connectors

    # The Lumos Connector API ## Intro This API is a self-describing API which allows third-party systems to easily integrate with Lumos. It provides endpoints to retrieve information about each connector, their capabilities.  We call individual libraries that proxy Lumos requests to app-specific requests, and then app-specific responses to Lumos responses, a **connector**.  ## How to use this API 1. You can call the `list_connector_app_ids` to see the list of available connector app IDs, e.g. `pagerduty`. One app ID is required to call most other APIs. 2. Calling `info` explains * what kind of authentication credentials the integration requires * which capabilities the integration supports * what input parameters are required for each capability for the given connector  ## Authenticating with a connector There are two broad categories of authentication - Shared Secret (e.g. API keys) and OAuth-like.  TODO: explain more details - look at `info.authentication_schema` - if it's OAuth - setup needs to call - `get_authorization_url` - `handle_authorization_callback` - steady state needs to call `refresh_access_token` - `validate_credentials` will check that your creds are good, and let you know what the unique tenant ID is  ## Reading customer account data TODO: write more docs - `list_resources` - `list_entitlements` - `find_entitlement_associations`  ## Pagination TODO: write more docs - `response.page.token` may contain an opaque string - pass this string back to the next request `request.page.token` to get the next set of data

    The version of the OpenAPI document: 0.0.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 ErrorCode(str, Enum):
    """
    ErrorCode
    """

    """
    allowed enum values
    """
    NOT_FOUND = 'not_found'
    INTERNAL_ERROR = 'internal_error'
    API_ERROR = 'api_error'
    UNAUTHORIZED = 'unauthorized'
    BAD_REQUEST = 'bad_request'
    PERMISSION_DENIED = 'permission_denied'
    NOT_IMPLEMENTED = 'not_implemented'
    UNEXPECTED_ERROR = 'unexpected_error'
    UNSUPPORTED_OPERATION = 'unsupported_operation'
    UNKNOWN_VALUE = 'unknown_value'
    INVALID_VALUE = 'invalid_value'
    UNAUTHENTICATED = 'Unauthenticated'
    REQUEST_TIMEOUT = 'Request_Timeout'
    CONNECTION_TIMEOUT = 'Connection_Timeout'
    CONNECTION_REJECTED = 'Connection_Rejected'
    RATE_LIMIT = 'Rate_Limit'
    AUTHENTICATION_EXPIRED = 'Authentication_Expired'
    SERVICE_ERROR = 'Service_Error'
    INVALID_RESPONSE = 'Invalid_Response'
    CLIENT_CALL_ERROR = 'Client_Call_Error'
    CONNECTION_CLOSED = 'Connection_Closed'
    CREDS_REVOKED = 'Creds_Revoked'
    INVALID_PAGE_TOKEN = 'Invalid_Page_Token'
    INTEGRATION_MISSING_PARAMETER = 'Integration_Missing_Parameter'

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


