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

const (
	Textjobtype_ReportConfirmation Textjobtype = "report-confirmation"
	Textjobtype_ReportMessage      Textjobtype = "report-message"
)

var TextjobtypeAllValues = []Textjobtype{
	Textjobtype_ReportConfirmation,
	Textjobtype_ReportMessage,
}

func (e *Textjobtype) 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 "report-confirmation":
		*e = Textjobtype_ReportConfirmation
	case "report-message":
		*e = Textjobtype_ReportMessage
	default:
		return errors.New("jet: Invalid scan value '" + enumValue + "' for Textjobtype enum")
	}

	return nil
}

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