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

const (
	Mosquitospecies_None            Mosquitospecies = "none"
	Mosquitospecies_AedesAegypti    Mosquitospecies = "aedes aegypti"
	Mosquitospecies_AedesAlbopictus Mosquitospecies = "aedes albopictus"
	Mosquitospecies_CulexPipiens    Mosquitospecies = "culex pipiens"
	Mosquitospecies_CulexTarsalis   Mosquitospecies = "culex tarsalis"
)

var MosquitospeciesAllValues = []Mosquitospecies{
	Mosquitospecies_None,
	Mosquitospecies_AedesAegypti,
	Mosquitospecies_AedesAlbopictus,
	Mosquitospecies_CulexPipiens,
	Mosquitospecies_CulexTarsalis,
}

func (e *Mosquitospecies) 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 "none":
		*e = Mosquitospecies_None
	case "aedes aegypti":
		*e = Mosquitospecies_AedesAegypti
	case "aedes albopictus":
		*e = Mosquitospecies_AedesAlbopictus
	case "culex pipiens":
		*e = Mosquitospecies_CulexPipiens
	case "culex tarsalis":
		*e = Mosquitospecies_CulexTarsalis
	default:
		return errors.New("jet: Invalid scan value '" + enumValue + "' for Mosquitospecies enum")
	}

	return nil
}

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