// Code generated by "enumer -type=ParseMode -trimprefix=ParseMode -transform=snake_upper"; DO NOT EDIT.

package enums

import (
	"fmt"
	"strings"
)

const _ParseModeName = "UNSPECIFIEDFALLBACKNO_MEMEFISHMEMEFISH_ONLY"

var _ParseModeIndex = [...]uint8{0, 11, 19, 30, 43}

const _ParseModeLowerName = "unspecifiedfallbackno_memefishmemefish_only"

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

// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
func _ParseModeNoOp() {
	var x [1]struct{}
	_ = x[ParseModeUnspecified-(0)]
	_ = x[ParseModeFallback-(1)]
	_ = x[ParseModeNoMemefish-(2)]
	_ = x[ParseModeMemefishOnly-(3)]
}

var _ParseModeValues = []ParseMode{ParseModeUnspecified, ParseModeFallback, ParseModeNoMemefish, ParseModeMemefishOnly}

var _ParseModeNameToValueMap = map[string]ParseMode{
	_ParseModeName[0:11]:       ParseModeUnspecified,
	_ParseModeLowerName[0:11]:  ParseModeUnspecified,
	_ParseModeName[11:19]:      ParseModeFallback,
	_ParseModeLowerName[11:19]: ParseModeFallback,
	_ParseModeName[19:30]:      ParseModeNoMemefish,
	_ParseModeLowerName[19:30]: ParseModeNoMemefish,
	_ParseModeName[30:43]:      ParseModeMemefishOnly,
	_ParseModeLowerName[30:43]: ParseModeMemefishOnly,
}

var _ParseModeNames = []string{
	_ParseModeName[0:11],
	_ParseModeName[11:19],
	_ParseModeName[19:30],
	_ParseModeName[30:43],
}

// ParseModeString retrieves an enum value from the enum constants string name.
// Throws an error if the param is not part of the enum.
func ParseModeString(s string) (ParseMode, error) {
	if val, ok := _ParseModeNameToValueMap[s]; ok {
		return val, nil
	}

	if val, ok := _ParseModeNameToValueMap[strings.ToLower(s)]; ok {
		return val, nil
	}
	return 0, fmt.Errorf("%s does not belong to ParseMode values", s)
}

// ParseModeValues returns all values of the enum
func ParseModeValues() []ParseMode {
	return _ParseModeValues
}

// ParseModeStrings returns a slice of all String values of the enum
func ParseModeStrings() []string {
	strs := make([]string, len(_ParseModeNames))
	copy(strs, _ParseModeNames)
	return strs
}

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