//
// Code generated by go-jet DO NOT EDIT.
//
// WARNING: Changes to this file may cause incorrect behavior
// and will be lost if the code is regenerated
//

package model

import "errors"

type Poolconditiontype string

const (
	Poolconditiontype_Blue      Poolconditiontype = "blue"
	Poolconditiontype_Dry       Poolconditiontype = "dry"
	Poolconditiontype_FalsePool Poolconditiontype = "false pool"
	Poolconditiontype_Unknown   Poolconditiontype = "unknown"
	Poolconditiontype_Green     Poolconditiontype = "green"
	Poolconditiontype_Murky     Poolconditiontype = "murky"
)

var PoolconditiontypeAllValues = []Poolconditiontype{
	Poolconditiontype_Blue,
	Poolconditiontype_Dry,
	Poolconditiontype_FalsePool,
	Poolconditiontype_Unknown,
	Poolconditiontype_Green,
	Poolconditiontype_Murky,
}

func (e *Poolconditiontype) Scan(value interface{}) error {
	var enumValue string
	switch val := value.(type) {
	case string:
		enumValue = val
	case []byte:
		enumValue = string(val)
	default:
		return errors.New("jet: Invalid scan value for AllTypesEnum enum. Enum value has to be of type string or []byte")
	}

	switch enumValue {
	case "blue":
		*e = Poolconditiontype_Blue
	case "dry":
		*e = Poolconditiontype_Dry
	case "false pool":
		*e = Poolconditiontype_FalsePool
	case "unknown":
		*e = Poolconditiontype_Unknown
	case "green":
		*e = Poolconditiontype_Green
	case "murky":
		*e = Poolconditiontype_Murky
	default:
		return errors.New("jet: Invalid scan value '" + enumValue + "' for Poolconditiontype enum")
	}

	return nil
}

func (e Poolconditiontype) String() string {
	return string(e)
}
