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

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

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

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

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

// UnmarshalJSON converts ParalusConditionStatus from JSON
func (e *ParalusConditionStatus) UnmarshalJSON(b []byte) error {
	if b != nil {
		var length int
		if len(b) > 1 {
			length = len(b) - 1
		} else {
			length = len(b)
		}
		*e = ParalusConditionStatus(ParalusConditionStatus_value[string(b[1:length])])
	}
	return nil
}

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