// Code generated by "enumer -type=DsnErrCode -output=dsn_err_string.go"; DO NOT EDIT.

package base

import (
	"fmt"
)

const _DsnErrCodeName = "ERR_OKERR_UNKNOWNERR_REPLICATION_FAILUREERR_APP_EXISTERR_APP_NOT_EXISTERR_APP_DROPPEDERR_BUSY_CREATINGERR_BUSY_DROPPINGERR_EXPIREDERR_LOCK_ALREADY_EXISTERR_HOLD_BY_OTHERSERR_RECURSIVE_LOCKERR_NO_OWNERERR_NODE_ALREADY_EXISTERR_INCONSISTENT_STATEERR_ARRAY_INDEX_OUT_OF_RANGEERR_SERVICE_NOT_FOUNDERR_SERVICE_ALREADY_RUNNINGERR_IO_PENDINGERR_TIMEOUTERR_SERVICE_NOT_ACTIVEERR_BUSYERR_NETWORK_INIT_FAILEDERR_FORWARD_TO_OTHERSERR_OBJECT_NOT_FOUNDERR_HANDLER_NOT_FOUNDERR_LEARN_FILE_FAILEDERR_GET_LEARN_STATE_FAILEDERR_INVALID_VERSIONERR_INVALID_PARAMETERSERR_CAPACITY_EXCEEDEDERR_INVALID_STATEERR_INACTIVE_STATEERR_NOT_ENOUGH_MEMBERERR_FILE_OPERATION_FAILEDERR_HANDLE_EOFERR_WRONG_CHECKSUMERR_INVALID_DATAERR_INVALID_HANDLEERR_INCOMPLETE_DATAERR_VERSION_OUTDATEDERR_PATH_NOT_FOUNDERR_PATH_ALREADY_EXISTERR_ADDRESS_ALREADY_USEDERR_STATE_FREEZEDERR_LOCAL_APP_FAILUREERR_BIND_IOCP_FAILEDERR_NETWORK_START_FAILEDERR_NOT_IMPLEMENTEDERR_CHECKPOINT_FAILEDERR_WRONG_TIMINGERR_NO_NEED_OPERATEERR_CORRUPTIONERR_TRY_AGAINERR_CLUSTER_NOT_FOUNDERR_CLUSTER_ALREADY_EXISTERR_SERVICE_ALREADY_EXISTERR_INJECTEDERR_NETWORK_FAILUREERR_UNDER_RECOVERYERR_OPERATION_DISABLEDERR_ZOOKEEPER_OPERATIONERR_CHILD_REGISTEREDERR_INGESTION_FAILEDERR_UNAUTHENTICATEDERR_KRB5_INTERNALERR_SASL_INTERNALERR_SASL_INCOMPLETEERR_ACL_DENYERR_SPLITTINGERR_PARENT_PARTITION_MISUSEDERR_CHILD_NOT_READYERR_DISK_INSUFFICIENT"

var _DsnErrCodeIndex = [...]uint16{0, 6, 17, 40, 53, 70, 85, 102, 119, 130, 152, 170, 188, 200, 222, 244, 272, 293, 320, 334, 345, 367, 375, 398, 419, 439, 460, 481, 507, 526, 548, 569, 586, 604, 625, 650, 664, 682, 698, 716, 735, 755, 773, 795, 819, 836, 857, 877, 901, 920, 941, 957, 976, 990, 1003, 1024, 1049, 1074, 1086, 1105, 1123, 1145, 1168, 1188, 1208, 1227, 1244, 1261, 1280, 1292, 1305, 1333, 1352, 1373}

func (i DsnErrCode) String() string {
	if i < 0 || i >= DsnErrCode(len(_DsnErrCodeIndex)-1) {
		return fmt.Sprintf("DsnErrCode(%d)", i)
	}
	return _DsnErrCodeName[_DsnErrCodeIndex[i]:_DsnErrCodeIndex[i+1]]
}

var _DsnErrCodeValues = []DsnErrCode{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72}

var _DsnErrCodeNameToValueMap = map[string]DsnErrCode{
	_DsnErrCodeName[0:6]:       0,
	_DsnErrCodeName[6:17]:      1,
	_DsnErrCodeName[17:40]:     2,
	_DsnErrCodeName[40:53]:     3,
	_DsnErrCodeName[53:70]:     4,
	_DsnErrCodeName[70:85]:     5,
	_DsnErrCodeName[85:102]:    6,
	_DsnErrCodeName[102:119]:   7,
	_DsnErrCodeName[119:130]:   8,
	_DsnErrCodeName[130:152]:   9,
	_DsnErrCodeName[152:170]:   10,
	_DsnErrCodeName[170:188]:   11,
	_DsnErrCodeName[188:200]:   12,
	_DsnErrCodeName[200:222]:   13,
	_DsnErrCodeName[222:244]:   14,
	_DsnErrCodeName[244:272]:   15,
	_DsnErrCodeName[272:293]:   16,
	_DsnErrCodeName[293:320]:   17,
	_DsnErrCodeName[320:334]:   18,
	_DsnErrCodeName[334:345]:   19,
	_DsnErrCodeName[345:367]:   20,
	_DsnErrCodeName[367:375]:   21,
	_DsnErrCodeName[375:398]:   22,
	_DsnErrCodeName[398:419]:   23,
	_DsnErrCodeName[419:439]:   24,
	_DsnErrCodeName[439:460]:   25,
	_DsnErrCodeName[460:481]:   26,
	_DsnErrCodeName[481:507]:   27,
	_DsnErrCodeName[507:526]:   28,
	_DsnErrCodeName[526:548]:   29,
	_DsnErrCodeName[548:569]:   30,
	_DsnErrCodeName[569:586]:   31,
	_DsnErrCodeName[586:604]:   32,
	_DsnErrCodeName[604:625]:   33,
	_DsnErrCodeName[625:650]:   34,
	_DsnErrCodeName[650:664]:   35,
	_DsnErrCodeName[664:682]:   36,
	_DsnErrCodeName[682:698]:   37,
	_DsnErrCodeName[698:716]:   38,
	_DsnErrCodeName[716:735]:   39,
	_DsnErrCodeName[735:755]:   40,
	_DsnErrCodeName[755:773]:   41,
	_DsnErrCodeName[773:795]:   42,
	_DsnErrCodeName[795:819]:   43,
	_DsnErrCodeName[819:836]:   44,
	_DsnErrCodeName[836:857]:   45,
	_DsnErrCodeName[857:877]:   46,
	_DsnErrCodeName[877:901]:   47,
	_DsnErrCodeName[901:920]:   48,
	_DsnErrCodeName[920:941]:   49,
	_DsnErrCodeName[941:957]:   50,
	_DsnErrCodeName[957:976]:   51,
	_DsnErrCodeName[976:990]:   52,
	_DsnErrCodeName[990:1003]:  53,
	_DsnErrCodeName[1003:1024]: 54,
	_DsnErrCodeName[1024:1049]: 55,
	_DsnErrCodeName[1049:1074]: 56,
	_DsnErrCodeName[1074:1086]: 57,
	_DsnErrCodeName[1086:1105]: 58,
	_DsnErrCodeName[1105:1123]: 59,
	_DsnErrCodeName[1123:1145]: 60,
	_DsnErrCodeName[1145:1168]: 61,
	_DsnErrCodeName[1168:1188]: 62,
	_DsnErrCodeName[1188:1208]: 63,
	_DsnErrCodeName[1208:1227]: 64,
	_DsnErrCodeName[1227:1244]: 65,
	_DsnErrCodeName[1244:1261]: 66,
	_DsnErrCodeName[1261:1280]: 67,
	_DsnErrCodeName[1280:1292]: 68,
	_DsnErrCodeName[1292:1305]: 69,
	_DsnErrCodeName[1305:1333]: 70,
	_DsnErrCodeName[1333:1352]: 71,
	_DsnErrCodeName[1352:1373]: 72,
}

// DsnErrCodeString retrieves an enum value from the enum constants string name.
// Throws an error if the param is not part of the enum.
func DsnErrCodeString(s string) (DsnErrCode, error) {
	if val, ok := _DsnErrCodeNameToValueMap[s]; ok {
		return val, nil
	}
	return 0, fmt.Errorf("%s does not belong to DsnErrCode values", s)
}

// DsnErrCodeValues returns all values of the enum
func DsnErrCodeValues() []DsnErrCode {
	return _DsnErrCodeValues
}

// IsADsnErrCode returns "true" if the value is listed in the enum definition. "false" otherwise
func (i DsnErrCode) IsADsnErrCode() bool {
	for _, v := range _DsnErrCodeValues {
		if i == v {
			return true
		}
	}
	return false
}
