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

// Built By: go install

package v1alpha1

import (
	"fmt"
	"strings"
)

const (
	// HanaDBOpsRequestTypeUpdateVersion is a HanaDBOpsRequestType of type UpdateVersion.
	HanaDBOpsRequestTypeUpdateVersion HanaDBOpsRequestType = "UpdateVersion"
	// HanaDBOpsRequestTypeHorizontalScaling is a HanaDBOpsRequestType of type HorizontalScaling.
	HanaDBOpsRequestTypeHorizontalScaling HanaDBOpsRequestType = "HorizontalScaling"
	// HanaDBOpsRequestTypeVerticalScaling is a HanaDBOpsRequestType of type VerticalScaling.
	HanaDBOpsRequestTypeVerticalScaling HanaDBOpsRequestType = "VerticalScaling"
	// HanaDBOpsRequestTypeVolumeExpansion is a HanaDBOpsRequestType of type VolumeExpansion.
	HanaDBOpsRequestTypeVolumeExpansion HanaDBOpsRequestType = "VolumeExpansion"
	// HanaDBOpsRequestTypeRestart is a HanaDBOpsRequestType of type Restart.
	HanaDBOpsRequestTypeRestart HanaDBOpsRequestType = "Restart"
	// HanaDBOpsRequestTypeReconfigure is a HanaDBOpsRequestType of type Reconfigure.
	HanaDBOpsRequestTypeReconfigure HanaDBOpsRequestType = "Reconfigure"
	// HanaDBOpsRequestTypeReconfigureTLS is a HanaDBOpsRequestType of type ReconfigureTLS.
	HanaDBOpsRequestTypeReconfigureTLS HanaDBOpsRequestType = "ReconfigureTLS"
	// HanaDBOpsRequestTypeRotateAuth is a HanaDBOpsRequestType of type RotateAuth.
	HanaDBOpsRequestTypeRotateAuth HanaDBOpsRequestType = "RotateAuth"
	// HanaDBOpsRequestTypeStorageMigration is a HanaDBOpsRequestType of type StorageMigration.
	HanaDBOpsRequestTypeStorageMigration HanaDBOpsRequestType = "StorageMigration"
)

var ErrInvalidHanaDBOpsRequestType = fmt.Errorf("not a valid HanaDBOpsRequestType, try [%s]", strings.Join(_HanaDBOpsRequestTypeNames, ", "))

var _HanaDBOpsRequestTypeNames = []string{
	string(HanaDBOpsRequestTypeUpdateVersion),
	string(HanaDBOpsRequestTypeHorizontalScaling),
	string(HanaDBOpsRequestTypeVerticalScaling),
	string(HanaDBOpsRequestTypeVolumeExpansion),
	string(HanaDBOpsRequestTypeRestart),
	string(HanaDBOpsRequestTypeReconfigure),
	string(HanaDBOpsRequestTypeReconfigureTLS),
	string(HanaDBOpsRequestTypeRotateAuth),
	string(HanaDBOpsRequestTypeStorageMigration),
}

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

// HanaDBOpsRequestTypeValues returns a list of the values for HanaDBOpsRequestType
func HanaDBOpsRequestTypeValues() []HanaDBOpsRequestType {
	return []HanaDBOpsRequestType{
		HanaDBOpsRequestTypeUpdateVersion,
		HanaDBOpsRequestTypeHorizontalScaling,
		HanaDBOpsRequestTypeVerticalScaling,
		HanaDBOpsRequestTypeVolumeExpansion,
		HanaDBOpsRequestTypeRestart,
		HanaDBOpsRequestTypeReconfigure,
		HanaDBOpsRequestTypeReconfigureTLS,
		HanaDBOpsRequestTypeRotateAuth,
		HanaDBOpsRequestTypeStorageMigration,
	}
}

// String implements the Stringer interface.
func (x HanaDBOpsRequestType) 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 HanaDBOpsRequestType) IsValid() bool {
	_, err := ParseHanaDBOpsRequestType(string(x))
	return err == nil
}

var _HanaDBOpsRequestTypeValue = map[string]HanaDBOpsRequestType{
	"UpdateVersion":     HanaDBOpsRequestTypeUpdateVersion,
	"HorizontalScaling": HanaDBOpsRequestTypeHorizontalScaling,
	"VerticalScaling":   HanaDBOpsRequestTypeVerticalScaling,
	"VolumeExpansion":   HanaDBOpsRequestTypeVolumeExpansion,
	"Restart":           HanaDBOpsRequestTypeRestart,
	"Reconfigure":       HanaDBOpsRequestTypeReconfigure,
	"ReconfigureTLS":    HanaDBOpsRequestTypeReconfigureTLS,
	"RotateAuth":        HanaDBOpsRequestTypeRotateAuth,
	"StorageMigration":  HanaDBOpsRequestTypeStorageMigration,
}

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

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