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

const (
	Notificationtype_OAuthTokenInvalidated Notificationtype = "oauth_token_invalidated"
)

var NotificationtypeAllValues = []Notificationtype{
	Notificationtype_OAuthTokenInvalidated,
}

func (e *Notificationtype) 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 "oauth_token_invalidated":
		*e = Notificationtype_OAuthTokenInvalidated
	default:
		return errors.New("jet: Invalid scan value '" + enumValue + "' for Notificationtype enum")
	}

	return nil
}

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