| //////////////////////////////////////////////////////////////////////////////// |
| // Do not modify! |
| // Generated by codergen -go |
| //////////////////////////////////////////////////////////////////////////////// |
| |
| package adb |
| |
| import "fmt" |
| |
| func init() { |
| } |
| |
| var () |
| |
| const _DeviceState_name = "offlinedeviceunauthorized" |
| |
| var _DeviceState_map = map[DeviceState]string{ |
| 0: _DeviceState_name[0:7], |
| 1: _DeviceState_name[7:13], |
| 2: _DeviceState_name[13:25], |
| } |
| |
| func (v DeviceState) String() string { |
| if s, ok := _DeviceState_map[v]; ok { |
| return s |
| } |
| return fmt.Sprintf("DeviceState(%d)", v) |
| } |
| |
| func (v *DeviceState) Parse(s string) error { |
| for k, t := range _DeviceState_map { |
| if s == t { |
| *v = k |
| return nil |
| } |
| } |
| return fmt.Errorf("%s not in DeviceState", s) |
| } |