// SPDX-License-Identifier: Apache-2.0

// Discriminant tag constants for the ErrorDetails wire format.
//
// Table is stable — never reorder, never recycle IDs.
//
// | Tag | Variant                   |
// |----:|---------------------------|
// |   1 | ConstraintViolation       |
// |   2 | WriteConflict             |
// |   3 | DeadlineExceeded          |
// |   4 | PrevalidationRejected     |
// |   5 | AppendOnlyViolation       |
// |   6 | BalanceViolation          |
// |   7 | PeriodLocked              |
// |   8 | StateTransitionViolation  |
// |   9 | TransitionCheckViolation  |
// |  10 | TypeGuardViolation        |
// |  11 | RetentionViolation        |
// |  12 | LegalHoldActive           |
// |  13 | TypeMismatch              |
// |  14 | Overflow                  |
// |  15 | InsufficientBalance       |
// |  16 | RateExceeded              |
// |  17 | CollectionNotFound        |
// |  18 | DocumentNotFound          |
// |  19 | CollectionDraining        |
// |  20 | CollectionDeactivated     |
// |  21 | PlanError                 |
// |  22 | FanOutExceeded            |
// |  23 | SqlNotEnabled             |
// |  24 | AuthorizationDenied       |
// |  25 | AuthExpired               |
// |  26 | SyncConnectionFailed      |
// |  27 | SyncDeltaRejected         |
// |  28 | ShapeSubscriptionFailed   |
// |  29 | Storage                   |
// |  30 | SegmentCorrupted          |
// |  31 | ColdStorage               |
// |  32 | Wal                       |
// |  33 | Serialization             |
// |  34 | Codec                     |
// |  35 | Config                    |
// |  36 | BadRequest                |
// |  37 | NoLeader                  |
// |  38 | NotLeader                 |
// |  39 | MigrationInProgress       |
// |  40 | NodeUnreachable           |
// |  41 | Cluster                   |
// |  42 | MemoryExhausted           |
// |  43 | Encryption                |
// |  44 | Array                     |
// |  45 | Bridge                    |
// |  46 | Dispatch                  |
// |  47 | Internal                  |
// |  48 | UnsupportedOpcode         |
// |  49 | HandshakeFailed           |
// |  50 | TenantVectorDimExceeded   |
// |  51 | TenantGraphDepthExceeded  |
// |  52 | QuotaOvercommit           |
// |  53 | QuotaExceeded             |
// |  54 | ServerOverload            |
// |  55 | CloneDepthExceeded        |
// |  56 | CannotCloneMirror         |
// |  57 | CloneDependency           |
// |  58 | ClonePredatesQueryTime    |
// |  59 | MoveTenantDrainTimeout    |
// |  60 | MoveTenantPreflightFailed |
// |  61 | MoveTenantSnapshotFailed  |
// |  62 | MoveTenantCutoverFailed   |
// |  63 | MoveTenantAlreadyAtTarget |

pub(super) const TAG_CONSTRAINT_VIOLATION: u16 = 1;
pub(super) const TAG_WRITE_CONFLICT: u16 = 2;
pub(super) const TAG_DEADLINE_EXCEEDED: u16 = 3;
pub(super) const TAG_PREVALIDATION_REJECTED: u16 = 4;
pub(super) const TAG_APPEND_ONLY_VIOLATION: u16 = 5;
pub(super) const TAG_BALANCE_VIOLATION: u16 = 6;
pub(super) const TAG_PERIOD_LOCKED: u16 = 7;
pub(super) const TAG_STATE_TRANSITION_VIOLATION: u16 = 8;
pub(super) const TAG_TRANSITION_CHECK_VIOLATION: u16 = 9;
pub(super) const TAG_TYPE_GUARD_VIOLATION: u16 = 10;
pub(super) const TAG_RETENTION_VIOLATION: u16 = 11;
pub(super) const TAG_LEGAL_HOLD_ACTIVE: u16 = 12;
pub(super) const TAG_TYPE_MISMATCH: u16 = 13;
pub(super) const TAG_OVERFLOW: u16 = 14;
pub(super) const TAG_INSUFFICIENT_BALANCE: u16 = 15;
pub(super) const TAG_RATE_EXCEEDED: u16 = 16;
pub(super) const TAG_COLLECTION_NOT_FOUND: u16 = 17;
pub(super) const TAG_DOCUMENT_NOT_FOUND: u16 = 18;
pub(super) const TAG_COLLECTION_DRAINING: u16 = 19;
pub(super) const TAG_COLLECTION_DEACTIVATED: u16 = 20;
pub(super) const TAG_PLAN_ERROR: u16 = 21;
pub(super) const TAG_FAN_OUT_EXCEEDED: u16 = 22;
pub(super) const TAG_SQL_NOT_ENABLED: u16 = 23;
pub(super) const TAG_AUTHORIZATION_DENIED: u16 = 24;
pub(super) const TAG_AUTH_EXPIRED: u16 = 25;
pub(super) const TAG_SYNC_CONNECTION_FAILED: u16 = 26;
pub(super) const TAG_SYNC_DELTA_REJECTED: u16 = 27;
pub(super) const TAG_SHAPE_SUBSCRIPTION_FAILED: u16 = 28;
pub(super) const TAG_STORAGE: u16 = 29;
pub(super) const TAG_SEGMENT_CORRUPTED: u16 = 30;
pub(super) const TAG_COLD_STORAGE: u16 = 31;
pub(super) const TAG_WAL: u16 = 32;
pub(super) const TAG_SERIALIZATION: u16 = 33;
pub(super) const TAG_CODEC: u16 = 34;
pub(super) const TAG_CONFIG: u16 = 35;
pub(super) const TAG_BAD_REQUEST: u16 = 36;
pub(super) const TAG_NO_LEADER: u16 = 37;
pub(super) const TAG_NOT_LEADER: u16 = 38;
pub(super) const TAG_MIGRATION_IN_PROGRESS: u16 = 39;
pub(super) const TAG_NODE_UNREACHABLE: u16 = 40;
pub(super) const TAG_CLUSTER: u16 = 41;
pub(super) const TAG_MEMORY_EXHAUSTED: u16 = 42;
pub(super) const TAG_ENCRYPTION: u16 = 43;
pub(super) const TAG_ARRAY: u16 = 44;
pub(super) const TAG_BRIDGE: u16 = 45;
pub(super) const TAG_DISPATCH: u16 = 46;
pub(super) const TAG_INTERNAL: u16 = 47;
pub(super) const TAG_UNSUPPORTED_OPCODE: u16 = 48;
pub(super) const TAG_HANDSHAKE_FAILED: u16 = 49;
pub(super) const TAG_TENANT_VECTOR_DIM_EXCEEDED: u16 = 50;
pub(super) const TAG_TENANT_GRAPH_DEPTH_EXCEEDED: u16 = 51;
pub(super) const TAG_QUOTA_OVERCOMMIT: u16 = 52;
pub(super) const TAG_QUOTA_EXCEEDED: u16 = 53;
pub(super) const TAG_SERVER_OVERLOAD: u16 = 54;
pub(super) const TAG_CLONE_DEPTH_EXCEEDED: u16 = 55;
pub(super) const TAG_CANNOT_CLONE_MIRROR: u16 = 56;
pub(super) const TAG_CLONE_DEPENDENCY: u16 = 57;
pub(super) const TAG_CLONE_PREDATES_QUERY_TIME: u16 = 58;
pub(super) const TAG_MOVE_TENANT_DRAIN_TIMEOUT: u16 = 59;
pub(super) const TAG_MOVE_TENANT_PREFLIGHT_FAILED: u16 = 60;
pub(super) const TAG_MOVE_TENANT_SNAPSHOT_FAILED: u16 = 61;
pub(super) const TAG_MOVE_TENANT_CUTOVER_FAILED: u16 = 62;
pub(super) const TAG_MOVE_TENANT_ALREADY_AT_TARGET: u16 = 63;
pub(super) const TAG_MIRROR_READ_ONLY: u16 = 64;
pub(super) const TAG_STALE_READ_NOT_LEADER: u16 = 65;
pub(super) const TAG_MIRROR_NOT_PROMOTED: u16 = 66;
