// Code generated by go-enum DO NOT EDIT.
// Version: v0.9.2

// Built By: go install

package v1alpha1

import (
	"fmt"
	"strings"
)

const (
	// RedisSentinelOpsRequestTypeUpdateVersion is a RedisSentinelOpsRequestType of type UpdateVersion.
	RedisSentinelOpsRequestTypeUpdateVersion RedisSentinelOpsRequestType = "UpdateVersion"
	// RedisSentinelOpsRequestTypeHorizontalScaling is a RedisSentinelOpsRequestType of type HorizontalScaling.
	RedisSentinelOpsRequestTypeHorizontalScaling RedisSentinelOpsRequestType = "HorizontalScaling"
	// RedisSentinelOpsRequestTypeVerticalScaling is a RedisSentinelOpsRequestType of type VerticalScaling.
	RedisSentinelOpsRequestTypeVerticalScaling RedisSentinelOpsRequestType = "VerticalScaling"
	// RedisSentinelOpsRequestTypeRestart is a RedisSentinelOpsRequestType of type Restart.
	RedisSentinelOpsRequestTypeRestart RedisSentinelOpsRequestType = "Restart"
	// RedisSentinelOpsRequestTypeReconfigure is a RedisSentinelOpsRequestType of type Reconfigure.
	RedisSentinelOpsRequestTypeReconfigure RedisSentinelOpsRequestType = "Reconfigure"
	// RedisSentinelOpsRequestTypeReconfigureTLS is a RedisSentinelOpsRequestType of type ReconfigureTLS.
	RedisSentinelOpsRequestTypeReconfigureTLS RedisSentinelOpsRequestType = "ReconfigureTLS"
	// RedisSentinelOpsRequestTypeRotateAuth is a RedisSentinelOpsRequestType of type RotateAuth.
	RedisSentinelOpsRequestTypeRotateAuth RedisSentinelOpsRequestType = "RotateAuth"
)

var ErrInvalidRedisSentinelOpsRequestType = fmt.Errorf("not a valid RedisSentinelOpsRequestType, try [%s]", strings.Join(_RedisSentinelOpsRequestTypeNames, ", "))

var _RedisSentinelOpsRequestTypeNames = []string{
	string(RedisSentinelOpsRequestTypeUpdateVersion),
	string(RedisSentinelOpsRequestTypeHorizontalScaling),
	string(RedisSentinelOpsRequestTypeVerticalScaling),
	string(RedisSentinelOpsRequestTypeRestart),
	string(RedisSentinelOpsRequestTypeReconfigure),
	string(RedisSentinelOpsRequestTypeReconfigureTLS),
	string(RedisSentinelOpsRequestTypeRotateAuth),
}

// RedisSentinelOpsRequestTypeNames returns a list of possible string values of RedisSentinelOpsRequestType.
func RedisSentinelOpsRequestTypeNames() []string {
	tmp := make([]string, len(_RedisSentinelOpsRequestTypeNames))
	copy(tmp, _RedisSentinelOpsRequestTypeNames)
	return tmp
}

// RedisSentinelOpsRequestTypeValues returns a list of the values for RedisSentinelOpsRequestType
func RedisSentinelOpsRequestTypeValues() []RedisSentinelOpsRequestType {
	return []RedisSentinelOpsRequestType{
		RedisSentinelOpsRequestTypeUpdateVersion,
		RedisSentinelOpsRequestTypeHorizontalScaling,
		RedisSentinelOpsRequestTypeVerticalScaling,
		RedisSentinelOpsRequestTypeRestart,
		RedisSentinelOpsRequestTypeReconfigure,
		RedisSentinelOpsRequestTypeReconfigureTLS,
		RedisSentinelOpsRequestTypeRotateAuth,
	}
}

// String implements the Stringer interface.
func (x RedisSentinelOpsRequestType) String() string {
	return string(x)
}

// IsValid provides a quick way to determine if the typed value is
// part of the allowed enumerated values
func (x RedisSentinelOpsRequestType) IsValid() bool {
	_, err := ParseRedisSentinelOpsRequestType(string(x))
	return err == nil
}

var _RedisSentinelOpsRequestTypeValue = map[string]RedisSentinelOpsRequestType{
	"UpdateVersion":     RedisSentinelOpsRequestTypeUpdateVersion,
	"HorizontalScaling": RedisSentinelOpsRequestTypeHorizontalScaling,
	"VerticalScaling":   RedisSentinelOpsRequestTypeVerticalScaling,
	"Restart":           RedisSentinelOpsRequestTypeRestart,
	"Reconfigure":       RedisSentinelOpsRequestTypeReconfigure,
	"ReconfigureTLS":    RedisSentinelOpsRequestTypeReconfigureTLS,
	"RotateAuth":        RedisSentinelOpsRequestTypeRotateAuth,
}

// ParseRedisSentinelOpsRequestType attempts to convert a string to a RedisSentinelOpsRequestType.
func ParseRedisSentinelOpsRequestType(name string) (RedisSentinelOpsRequestType, error) {
	if x, ok := _RedisSentinelOpsRequestTypeValue[name]; ok {
		return x, nil
	}
	return RedisSentinelOpsRequestType(""), fmt.Errorf("%s is %w", name, ErrInvalidRedisSentinelOpsRequestType)
}

// MustParseRedisSentinelOpsRequestType converts a string to a RedisSentinelOpsRequestType, and panics if is not valid.
func MustParseRedisSentinelOpsRequestType(name string) RedisSentinelOpsRequestType {
	val, err := ParseRedisSentinelOpsRequestType(name)
	if err != nil {
		panic(err)
	}
	return val
}
