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

package quotas

import (
	"fmt"
)

const _LeaseActionName = "unknownloadedcreateddeletedallow"

var _LeaseActionIndex = [...]uint8{0, 7, 13, 20, 27, 32}

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

var _LeaseActionValues = []LeaseAction{0, 1, 2, 3, 4}

var _LeaseActionNameToValueMap = map[string]LeaseAction{
	_LeaseActionName[0:7]:   0,
	_LeaseActionName[7:13]:  1,
	_LeaseActionName[13:20]: 2,
	_LeaseActionName[20:27]: 3,
	_LeaseActionName[27:32]: 4,
}

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

// LeaseActionValues returns all values of the enum
func LeaseActionValues() []LeaseAction {
	return _LeaseActionValues
}

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