blob: 1c783d804fa590ac91caff626dd9d0a25ada5fa2 [file] [log] [blame]
////////////////////////////////////////////////////////////////////////////////
// Do not modify!
// Generated by codergen
////////////////////////////////////////////////////////////////////////////////
package log
import (
"fmt"
"android.googlesource.com/platform/tools/gpu/binary/schema"
)
var ConstantValues schema.Constants
var _Severity_map = map[Severity]string{}
func init() {
_Severity_map[0] = "Emergency"
_Severity_map[1] = "Alert"
_Severity_map[2] = "Critical"
_Severity_map[3] = "Error"
_Severity_map[4] = "Warning"
_Severity_map[5] = "Notice"
_Severity_map[6] = "Info"
_Severity_map[7] = "Debug"
ConstantValues = append(ConstantValues, schema.ConstantSet{
Type: &schema.Primitive{Name: "Severity", Method: schema.Int32},
Entries: []schema.Constant{
{Name: "Emergency", Value: int32(0)},
{Name: "Alert", Value: int32(1)},
{Name: "Critical", Value: int32(2)},
{Name: "Error", Value: int32(3)},
{Name: "Warning", Value: int32(4)},
{Name: "Notice", Value: int32(5)},
{Name: "Info", Value: int32(6)},
{Name: "Debug", Value: int32(7)},
},
})
}
func (v Severity) String() string {
if s, ok := _Severity_map[v]; ok {
return s
}
return fmt.Sprintf("Severity(%d)", v)
}
func (v *Severity) Parse(s string) error {
for k, t := range _Severity_map {
if s == t {
*v = k
return nil
}
}
return fmt.Errorf("%s not in Severity", s)
}