|
| 1 | +syntax = "proto3"; |
| 2 | + |
| 3 | +package monai.deploy.platform; |
| 4 | + |
| 5 | +option csharp_namespace = "Monai.Deploy.Platform.Grpc"; |
| 6 | +option go_package = "monaid.grpc"; |
| 7 | +option java_package = "com.monai.deploy.platform.grpc"; |
| 8 | + |
| 9 | +enum ErrorCode { |
| 10 | + // Request was successful. |
| 11 | + ERROR_SUCCESS = 0; |
| 12 | + |
| 13 | + // Request was malformed, or otherwise invalid. |
| 14 | + ERROR_BAD_REQUEST = 1; |
| 15 | + // Request authoriztion was malformed. |
| 16 | + ERROR_AUTHORIZATION_INVALID = 2; |
| 17 | + // Request user-agent was malformed. |
| 18 | + ERROR_USER_AGENT_INVALID = 3; |
| 19 | + // Request api-version was malformed. |
| 20 | + ERROR_VERSION_INVALID = 4; |
| 21 | + // Request api-version is unsupported. |
| 22 | + ERROR_VERSION_UNSUPPORTED = 5; |
| 23 | + |
| 24 | + // General authentication error occurred. |
| 25 | + ERROR_AUTHENTICATION = 1001; |
| 26 | + // Request is unauthorized. |
| 27 | + ERROR_UNAUTHORIZED = 1002; |
| 28 | + // User lacks sufficient privileges. |
| 29 | + ERROR_UNPRIVILEGED = 1003; |
| 30 | + |
| 31 | + // Authority is unavaialble. |
| 32 | + ERROR_AUTHORITY_UNAVAILABLE = 2001; |
| 33 | + // Kubernetes is unvailable. |
| 34 | + ERROR_CLUSTER_UNAVAILABLE = 2002; |
| 35 | + // Database is unavailble. |
| 36 | + ERROR_DATABASE_UNAVAILABLE = 2003; |
| 37 | + // Network is unavailable. |
| 38 | + ERROR_NETWORK_UNAVAILABLE = 2004; |
| 39 | + // Storage is unavailable or exhausted. |
| 40 | + ERROR_STORAGE_UNAVAILABLE = 2005; |
| 41 | + // Request timed out. |
| 42 | + ERROR_REQUEST_TIMED_OUT = 2006; |
| 43 | + // General internal error occurred. |
| 44 | + ERROR_UNHANDLED = 2007; |
| 45 | + |
| 46 | + // Generic job error occured. |
| 47 | + ERROR_JOB = 4001; |
| 48 | + // Job has been cancelled. |
| 49 | + // Cannot cancel a job more than once. |
| 50 | + // Cannot download from a cancelled job. |
| 51 | + ERROR_JOB_CANCELED = 4002; |
| 52 | + // Requested job has been deleted. |
| 53 | + ERROR_JOB_DELETED = 4003; |
| 54 | + // Provided job identifier is invalid. |
| 55 | + ERROR_JOB_ID_INVALID = 4004; |
| 56 | + // Provided job identifier is not associated with any known job. |
| 57 | + ERROR_JOB_ID_UNKNOWN = 4005; |
| 58 | + // Request job logs are currently unavailable. |
| 59 | + ERROR_JOB_LOGS_UNAVAILBLE = 4006; |
| 60 | + // Provided job-priority is invalid. |
| 61 | + ERROR_JOB_PRIORITY_INVALID = 4007; |
| 62 | + // Provided job-state is invalid. |
| 63 | + ERROR_JOB_STATE_INVALID = 4008; |
| 64 | + // Requested job has already stopped and cannot be cancelled. |
| 65 | + ERROR_JOB_STOPPED = 4009; |
| 66 | + // Unable to create job due to insufficient available resources. |
| 67 | + ERROR_JOB_UNSCHEDULABLE = 4010; |
| 68 | + // Requested job is unavailable. |
| 69 | + ERROR_JOB_UNAVAILABLE = 4011; |
| 70 | + |
| 71 | + // Generic MAP error occurred. |
| 72 | + ERROR_MAP = 5001; |
| 73 | + // Requested MAP has been deleted. |
| 74 | + ERROR_MAP_DELETED = 5002; |
| 75 | + // Provided MAP identifier is invalid. |
| 76 | + ERROR_MAP_ID_INVALID = 5003; |
| 77 | + // Provided MAP identifier is not assocaiated with any known MAP. |
| 78 | + ERROR_MAP_ID_UNKNOWN = 5004; |
| 79 | + // Provided MAP reference name already exists. |
| 80 | + // If the intent is to move the reference name to the new MAP, set take_reference_name = true. |
| 81 | + ERROR_MAP_NAME_DUPLICATE = 5005; |
| 82 | + // Provided MAP reference name is invalid. |
| 83 | + ERROR_MAP_NAME_INVALID = 5006; |
| 84 | + // Provided MAP reference name is not associated with any known MAP. |
| 85 | + ERROR_MAP_NAME_UNKNOWN = 5007; |
| 86 | + // Provided MAP state is invalid. |
| 87 | + ERROR_MAP_STATE_INVALID = 5008; |
| 88 | + // Provided MAP URN is already associated with a known MAP. |
| 89 | + ERROR_MAP_URN_DUPLICATE = 5009; |
| 90 | + // Provided MAP URN is invalid. |
| 91 | + ERROR_MAP_URN_INVALID = 5010; |
| 92 | + // Requested MAP is unavailable. |
| 93 | + ERROR_MAP_UNAVAILABLE = 5011; |
| 94 | + |
| 95 | + ERROR_PAYLOAD = 6001; |
| 96 | + // Requested payload has been deleted. |
| 97 | + ERROR_PAYLOAD_DELETED = 6002; |
| 98 | + // Payloads associated with pending or running jobs, or which have reference names cannot be deleted. |
| 99 | + ERROR_PAYLOAD_IN_USE = 6003; |
| 100 | + // Provided blob path is invalid. |
| 101 | + ERROR_PAYLOAD_BLOB_PATH_INVALID = 6004; |
| 102 | + // Provided blob path is not associated with any known payload blob. |
| 103 | + ERROR_PAYLOAD_BLOB_PATH_UNKNOWN = 6005; |
| 104 | + // Provided blob mode is invalid. |
| 105 | + ERROR_PAYLOAD_BLOB_MODE_INVALID = 6006; |
| 106 | + // Creation of empty payload blobs is not supported. |
| 107 | + ERROR_PAYLOAB_BLOB_EMPTY = 6007; |
| 108 | + // Provided payload identifier is invalid. |
| 109 | + ERROR_PAYLOAD_ID_INVALID = 6008; |
| 110 | + // Provided payload identifier is not assocaiated with any known payload. |
| 111 | + ERROR_PAYLOAD_ID_UNKNOWN = 6009; |
| 112 | + // Payloads associated with pending, running, or completed jobs cannot be modified. |
| 113 | + // Blobs cannot be added or removed from the payload. |
| 114 | + ERROR_PAYLOAD_IMMUTABLE = 6010; |
| 115 | + // Provided payload reference name already exists. |
| 116 | + // If the intent is to move the reference name to the new MAP, set take_reference_name = true. |
| 117 | + ERROR_PAYLOAD_NAME_DUPLICATE = 6011; |
| 118 | + // Provided payload reference name is invalid. |
| 119 | + ERROR_PAYLOAD_NAME_INVALID = 6012; |
| 120 | + // Provided payload reference name is not associated with any known payload. |
| 121 | + ERROR_PAYLOAD_NAME_UNKNOWN = 6013; |
| 122 | + // Requested payload is unavailable. |
| 123 | + ERROR_PAYLOAD_UNAVAILBLE = 6014; |
| 124 | + |
| 125 | + // Generic user error occurred. |
| 126 | + ERROR_USER = 7001; |
| 127 | + // Provided user identifier is invalid. |
| 128 | + ERROR_USER_ID_INVALID = 7002; |
| 129 | + // Provided user identifer not associated with any known user. |
| 130 | + ERROR_USER_ID_UNKNOWN = 7003; |
| 131 | +} |
0 commit comments