#
# Copyright (c) 2025, Neptune Labs Sp. z o.o.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from enum import Enum


class ApiErrorTypeDTO(str, Enum):
    ACTIVE_PROJECTS_QUOTA_COULD_NOT_BE_CHANGED = "ACTIVE_PROJECTS_QUOTA_COULD_NOT_BE_CHANGED"
    ADMIN_CANNOT_LEAVE_PROJECT = "ADMIN_CANNOT_LEAVE_PROJECT"
    CANNOT_ADD_MANAGER_TO_INDIVIDUAL_PROJECT = "CANNOT_ADD_MANAGER_TO_INDIVIDUAL_PROJECT"
    CANNOT_ADD_MEMBERS_TO_PRIVATE_INDIVIDUAL_PROJECT = "CANNOT_ADD_MEMBERS_TO_PRIVATE_INDIVIDUAL_PROJECT"
    CANNOT_ADD_OUTSIDERS_TO_TEAM_PROJECT = "CANNOT_ADD_OUTSIDERS_TO_TEAM_PROJECT"
    CANNOT_LEAVE_TEAM_PROJECT = "CANNOT_LEAVE_TEAM_PROJECT"
    CANNOT_MANAGE_ORGANIZATION_OWNER_IN_PROJECT = "CANNOT_MANAGE_ORGANIZATION_OWNER_IN_PROJECT"
    INSUFFICIENT_ACTIVE_PROJECTS_QUOTA = "INSUFFICIENT_ACTIVE_PROJECTS_QUOTA"
    LIMIT_OF_ACTIVE_PROJECTS_QUOTA_REACHED = "LIMIT_OF_ACTIVE_PROJECTS_QUOTA_REACHED"
    LIMIT_OF_ACTIVE_PROJECTS_REACHED = "LIMIT_OF_ACTIVE_PROJECTS_REACHED"
    LIMIT_OF_MEMBERS_IN_ORGANIZATION_REACHED = "LIMIT_OF_MEMBERS_IN_ORGANIZATION_REACHED"
    LIMIT_OF_PROJECTS_REACHED = "LIMIT_OF_PROJECTS_REACHED"
    LIMIT_OF_PROJECT_MEMBERS_REACHED = "LIMIT_OF_PROJECT_MEMBERS_REACHED"
    LIMIT_OF_SERVICE_ACCOUNTS_IN_ORGANIZATION_REACHED = "LIMIT_OF_SERVICE_ACCOUNTS_IN_ORGANIZATION_REACHED"
    PAYMENTS_NOT_SUPPORTED = "PAYMENTS_NOT_SUPPORTED"
    PLAN_NOT_AVAILABLE = "PLAN_NOT_AVAILABLE"
    PROJECT_KEY_COLLISION = "PROJECT_KEY_COLLISION"
    PROJECT_KEY_INVALID = "PROJECT_KEY_INVALID"
    PROJECT_NAME_COLLISION = "PROJECT_NAME_COLLISION"
    PROJECT_NAME_INVALID = "PROJECT_NAME_INVALID"
    PROJECT_VISIBILITY_NOT_SUPPORTED_FOR_IAAC = "PROJECT_VISIBILITY_NOT_SUPPORTED_FOR_IAAC"
    SERVICE_ACCOUNT_ALREADY_EXISTS_IN_ORGANIZATION = "SERVICE_ACCOUNT_ALREADY_EXISTS_IN_ORGANIZATION"
    SERVICE_ACCOUNT_NOT_IN_PROJECT = "SERVICE_ACCOUNT_NOT_IN_PROJECT"
    USER_NOT_IN_PROJECT = "USER_NOT_IN_PROJECT"
    USER_STILL_OWNS_SOME_ORGANIZATIONS = "USER_STILL_OWNS_SOME_ORGANIZATIONS"
    VISIBILITY_RESTRICTED = "VISIBILITY_RESTRICTED"
    WORKSPACE_READONLY = "WORKSPACE_READONLY"

    def __str__(self) -> str:
        return str(self.value)
