package messagecatalog

// MessageID .
type MessageID uint64

const sidx = 2000

const (
	// Default1 .
	Default1 MessageID = iota + sidx
	// COMPUTE NODE
	INFO_GET_ALL_SERVERS_BEGIN
	ERR_GET_ALL_SERVERS_FAILED
	INFO_GET_ALL_SERVERS_END
	INFO_GET_SERVER_BEGIN
	ERR_GET_SERVER_FAILED
	INFO_GET_SERVER_END
	INFO_CREATE_SERVER_BEGIN
	ERR_CREATE_SERVER_FAILED
	INFO_CREATE_SERVER_END
	INFO_DELETE_SERVER_BEGIN
	ERR_DELETE_SERVER_FAILED
	INFO_DELETE_SERVER_END

	//VOLUME
	INFO_GET_ALL_VOLUME_INFO_BEGIN
	ERR_GET_ALL_VOLUME_INFO_FAILED
	INFO_GET_ALL_VOLUME_INFO_END
	INFO_CREATE_VOLUME_BEGIN
	ERR_CREATE_VOLUME_FAILED
	INFO_CREATE_VOLUME_END
	INFO_DELETE_VOLUME_BEGIN
	ERR_DELETE_VOLUME_FAILED
	INFO_DELETE_VOLUME_END
	INFO_ADD_VOLUME_TO_COMPUTE_NODE_BEGIN
	ERR_ADD_VOLUME_TO_COMPUTE_NODE_FAILED
	INFO_ADD_VOLUME_TO_COMPUTE_NODE_END
	INFO_REMOVE_VOLUME_FROM_COMPUTE_NODE_BEGIN
	ERR_REMOVE_VOLUME_FROM_COMPUTE_NODE_FAILED
	INFO_REMOVE_VOLUME_FROM_COMPUTE_NODE_END

	// STORAGE POOLS
	INFO_GET_ALL_STORAGE_POOLS_BEGIN
	ERR_GET_ALL_STORAGE_POOLS_FAILED
	INFO_GET_ALL_STORAGE_POOLS_END
	INFO_GET_STORAGE_POOL_BEGIN
	ERR_GET_STORAGE_POOL_FAILED
	INFO_GET_STORAGE_POOL_END

	// STORAGE PORTS
	INFO_GET_ALL_STORAGE_PORTS_BEGIN
	ERR_GET_ALL_STORAGE_PORTS_FAILED
	INFO_GET_ALL_STORAGE_PORTS_END

	INFO_GET_PORT_BEGIN
	ERR_GET_PORT_FAILED
	INFO_GET_PORT_END
	INFO_GET_PORT_AUTH_SETTINGS_BEGIN
	ERR_GET_PORT_AUTH_SETTINGS_FAILED
	INFO_GET_PORT_AUTH_SETTINGS_END

	//CHAP USERS
	INFO_GET_ALL_CHAPUSERS_BEGIN
	ERR_GET_ALL_CHAPUSERS_FAILED
	INFO_GET_ALL_CHAPUSERS_END
	INFO_GET_CHAP_USER_BEGIN
	ERR_GET_CHAP_USER_FAILED
	INFO_GET_CHAP_USER_END
	INFO_CREATE_CHAP_USER_BEGIN
	ERR_CREATE_CHAP_USER_FAILED
	INFO_CREATE_CHAP_USER_END
	INFO_DELETE_CHAP_USER_BEGIN
	ERR_DELETE_CHAP_USER_FAILED
	INFO_DELETE_CHAP_USER_END
	INFO_UPDATE_CHAP_USER_BEGIN
	ERR_UPDATE_CHAP_USER_FAILED
	INFO_UPDATE_CHAP_USER_END
)

var enumStrings = map[interface{}]string{
	Default1: "Default1",
	// COMPUTE NODE - SERVER
	INFO_GET_ALL_SERVERS_BEGIN: "INFO_GET_ALL_SERVERS_BEGIN",
	ERR_GET_ALL_SERVERS_FAILED: "ERR_GET_ALL_SERVERS_FAILED",
	INFO_GET_ALL_SERVERS_END:   "INFO_GET_ALL_SERVERS_END",
	INFO_GET_SERVER_BEGIN:      "INFO_GET_SERVER_BEGIN",
	ERR_GET_SERVER_FAILED:      "ERR_GET_SERVER_FAILED",
	INFO_GET_SERVER_END:        "INFO_GET_SERVER_END",
	INFO_CREATE_SERVER_BEGIN:   "INFO_CREATE_SERVER_BEGIN",
	ERR_CREATE_SERVER_FAILED:   "ERR_CREATE_SERVER_FAILED",
	INFO_CREATE_SERVER_END:     "INFO_CREATE_SERVER_END",
	INFO_DELETE_SERVER_BEGIN:   "INFO_DELETE_SERVER_BEGIN",
	ERR_DELETE_SERVER_FAILED:   "ERR_DELETE_SERVER_FAILED",
	INFO_DELETE_SERVER_END:     "INFO_DELETE_SERVER_END",
	//VOLUME
	INFO_GET_ALL_VOLUME_INFO_BEGIN:             "INFO_GET_ALL_VOLUME_INFO_BEGIN",
	ERR_GET_ALL_VOLUME_INFO_FAILED:             "ERR_GET_ALL_VOLUME_INFO_FAILED",
	INFO_GET_ALL_VOLUME_INFO_END:               "INFO_GET_ALL_VOLUME_INFO_END",
	INFO_CREATE_VOLUME_BEGIN:                   "INFO_CREATE_VOLUME_BEGIN",
	ERR_CREATE_VOLUME_FAILED:                   "ERR_CREATE_VOLUME_FAILED",
	INFO_CREATE_VOLUME_END:                     "INFO_CREATE_VOLUME_END",
	INFO_DELETE_VOLUME_BEGIN:                   "INFO_DELETE_VOLUME_BEGIN",
	ERR_DELETE_VOLUME_FAILED:                   "ERR_DELETE_VOLUME_FAILED",
	INFO_DELETE_VOLUME_END:                     "INFO_DELETE_VOLUME_END",
	INFO_ADD_VOLUME_TO_COMPUTE_NODE_BEGIN:      "INFO_ADD_VOLUME_TO_COMPUTE_NODE_BEGIN",
	ERR_ADD_VOLUME_TO_COMPUTE_NODE_FAILED:      "ERR_ADD_VOLUME_TO_COMPUTE_NODE_FAILED",
	INFO_ADD_VOLUME_TO_COMPUTE_NODE_END:        "INFO_ADD_VOLUME_TO_COMPUTE_NODE_END",
	INFO_REMOVE_VOLUME_FROM_COMPUTE_NODE_BEGIN: "INFO_REMOVE_VOLUME_FROM_COMPUTE_NODE_BEGIN",
	ERR_REMOVE_VOLUME_FROM_COMPUTE_NODE_FAILED: "ERR_REMOVE_VOLUME_FROM_COMPUTE_NODE_FAILED",
	INFO_REMOVE_VOLUME_FROM_COMPUTE_NODE_END:   "INFO_REMOVE_VOLUME_FROM_COMPUTE_NODE_END",

	// STORAGE POOLS
	INFO_GET_ALL_STORAGE_POOLS_BEGIN: "INFO_GET_ALL_STORAGE_POOLS_BEGIN",
	ERR_GET_ALL_STORAGE_POOLS_FAILED: "ERR_GET_ALL_STORAGE_POOLS_FAILED",
	INFO_GET_ALL_STORAGE_POOLS_END:   "INFO_GET_ALL_STORAGE_POOLS_END",
	INFO_GET_STORAGE_POOL_BEGIN:      "INFO_GET_STORAGE_POOL_BEGIN",
	ERR_GET_STORAGE_POOL_FAILED:      "ERR_GET_STORAGE_POOL_FAILED",
	INFO_GET_STORAGE_POOL_END:        "INFO_GET_STORAGE_POOL_END",
	// STORAGE PORTS
	INFO_GET_ALL_STORAGE_PORTS_BEGIN: "INFO_GET_ALL_STORAGE_PORTS_BEGIN",
	ERR_GET_ALL_STORAGE_PORTS_FAILED: "ERR_GET_ALL_STORAGE_PORTS_FAILED",
	INFO_GET_ALL_STORAGE_PORTS_END:   "INFO_GET_ALL_STORAGE_PORTS_END",

	INFO_GET_PORT_BEGIN:               "INFO_GET_PORT_BEGIN",
	ERR_GET_PORT_FAILED:               "ERR_GET_PORT_FAILED",
	INFO_GET_PORT_END:                 "INFO_GET_PORT_END",
	INFO_GET_PORT_AUTH_SETTINGS_BEGIN: "INFO_GET_PORT_AUTH_SETTINGS_BEGIN",
	ERR_GET_PORT_AUTH_SETTINGS_FAILED: "ERR_GET_PORT_AUTH_SETTINGS_FAILED",
	INFO_GET_PORT_AUTH_SETTINGS_END:   "INFO_GET_PORT_AUTH_SETTINGS_END",

	//CHAP USERS
	INFO_GET_ALL_CHAPUSERS_BEGIN: "INFO_GET_ALL_CHAPUSERS_BEGIN",
	ERR_GET_ALL_CHAPUSERS_FAILED: "ERR_GET_ALL_CHAPUSERS_FAILED",
	INFO_GET_ALL_CHAPUSERS_END:   "INFO_GET_ALL_CHAPUSERS_END",
	INFO_GET_CHAP_USER_BEGIN:     "INFO_GET_CHAP_USER_BEGIN",
	ERR_GET_CHAP_USER_FAILED:     "ERR_GET_CHAP_USER_FAILED",
	INFO_GET_CHAP_USER_END:       "INFO_GET_CHAP_USER_END",
	INFO_CREATE_CHAP_USER_BEGIN:  "INFO_CREATE_CHAP_USER_BEGIN",
	ERR_CREATE_CHAP_USER_FAILED:  "ERR_CREATE_CHAP_USER_FAILED",
	INFO_CREATE_CHAP_USER_END:    "INFO_CREATE_CHAP_USER_END",
	INFO_DELETE_CHAP_USER_BEGIN:  "INFO_DELETE_CHAP_USER_BEGIN",
	ERR_DELETE_CHAP_USER_FAILED:  "ERR_DELETE_CHAP_USER_FAILED",
	INFO_DELETE_CHAP_USER_END:    "INFO_DELETE_CHAP_USER_END",
	INFO_UPDATE_CHAP_USER_BEGIN:  "INFO_UPDATE_CHAP_USER_BEGIN",
	ERR_UPDATE_CHAP_USER_FAILED:  "ERR_UPDATE_CHAP_USER_FAILED",
	INFO_UPDATE_CHAP_USER_END:    "INFO_UPDATE_CHAP_USER_END",
}

func (s MessageID) String() string { return enumStrings[s] }

// GetEnumString .
func GetEnumString(m interface{}) string {
	if m, ok := m.(MessageID); ok {
		return m.String()
	}

	return "UNKNOWN"
}
