//
// 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 Progress string

const (
	Progress_NotStarted Progress = "not-started"
	Progress_InProgress Progress = "in-progress"
	Progress_Complete   Progress = "complete"
)

var ProgressAllValues = []Progress{
	Progress_NotStarted,
	Progress_InProgress,
	Progress_Complete,
}

func (e *Progress) 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 "not-started":
		*e = Progress_NotStarted
	case "in-progress":
		*e = Progress_InProgress
	case "complete":
		*e = Progress_Complete
	default:
		return errors.New("jet: Invalid scan value '" + enumValue + "' for Progress enum")
	}

	return nil
}

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