// Code generated by "enumer -type=EnforceConsistency -trimprefix=EnforceConsistency"; DO NOT EDIT.

package cache

import (
	"fmt"
)

const _EnforceConsistencyName = "NeverAlways"

var _EnforceConsistencyIndex = [...]uint8{0, 5, 11}

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

var _EnforceConsistencyValues = []EnforceConsistency{0, 1}

var _EnforceConsistencyNameToValueMap = map[string]EnforceConsistency{
	_EnforceConsistencyName[0:5]:  0,
	_EnforceConsistencyName[5:11]: 1,
}

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

// EnforceConsistencyValues returns all values of the enum
func EnforceConsistencyValues() []EnforceConsistency {
	return _EnforceConsistencyValues
}

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