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

const (
	Jobtype_AudioTranscode         Jobtype = "audio-transcode"
	Jobtype_CsvCommit              Jobtype = "csv-commit"
	Jobtype_CsvImport              Jobtype = "csv-import"
	Jobtype_LabelStudioAudioCreate Jobtype = "label-studio-audio-create"
	Jobtype_EmailSend              Jobtype = "email-send"
	Jobtype_TextRespond            Jobtype = "text-respond"
	Jobtype_TextSend               Jobtype = "text-send"
	Jobtype_ComplianceMailerSend   Jobtype = "compliance-mailer-send"
)

var JobtypeAllValues = []Jobtype{
	Jobtype_AudioTranscode,
	Jobtype_CsvCommit,
	Jobtype_CsvImport,
	Jobtype_LabelStudioAudioCreate,
	Jobtype_EmailSend,
	Jobtype_TextRespond,
	Jobtype_TextSend,
	Jobtype_ComplianceMailerSend,
}

func (e *Jobtype) 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 "audio-transcode":
		*e = Jobtype_AudioTranscode
	case "csv-commit":
		*e = Jobtype_CsvCommit
	case "csv-import":
		*e = Jobtype_CsvImport
	case "label-studio-audio-create":
		*e = Jobtype_LabelStudioAudioCreate
	case "email-send":
		*e = Jobtype_EmailSend
	case "text-respond":
		*e = Jobtype_TextRespond
	case "text-send":
		*e = Jobtype_TextSend
	case "compliance-mailer-send":
		*e = Jobtype_ComplianceMailerSend
	default:
		return errors.New("jet: Invalid scan value '" + enumValue + "' for Jobtype enum")
	}

	return nil
}

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