// Code generated by go generate; DO NOT EDIT.
package sentry

import (
	bytes "bytes"
	driver "database/sql/driver"
)

// Scan converts database string to BootstrapAgentTemplateType
func (e *BootstrapAgentTemplateType) Scan(value interface{}) error {
	s := value.([]byte)
	*e = BootstrapAgentTemplateType(BootstrapAgentTemplateType_value[string(s)])
	return nil
}

// Value converts BootstrapAgentTemplateType into database string
func (e BootstrapAgentTemplateType) Value() (driver.Value, error) {
	return BootstrapAgentTemplateType_name[int32(e)], nil
}

// MarshalJSON converts BootstrapAgentTemplateType to JSON
func (e BootstrapAgentTemplateType) MarshalJSON() ([]byte, error) {
	buffer := bytes.NewBufferString("\"")
	buffer.WriteString(e.String())
	buffer.WriteString("\"")
	return buffer.Bytes(), nil
}

// UnmarshalJSON converts BootstrapAgentTemplateType from JSON
func (e *BootstrapAgentTemplateType) UnmarshalJSON(b []byte) error {
	if b != nil {
		*e = BootstrapAgentTemplateType(BootstrapAgentTemplateType_value[string(b[1:len(b)-1])])
	}
	return nil
}

// implement proto enum interface
func (e BootstrapAgentTemplateType) IsEnum() {
}
