// Code generated by "stringer -type=MessageType"; DO NOT EDIT.

package peer_protocol

import "strconv"

const (
	_MessageType_name_0 = "ChokeUnchokeInterestedNotInterestedHaveBitfieldRequestPieceCancelPort"
	_MessageType_name_1 = "SuggestHaveAllHaveNoneRejectAllowedFast"
	_MessageType_name_2 = "Extended"
)

var (
	_MessageType_index_0 = [...]uint8{0, 5, 12, 22, 35, 39, 47, 54, 59, 65, 69}
	_MessageType_index_1 = [...]uint8{0, 7, 14, 22, 28, 39}
)

func (i MessageType) String() string {
	switch {
	case i <= 9:
		return _MessageType_name_0[_MessageType_index_0[i]:_MessageType_index_0[i+1]]
	case 13 <= i && i <= 17:
		i -= 13
		return _MessageType_name_1[_MessageType_index_1[i]:_MessageType_index_1[i+1]]
	case i == 20:
		return _MessageType_name_2
	default:
		return "MessageType(" + strconv.FormatInt(int64(i), 10) + ")"
	}
}
