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

const (
	Mappingdestinationparcel_Apn         Mappingdestinationparcel = "apn"
	Mappingdestinationparcel_Description Mappingdestinationparcel = "description"
)

var MappingdestinationparcelAllValues = []Mappingdestinationparcel{
	Mappingdestinationparcel_Apn,
	Mappingdestinationparcel_Description,
}

func (e *Mappingdestinationparcel) 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 "apn":
		*e = Mappingdestinationparcel_Apn
	case "description":
		*e = Mappingdestinationparcel_Description
	default:
		return errors.New("jet: Invalid scan value '" + enumValue + "' for Mappingdestinationparcel enum")
	}

	return nil
}

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