com.xiaomi.infra.galaxy.sds.thrift.ErrorCode Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.xiaomi.infra.galaxy.sds.thrift;
import java.util.Map;
import java.util.HashMap;
import libthrift091.TEnum;
/**
* 错误码列表,用于逻辑层错误
*/
public enum ErrorCode implements libthrift091.TEnum {
/**
* 系统内部错误
*/
INTERNAL_ERROR(1),
/**
* 系统不可用
*/
SERVICE_UNAVAILABLE(2),
/**
* 未知错误
*/
UNKNOWN(3),
END_OF_INTERNAL_ERROR(20),
/**
* 无访问对应资源权限
*/
ACCESS_DENIED(21),
/**
* 无效参数
*/
VALIDATION_FAILED(22),
/**
* 长度超限(大小,数目等)
*/
SIZE_EXCEED(23),
/**
* 空间配额超限
*/
QUOTA_EXCEED(24),
/**
* 表读写配额超限
*/
THROUGHPUT_EXCEED(25),
/**
* 资源不存在(如表,应用)
*/
RESOURCE_NOT_FOUND(26),
/**
* 资源已存在(如表)
*/
RESOURCE_ALREADY_EXISTS(27),
/**
* 资源暂时不可用(如表并发管理操作加锁尚未释放)
*/
RESOURCE_UNAVAILABLE(28),
/**
* 客户端API版本不支持
*/
UNSUPPORTED_VERSION(29),
/**
* 暂时不支持的操作
*/
UNSUPPORTED_OPERATION(30),
/**
* 无效的认证信息(签名不正确,不包含签名过期)
*/
INVALID_AUTH(31),
/**
* 客户端时钟不同步
*/
CLOCK_TOO_SKEWED(32),
/**
* HTTP请求过大
*/
REQUEST_TOO_LARGE(33),
/**
* 无效请求
*/
BAD_REQUEST(34),
/**
* HTTP传输层错误
*/
TTRANSPORT_ERROR(35),
/**
* 不支持的thrift协议类型
*/
UNSUPPORTED_TPROTOCOL(36),
/**
* 请求超时
*
*/
REQUEST_TIMEOUT(37);
private final int value;
private ErrorCode(int value) {
this.value = value;
}
/**
* Get the integer value of this enum value, as defined in the Thrift IDL.
*/
public int getValue() {
return value;
}
/**
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
public static ErrorCode findByValue(int value) {
switch (value) {
case 1:
return INTERNAL_ERROR;
case 2:
return SERVICE_UNAVAILABLE;
case 3:
return UNKNOWN;
case 20:
return END_OF_INTERNAL_ERROR;
case 21:
return ACCESS_DENIED;
case 22:
return VALIDATION_FAILED;
case 23:
return SIZE_EXCEED;
case 24:
return QUOTA_EXCEED;
case 25:
return THROUGHPUT_EXCEED;
case 26:
return RESOURCE_NOT_FOUND;
case 27:
return RESOURCE_ALREADY_EXISTS;
case 28:
return RESOURCE_UNAVAILABLE;
case 29:
return UNSUPPORTED_VERSION;
case 30:
return UNSUPPORTED_OPERATION;
case 31:
return INVALID_AUTH;
case 32:
return CLOCK_TOO_SKEWED;
case 33:
return REQUEST_TOO_LARGE;
case 34:
return BAD_REQUEST;
case 35:
return TTRANSPORT_ERROR;
case 36:
return UNSUPPORTED_TPROTOCOL;
case 37:
return REQUEST_TIMEOUT;
default:
return null;
}
}
}