// UnmarshalText implements encoding.TextUnmarshaler.
197879
func (z *Big) UnmarshalText(data []byte) error {
	return z.scan(bytes.NewReader(data))
}
1142155
func (k *AES128Key) UnmarshalText(text []byte) error {
	b, err := hex.DecodeString(string(text))
	if err != nil {
		return err
	}
	if len(b) != len(k) {
		return fmt.Errorf("lorawan: exactly %d bytes are expected", len(k))
	}
	copy(k[:], b)
	return nil
}
393887
func (p *FileMode) UnmarshalText(data []byte) error {
	if len(data) < 3 {
		return invalidFileMode
	}
	if len(data) == 3 {
		data = []byte{'0', data[0], data[1], data[2]}
	}
	m, err := strconv.ParseUint(string(data), 8, 32)
	if err != nil {
		return err
	}
	*p = FileMode(m)
	return nil
}
46094
func (h *Hash) UnmarshalText(input []byte) error {
	return hexutil.UnmarshalFixedText("Hash", input, h[:])
}
1207790
func (bs *Buckets) UnmarshalText(value []byte) error {
	if len(value) < 2 || value[0] != '[' || value[len(value)-1] != ']' {
		return fmt.Errorf("bad buckets: %s", value)
	}
	for _, v := range strings.Split(string(value[1:len(value)-1]), ",") {
		d, err := time.ParseDuration(strings.TrimSpace(v))
		if err != nil {
			return err
		}
		*bs = append(*bs, d)
	}
	if len(*bs) == 0 {
		return fmt.Errorf("bad buckets: %s", value)
	}
	return nil
}
68383
func (f *Field) UnmarshalText(p []byte) error {
	r, err := Parse(string(p))
	if err != nil {
		return err
	}

	f.reference = r
	return nil
}
1004449
func (l *Level) UnmarshalText(text []byte) (err error) {
	if bytes.Equal(text, levelBytesDebug) {
		*l = LevelDebug
	} else if bytes.Equal(text, levelBytesInfo) {
		*l = LevelInfo
	} else if bytes.Equal(text, levelBytesWarn) {
		*l = LevelWarn
	} else if bytes.Equal(text, levelBytesError) {
		*l = LevelError
	} else if bytes.Equal(text, levelBytesFatal) {
		*l = LevelFatal
	} else {
		err = fmt.Errorf("Uknown level %v", string(text))
	}
	return
}
1369945
func (e *EUI64) UnmarshalText(text []byte) error {
	b, err := hex.DecodeString(string(text))
	if err != nil {
		return err
	}
	if len(e) != len(b) {
		return fmt.Errorf("lorawan: exactly %d bytes are expected", len(e))
	}
	copy(e[:], b)
	return nil
}
1239751
func (eui *EUI64) UnmarshalText(data []byte) error {
	parsed, err := ParseEUI64(string(data))
	if err != nil {
		return err
	}
	*eui = EUI64(parsed)
	return nil
}
869940
func (b *Board) UnmarshalText(text []byte) error {
	cp, err := fenBoard(string(text))
	if err != nil {
		return err
	}
	*b = *cp
	return nil
}
583177
func (t *Timestamp) UnmarshalText(text []byte) (err error) {
	var i int
	if i, err = strconv.Atoi(string(bytes.Trim(text, "\""))); err != nil {
		return
	}
	t.Time = time.Unix(int64(i), 0)
	return
}
1129828
func (t *TopicType) UnmarshalText(input []byte) error {
	return hexutil.UnmarshalFixedText("Topic", input, t[:])
}
1373719
func (d *Date) UnmarshalText(data []byte) (err error) {
	d.Time, err = time.Parse(fullDate, string(data))
	return err
}
969155
func (v *ExceptionType) UnmarshalText(value []byte) error {
	switch s := string(value); s {
	case "UNKNOWN":
		*v = ExceptionTypeUnknown
		return nil
	case "UNKNOWN_METHOD":
		*v = ExceptionTypeUnknownMethod
		return nil
	case "INVALID_MESSAGE_TYPE":
		*v = ExceptionTypeInvalidMessageType
		return nil
	case "WRONG_METHOD_NAME":
		*v = ExceptionTypeWrongMethodName
		return nil
	case "BAD_SEQUENCE_ID":
		*v = ExceptionTypeBadSequenceID
		return nil
	case "MISSING_RESULT":
		*v = ExceptionTypeMissingResult
		return nil
	case "INTERNAL_ERROR":
		*v = ExceptionTypeInternalError
		return nil
	case "PROTOCOL_ERROR":
		*v = ExceptionTypeProtocolError
		return nil
	case "INVALID_TRANSFORM":
		*v = ExceptionTypeInvalidTransform
		return nil
	case "INVALID_PROTOCOL":
		*v = ExceptionTypeInvalidProtocol
		return nil
	case "UNSUPPORTED_CLIENT_TYPE":
		*v = ExceptionTypeUnsupportedClientType
		return nil
	default:
		val, err := strconv.ParseInt(s, 10, 32)
		if err != nil {
			return fmt.Errorf("unknown enum value %q for %q: %v", s, "ExceptionType", err)
		}
		*v = ExceptionType(val)
		return nil
	}
}
301472
func (t *Time) UnmarshalText(data []byte) (err error) {
	tt, err := time.Parse(DeisDatetimeFormat, string(data))
	*t = Time{tt}
	return
}
311479
func (b *Uint) UnmarshalText(input []byte) error {
	var u64 Uint64
	err := u64.UnmarshalText(input)
	if u64 > Uint64(^uint(0)) || err == ErrUint64Range {
		return ErrUintRange
	} else if err != nil {
		return err
	}
	*b = Uint(u64)
	return nil
}
754746
func (i *Int) UnmarshalText(text []byte) error {
	var ss []int
	for _, x := range strings.Split(string(text), ",") {
		f, err := strconv.Atoi(x)
		if err != nil {
			return errors.WithStack(err)
		}
		ss = append(ss, f)
	}
	*i = ss
	return nil
}