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

const (
	Reportlogtype_Created      Reportlogtype = "created"
	Reportlogtype_Invalidated  Reportlogtype = "invalidated"
	Reportlogtype_MessageEmail Reportlogtype = "message-email"
	Reportlogtype_MessageText  Reportlogtype = "message-text"
	Reportlogtype_Reviewed     Reportlogtype = "reviewed"
	Reportlogtype_Scheduled    Reportlogtype = "scheduled"
	Reportlogtype_Treated      Reportlogtype = "treated"
)

var ReportlogtypeAllValues = []Reportlogtype{
	Reportlogtype_Created,
	Reportlogtype_Invalidated,
	Reportlogtype_MessageEmail,
	Reportlogtype_MessageText,
	Reportlogtype_Reviewed,
	Reportlogtype_Scheduled,
	Reportlogtype_Treated,
}

func (e *Reportlogtype) 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 "created":
		*e = Reportlogtype_Created
	case "invalidated":
		*e = Reportlogtype_Invalidated
	case "message-email":
		*e = Reportlogtype_MessageEmail
	case "message-text":
		*e = Reportlogtype_MessageText
	case "reviewed":
		*e = Reportlogtype_Reviewed
	case "scheduled":
		*e = Reportlogtype_Scheduled
	case "treated":
		*e = Reportlogtype_Treated
	default:
		return errors.New("jet: Invalid scan value '" + enumValue + "' for Reportlogtype enum")
	}

	return nil
}

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