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

package logical

import (
	"fmt"
)

const _TokenTypeName = "defaultservicebatchdefault-servicedefault-batch"

var _TokenTypeIndex = [...]uint8{0, 7, 14, 19, 34, 47}

func (i TokenType) String() string {
	if i >= TokenType(len(_TokenTypeIndex)-1) {
		return fmt.Sprintf("TokenType(%d)", i)
	}
	return _TokenTypeName[_TokenTypeIndex[i]:_TokenTypeIndex[i+1]]
}

var _TokenTypeValues = []TokenType{0, 1, 2, 3, 4}

var _TokenTypeNameToValueMap = map[string]TokenType{
	_TokenTypeName[0:7]:   0,
	_TokenTypeName[7:14]:  1,
	_TokenTypeName[14:19]: 2,
	_TokenTypeName[19:34]: 3,
	_TokenTypeName[34:47]: 4,
}

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

// TokenTypeValues returns all values of the enum
func TokenTypeValues() []TokenType {
	return _TokenTypeValues
}

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