func EnvironmentOrDefault(input *Environment, defaultValue ...Environment) Environment {
	if input == nil {
		if len(defaultValue) > 0 {
			return defaultValue[0]
		}
		return ""
	}
	return *input
}
EnvironmentOrDefault returns the default value (or empty string) if input is nil, otherwise returns the referenced value.
package v2alpha1
import (
	"github.com/arangodb/kube-arangodb/pkg/util/errors"
)
type Environment string
const (
	EnvironmentDevelopment Environment = "Development"
	EnvironmentProduction Environment = "Production"
)
func (e Environment) Validate() error {
	switch e {
	case EnvironmentDevelopment, EnvironmentProduction:
		return nil
	default:
		return errors.WithStack(errors.Wrapf(ValidationError, "Unknown environment: '%s'", string(e)))
	}
}
func (e Environment) IsProduction() bool {
	return e == EnvironmentProduction
}
func NewEnvironment(input Environment) *Environment {
	return &input
}
func NewEnvironmentOrNil(input *Environment) *Environment {
	if input == nil {
		return nil
	}
	return NewEnvironment(*input)
}