from enum import Enum
from fastapi import status


class GrpcToHttp(Enum):
    OK = status.HTTP_200_OK
    CANCELLED = status.HTTP_500_INTERNAL_SERVER_ERROR
    UNKNOWN = status.HTTP_500_INTERNAL_SERVER_ERROR
    INVALID_ARGUMENT = status.HTTP_400_BAD_REQUEST
    DEADLINE_EXCEEDED = status.HTTP_504_GATEWAY_TIMEOUT
    NOT_FOUND = status.HTTP_404_NOT_FOUND
    ALREADY_EXISTS = status.HTTP_409_CONFLICT
    PERMISSION_DENIED = status.HTTP_403_FORBIDDEN
    RESOURCE_EXHAUSTED = status.HTTP_429_TOO_MANY_REQUESTS
    FAILED_PRECONDITION = status.HTTP_400_BAD_REQUEST
    ABORTED = status.HTTP_409_CONFLICT
    OUT_OF_RANGE = status.HTTP_400_BAD_REQUEST
    UNIMPLEMENTED = status.HTTP_501_NOT_IMPLEMENTED
    INTERNAL = status.HTTP_500_INTERNAL_SERVER_ERROR
    UNAVAILABLE = status.HTTP_503_SERVICE_UNAVAILABLE
    DATA_LOSS = status.HTTP_500_INTERNAL_SERVER_ERROR
    UNAUTHENTICATED = status.HTTP_401_UNAUTHORIZED