// Code generated by "enumer -type=ClientTokenSource -trimprefix=ClientTokenFrom -transform=snake"; DO NOT EDIT.

package logical

import (
	"fmt"
)

const _ClientTokenSourceName = "no_client_tokenvault_headerauthz_headerinternal_auth"

var _ClientTokenSourceIndex = [...]uint8{0, 15, 27, 39, 52}

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

var _ClientTokenSourceValues = []ClientTokenSource{0, 1, 2, 3}

var _ClientTokenSourceNameToValueMap = map[string]ClientTokenSource{
	_ClientTokenSourceName[0:15]:  0,
	_ClientTokenSourceName[15:27]: 1,
	_ClientTokenSourceName[27:39]: 2,
	_ClientTokenSourceName[39:52]: 3,
}

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

// ClientTokenSourceValues returns all values of the enum
func ClientTokenSourceValues() []ClientTokenSource {
	return _ClientTokenSourceValues
}

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