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

const (
	H3aggregationtype_MosquitoSource H3aggregationtype = "MosquitoSource"
	H3aggregationtype_ServiceRequest H3aggregationtype = "ServiceRequest"
	H3aggregationtype_Trap           H3aggregationtype = "Trap"
)

var H3aggregationtypeAllValues = []H3aggregationtype{
	H3aggregationtype_MosquitoSource,
	H3aggregationtype_ServiceRequest,
	H3aggregationtype_Trap,
}

func (e *H3aggregationtype) 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 "MosquitoSource":
		*e = H3aggregationtype_MosquitoSource
	case "ServiceRequest":
		*e = H3aggregationtype_ServiceRequest
	case "Trap":
		*e = H3aggregationtype_Trap
	default:
		return errors.New("jet: Invalid scan value '" + enumValue + "' for H3aggregationtype enum")
	}

	return nil
}

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