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

// Built By: go install

package v1alpha1

import (
	"fmt"
	"strings"
)

const (
	// MongoDBOpsRequestTypeUpdateVersion is a MongoDBOpsRequestType of type UpdateVersion.
	MongoDBOpsRequestTypeUpdateVersion MongoDBOpsRequestType = "UpdateVersion"
	// MongoDBOpsRequestTypeHorizontalScaling is a MongoDBOpsRequestType of type HorizontalScaling.
	MongoDBOpsRequestTypeHorizontalScaling MongoDBOpsRequestType = "HorizontalScaling"
	// MongoDBOpsRequestTypeVerticalScaling is a MongoDBOpsRequestType of type VerticalScaling.
	MongoDBOpsRequestTypeVerticalScaling MongoDBOpsRequestType = "VerticalScaling"
	// MongoDBOpsRequestTypeVolumeExpansion is a MongoDBOpsRequestType of type VolumeExpansion.
	MongoDBOpsRequestTypeVolumeExpansion MongoDBOpsRequestType = "VolumeExpansion"
	// MongoDBOpsRequestTypeRestart is a MongoDBOpsRequestType of type Restart.
	MongoDBOpsRequestTypeRestart MongoDBOpsRequestType = "Restart"
	// MongoDBOpsRequestTypeReconfigure is a MongoDBOpsRequestType of type Reconfigure.
	MongoDBOpsRequestTypeReconfigure MongoDBOpsRequestType = "Reconfigure"
	// MongoDBOpsRequestTypeReconfigureTLS is a MongoDBOpsRequestType of type ReconfigureTLS.
	MongoDBOpsRequestTypeReconfigureTLS MongoDBOpsRequestType = "ReconfigureTLS"
	// MongoDBOpsRequestTypeReprovision is a MongoDBOpsRequestType of type Reprovision.
	MongoDBOpsRequestTypeReprovision MongoDBOpsRequestType = "Reprovision"
	// MongoDBOpsRequestTypeRotateAuth is a MongoDBOpsRequestType of type RotateAuth.
	MongoDBOpsRequestTypeRotateAuth MongoDBOpsRequestType = "RotateAuth"
	// MongoDBOpsRequestTypeHorizons is a MongoDBOpsRequestType of type Horizons.
	MongoDBOpsRequestTypeHorizons MongoDBOpsRequestType = "Horizons"
	// MongoDBOpsRequestTypeStorageMigration is a MongoDBOpsRequestType of type StorageMigration.
	MongoDBOpsRequestTypeStorageMigration MongoDBOpsRequestType = "StorageMigration"
)

var ErrInvalidMongoDBOpsRequestType = fmt.Errorf("not a valid MongoDBOpsRequestType, try [%s]", strings.Join(_MongoDBOpsRequestTypeNames, ", "))

var _MongoDBOpsRequestTypeNames = []string{
	string(MongoDBOpsRequestTypeUpdateVersion),
	string(MongoDBOpsRequestTypeHorizontalScaling),
	string(MongoDBOpsRequestTypeVerticalScaling),
	string(MongoDBOpsRequestTypeVolumeExpansion),
	string(MongoDBOpsRequestTypeRestart),
	string(MongoDBOpsRequestTypeReconfigure),
	string(MongoDBOpsRequestTypeReconfigureTLS),
	string(MongoDBOpsRequestTypeReprovision),
	string(MongoDBOpsRequestTypeRotateAuth),
	string(MongoDBOpsRequestTypeHorizons),
	string(MongoDBOpsRequestTypeStorageMigration),
}

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

// MongoDBOpsRequestTypeValues returns a list of the values for MongoDBOpsRequestType
func MongoDBOpsRequestTypeValues() []MongoDBOpsRequestType {
	return []MongoDBOpsRequestType{
		MongoDBOpsRequestTypeUpdateVersion,
		MongoDBOpsRequestTypeHorizontalScaling,
		MongoDBOpsRequestTypeVerticalScaling,
		MongoDBOpsRequestTypeVolumeExpansion,
		MongoDBOpsRequestTypeRestart,
		MongoDBOpsRequestTypeReconfigure,
		MongoDBOpsRequestTypeReconfigureTLS,
		MongoDBOpsRequestTypeReprovision,
		MongoDBOpsRequestTypeRotateAuth,
		MongoDBOpsRequestTypeHorizons,
		MongoDBOpsRequestTypeStorageMigration,
	}
}

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

var _MongoDBOpsRequestTypeValue = map[string]MongoDBOpsRequestType{
	"UpdateVersion":     MongoDBOpsRequestTypeUpdateVersion,
	"HorizontalScaling": MongoDBOpsRequestTypeHorizontalScaling,
	"VerticalScaling":   MongoDBOpsRequestTypeVerticalScaling,
	"VolumeExpansion":   MongoDBOpsRequestTypeVolumeExpansion,
	"Restart":           MongoDBOpsRequestTypeRestart,
	"Reconfigure":       MongoDBOpsRequestTypeReconfigure,
	"ReconfigureTLS":    MongoDBOpsRequestTypeReconfigureTLS,
	"Reprovision":       MongoDBOpsRequestTypeReprovision,
	"RotateAuth":        MongoDBOpsRequestTypeRotateAuth,
	"Horizons":          MongoDBOpsRequestTypeHorizons,
	"StorageMigration":  MongoDBOpsRequestTypeStorageMigration,
}

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

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