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

package enums

import (
	"fmt"
	"strings"
)

const _StreamingModeName = "AUTOTRUEFALSE"

var _StreamingModeIndex = [...]uint8{0, 4, 8, 13}

const _StreamingModeLowerName = "autotruefalse"

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

// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
func _StreamingModeNoOp() {
	var x [1]struct{}
	_ = x[StreamingModeAuto-(0)]
	_ = x[StreamingModeTrue-(1)]
	_ = x[StreamingModeFalse-(2)]
}

var _StreamingModeValues = []StreamingMode{StreamingModeAuto, StreamingModeTrue, StreamingModeFalse}

var _StreamingModeNameToValueMap = map[string]StreamingMode{
	_StreamingModeName[0:4]:       StreamingModeAuto,
	_StreamingModeLowerName[0:4]:  StreamingModeAuto,
	_StreamingModeName[4:8]:       StreamingModeTrue,
	_StreamingModeLowerName[4:8]:  StreamingModeTrue,
	_StreamingModeName[8:13]:      StreamingModeFalse,
	_StreamingModeLowerName[8:13]: StreamingModeFalse,
}

var _StreamingModeNames = []string{
	_StreamingModeName[0:4],
	_StreamingModeName[4:8],
	_StreamingModeName[8:13],
}

// StreamingModeString retrieves an enum value from the enum constants string name.
// Throws an error if the param is not part of the enum.
func StreamingModeString(s string) (StreamingMode, error) {
	if val, ok := _StreamingModeNameToValueMap[s]; ok {
		return val, nil
	}

	if val, ok := _StreamingModeNameToValueMap[strings.ToLower(s)]; ok {
		return val, nil
	}
	return 0, fmt.Errorf("%s does not belong to StreamingMode values", s)
}

// StreamingModeValues returns all values of the enum
func StreamingModeValues() []StreamingMode {
	return _StreamingModeValues
}

// StreamingModeStrings returns a slice of all String values of the enum
func StreamingModeStrings() []string {
	strs := make([]string, len(_StreamingModeNames))
	copy(strs, _StreamingModeNames)
	return strs
}

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