// ParseValueReader : Parse a value from a reader according to a ValueDescriptor
// @vd : a ValueDescriptor structure
// @reader : the reader position at the offset of the value that have to be parsed
// return (Element, error) : a XMLElement and error
171388
func ParseValueReader(vd ValueDescriptor, reader io.ReadSeeker) (Element, error) {
	var err error
	t := vd.ValType
	switch {
	case t.IsType(NullType):
		n := ValueNull{Size: vd.Size}
		n.Parse(reader)
		return &n, err
	case t.IsType(StringType):
		str := ValueString{Size: vd.Size}
		err = str.Parse(reader)
		return &str, err
	case t.IsType(AnsiStringType):
		astring := AnsiString{Size: vd.Size}
		err = astring.Parse(reader)
		return &astring, err
	case t.IsType(Int8Type):
		i := ValueInt8{}
		err = i.Parse(reader)
		return &i, err
	case t.IsType(UInt8Type):
		u := ValueUInt8{}
		err = u.Parse(reader)
		return &u, err
	case t.IsType(Int16Type):
		i := ValueInt16{}
		err = i.Parse(reader)
		return &i, err
	case t.IsType(UInt16Type):
		u := ValueUInt16{}
		err = u.Parse(reader)
		return &u, err
	case t.IsType(Int32Type):
		i := ValueInt32{}
		err = i.Parse(reader)
		return &i, err
	case t.IsType(UInt32Type):
		u := ValueUInt32{}
		err = u.Parse(reader)
		return &u, err
	case t.IsType(Int64Type):
		i := ValueInt64{}
		err = i.Parse(reader)
		return &i, err
	case t.IsType(UInt64Type):
		u := ValueUInt64{}
		err = u.Parse(reader)
		return &u, err
		//Real32Type is missing
		//Real64Type is missing
	case t.IsType(Real64Type):
		r := ValueReal64{}
		err = r.Parse(reader)
		return &r, err
	case t.IsType(BoolType):
		b := ValueBool{}
		err = b.Parse(reader)
		return &b, err
	case t.IsType(BinaryType):
		binary := ValueBinary{Size: vd.Size}
		err = binary.Parse(reader)
		return &binary, err
	case t.IsType(GuidType):
		var guid ValueGUID
		err = guid.Parse(reader)
		return &guid, err
		//SizeTType is missing
	case t.IsType(FileTimeType):
		filetime := ValueFileTime{}
		err = filetime.Parse(reader)
		return &filetime, err
	case t.IsType(SysTimeType):
		systime := ValueSysTime{}
		err = systime.Parse(reader)
		return &systime, err
	case t.IsType(SidType):
		var sid ValueSID
		err = sid.Parse(reader)
		return &sid, err
	case t.IsType(HexInt32Type):
		hi := ValueHexInt32{}
		err = hi.Parse(reader)
		return &hi, err
	case t.IsType(HexInt64Type):
		hi := ValueHexInt64{}
		err = hi.Parse(reader)
		return &hi, err
		//EvtHandle type is missing but unknown
	case t.IsType(BinXmlType):
		var elt Element
		// Must be a Fragment
		//elt, err := Parse(reader, c)
		elt, err = Parse(reader, nil, true)
		if err != nil {
			//panic(err)
			log.LogError(err)
			log.DebugDontPanic(err)
		}
		return elt, err
		//EvtXML type is missing but unknown
	case t.IsArrayOf(StringType):
		st := ValueStringTable{Size: vd.Size}
		err = st.Parse(reader)
		return &st, err
		// Many Array Types are missing
	case t.IsArrayOf(UInt16Type):
		a := ValueArrayUInt16{Size: vd.Size}
		err = a.Parse(reader)
		return &a, err
	case t.IsArrayOf(UInt64Type):
		a := ValueArrayUInt64{Size: vd.Size}
		err = a.Parse(reader)
		return &a, err
	default:
		// TODO: May cause crap
		uv := UnkVal{BackupSeeker(reader), t, vd}
		// Jump over the value data if we don't know it
		_, err = reader.Seek(int64(vd.Size), os.SEEK_CUR)
		if err != nil {
			panic(err)
		}
		return &uv, nil
	}
}
1341124
func (p *Parser) parseVariableOrLiteral() (IEvaluator, *Error) {
	t := p.Current()

	if t == nil {
		return nil, p.Error("Unexpected EOF, expected a number, string, keyword or identifier.", p.lastToken)
	}

	// Is first part a number or a string, there's nothing to resolve (because there's only to return the value then)
	switch t.Typ {
	case TokenNumber:
		p.Consume()

		// One exception to the rule that we don't have float64 literals is at the beginning
		// of an expression (or a variable name). Since we know we started with an integer
		// which can't obviously be a variable name, we can check whether the first number
		// is followed by dot (and then a number again). If so we're converting it to a float64.

		if p.Match(TokenSymbol, ".") != nil {
			// float64
			t2 := p.MatchType(TokenNumber)
			if t2 == nil {
				return nil, p.Error("Expected a number after the '.'.", nil)
			}
			f, err := strconv.ParseFloat(fmt.Sprintf("%s.%s", t.Val, t2.Val), 64)
			if err != nil {
				return nil, p.Error(err.Error(), t)
			}
			fr := &floatResolver{
				locationToken: t,
				val:           f,
			}
			return fr, nil
		}
		i, err := strconv.Atoi(t.Val)
		if err != nil {
			return nil, p.Error(err.Error(), t)
		}
		nr := &intResolver{
			locationToken: t,
			val:           i,
		}
		return nr, nil

	case TokenString:
		p.Consume()
		sr := &stringResolver{
			locationToken: t,
			val:           t.Val,
		}
		return sr, nil
	case TokenKeyword:
		p.Consume()
		switch t.Val {
		case "true":
			br := &boolResolver{
				locationToken: t,
				val:           true,
			}
			return br, nil
		case "false":
			br := &boolResolver{
				locationToken: t,
				val:           false,
			}
			return br, nil
		default:
			return nil, p.Error("This keyword is not allowed here.", nil)
		}
	}

	resolver := &variableResolver{
		locationToken: t,
	}

	// First part of a variable MUST be an identifier
	if t.Typ != TokenIdentifier {
		return nil, p.Error("Expected either a number, string, keyword or identifier.", t)
	}

	resolver.parts = append(resolver.parts, &variablePart{
		typ: varTypeIdent,
		s:   t.Val,
	})

	p.Consume() // we consumed the first identifier of the variable name

variableLoop:
	for p.Remaining() > 0 {
		t = p.Current()

		if p.Match(TokenSymbol, ".") != nil {
			// Next variable part (can be either NUMBER or IDENT)
			t2 := p.Current()
			if t2 != nil {
				switch t2.Typ {
				case TokenIdentifier:
					resolver.parts = append(resolver.parts, &variablePart{
						typ: varTypeIdent,
						s:   t2.Val,
					})
					p.Consume() // consume: IDENT
					continue variableLoop
				case TokenNumber:
					i, err := strconv.Atoi(t2.Val)
					if err != nil {
						return nil, p.Error(err.Error(), t2)
					}
					resolver.parts = append(resolver.parts, &variablePart{
						typ: varTypeInt,
						i:   i,
					})
					p.Consume() // consume: NUMBER
					continue variableLoop
				default:
					return nil, p.Error("This token is not allowed within a variable name.", t2)
				}
			} else {
				// EOF
				return nil, p.Error("Unexpected EOF, expected either IDENTIFIER or NUMBER after DOT.",
					p.lastToken)
			}
		} else if p.Match(TokenSymbol, "(") != nil {
			// Function call
			// FunctionName '(' Comma-separated list of expressions ')'
			part := resolver.parts[len(resolver.parts)-1]
			part.isFunctionCall = true
		argumentLoop:
			for {
				if p.Remaining() == 0 {
					return nil, p.Error("Unexpected EOF, expected function call argument list.", p.lastToken)
				}

				if p.Peek(TokenSymbol, ")") == nil {
					// No closing bracket, so we're parsing an expression
					exprArg, err := p.ParseExpression()
					if err != nil {
						return nil, err
					}
					part.callingArgs = append(part.callingArgs, exprArg)

					if p.Match(TokenSymbol, ")") != nil {
						// If there's a closing bracket after an expression, we will stop parsing the arguments
						break argumentLoop
					} else {
						// If there's NO closing bracket, there MUST be an comma
						if p.Match(TokenSymbol, ",") == nil {
							return nil, p.Error("Missing comma or closing bracket after argument.", nil)
						}
					}
				} else {
					// We got a closing bracket, so stop parsing arguments
					p.Consume()
					break argumentLoop
				}

			}
			// We're done parsing the function call, next variable part
			continue variableLoop
		}

		// No dot or function call? Then we're done with the variable parsing
		break
	}

	return resolver, nil
}
439275
func ParseReader(rd io.Reader, opts Options) (*Tag, error) {
	tag := NewEmptyTag()
	err := tag.parse(rd, opts)
	return tag, err
}
300458
func (p *Parser) parseValues() (sets.String, error) {
	tok, lit := p.consume(Values)
	if tok != OpenParToken {
		return nil, fmt.Errorf("found '%s' expected: '('", lit)
	}
	tok, lit = p.lookahead(Values)
	switch tok {
	case IdentifierToken, CommaToken:
		s, err := p.parseIdentifiersList() // handles general cases
		if err != nil {
			return s, err
		}
		if tok, _ = p.consume(Values); tok != ClosedParToken {
			return nil, fmt.Errorf("found '%s', expected: ')'", lit)
		}
		return s, nil
	case ClosedParToken: // handles "()"
		p.consume(Values)
		return sets.NewString(""), nil
	default:
		return nil, fmt.Errorf("found '%s', expected: ',', ')' or identifier", lit)
	}
}
731842
func ParseCSVBuildInstancesFromReader(r io.ReadSeeker, attrs []Attribute, hasHeader bool, u UpdatableDataGrid) (err error) {
	var rowCounter int

	defer func() {
		if r := recover(); r != nil {
			if _, ok := r.(runtime.Error); ok {
				panic(err)
			}
			err = fmt.Errorf("error at line %d (error %s)", rowCounter, r.(error))
		}
	}()

	specs := ResolveAttributes(u, attrs)

	r.Seek(0, 0)
	reader := csv.NewReader(r)

	for {
		record, err := reader.Read()
		if err == io.EOF {
			break
		} else if err != nil {
			return err
		}
		if rowCounter == 0 {
			if hasHeader {
				hasHeader = false
				continue
			}
		}
		for i, v := range record {
			u.Set(specs[i], rowCounter, specs[i].attr.GetSysValFromString(strings.TrimSpace(v)))
		}
		rowCounter++
	}

	return nil
}
569426
func ReadValue(r *bufio.Reader) (Value, bool) {
	ReadWhitespace(r)
	c, err := peek(r)
	if err != nil {
		return nil, true
	}
	switch c {
	case '(':
		return ReadList(r), false
	case ')':
		return nil, true
	case '"':
		return ReadString(r), false
	case '#':
		return ReadBigNum(r), false
	default:
		return ReadSymbol(r), false
	}
}
539870
func (p *parser) parseFieldValue(s string, msgName string, field *descriptor.FieldDescriptorProto) (interface{}, error) {
	switch field.GetType() {

	case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
		return strconv.ParseFloat(s, 64)

	case descriptor.FieldDescriptorProto_TYPE_FLOAT:
		x, err := strconv.ParseFloat(s, 32)
		return float32(x), err

	case
		descriptor.FieldDescriptorProto_TYPE_INT32,
		descriptor.FieldDescriptorProto_TYPE_SFIXED32,
		descriptor.FieldDescriptorProto_TYPE_SINT32:

		x, err := strconv.ParseInt(s, 10, 32)
		return int32(x), err

	case descriptor.FieldDescriptorProto_TYPE_INT64,
		descriptor.FieldDescriptorProto_TYPE_SFIXED64,
		descriptor.FieldDescriptorProto_TYPE_SINT64:

		return strconv.ParseInt(s, 10, 64)

	case descriptor.FieldDescriptorProto_TYPE_UINT32, descriptor.FieldDescriptorProto_TYPE_FIXED32:
		x, err := strconv.ParseUint(s, 10, 32)
		return uint32(x), err

	case descriptor.FieldDescriptorProto_TYPE_UINT64, descriptor.FieldDescriptorProto_TYPE_FIXED64:
		return strconv.ParseUint(s, 10, 64)

	case descriptor.FieldDescriptorProto_TYPE_BOOL:
		return strconv.ParseBool(s)

	case descriptor.FieldDescriptorProto_TYPE_STRING:
		return s, nil

	case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
		return nil, fmt.Errorf(
			"%s.%s is a message field. Specify its field values, not the message itself",
			msgName, field.GetName())

	case descriptor.FieldDescriptorProto_TYPE_BYTES:
		return hex.DecodeString(s)

	case descriptor.FieldDescriptorProto_TYPE_ENUM:
		obj, err := p.resolve(field.GetTypeName())
		if err != nil {
			return nil, err
		}
		enum, ok := obj.(*descriptor.EnumDescriptorProto)
		if !ok {
			return nil, fmt.Errorf(
				"field %s.%s is declared as of type enum %s, but %s is not an enum",
				msgName, field.GetName(),
				field.GetTypeName(), field.GetTypeName(),
			)
		}
		return parseEnum(enum, s)

	default:
		return nil, fmt.Errorf("field type %s is not supported", field.GetType())
	}
}
1141894
func (_m *DBClient) ValueDescriptorsByType(t string) ([]models.ValueDescriptor, error) {
	ret := _m.Called(t)

	var r0 []models.ValueDescriptor
	if rf, ok := ret.Get(0).(func(string) []models.ValueDescriptor); ok {
		r0 = rf(t)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]models.ValueDescriptor)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string) error); ok {
		r1 = rf(t)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
1290986
func (dec *Decoder) readValue() (int, error) {
	dec.scan.reset()

	scanp := 0
	var err error
Input:
	for {
		// Look in the buffer for a new value.
		for i, c := range dec.buf[scanp:] {
			dec.scan.bytes++
			v := dec.scan.step(&dec.scan, int(c))
			if v == scanEnd {
				scanp += i
				break Input
			}
			// scanEnd is delayed one byte.
			// We might block trying to get that byte from src,
			// so instead invent a space byte.
			if (v == scanEndObject || v == scanEndArray) && dec.scan.step(&dec.scan, ' ') == scanEnd {
				scanp += i + 1
				break Input
			}
			if v == scanError {
				dec.err = dec.scan.err
				return 0, dec.scan.err
			}
		}
		scanp = len(dec.buf)

		// Did the last read have an error?
		// Delayed until now to allow buffer scan.
		if err != nil {
			if err == io.EOF {
				if dec.scan.step(&dec.scan, ' ') == scanEnd {
					break Input
				}
				if nonSpace(dec.buf) {
					err = io.ErrUnexpectedEOF
				}
			}
			dec.err = err
			return 0, err
		}

		// Make room to read more into the buffer.
		const minRead = 512
		if cap(dec.buf)-len(dec.buf) < minRead {
			newBuf := make([]byte, len(dec.buf), 2*cap(dec.buf)+minRead)
			copy(newBuf, dec.buf)
			dec.buf = newBuf
		}

		// Read.  Delay error for next iteration (after scan).
		var n int
		n, err = dec.r.Read(dec.buf[len(dec.buf):cap(dec.buf)])
		dec.buf = dec.buf[0 : len(dec.buf)+n]
	}
	return scanp, nil
}
860895
func ReadValuesFile(filename string) (Values, error) {
	data, err := ioutil.ReadFile(filename)
	if err != nil {
		return map[string]interface{}{}, err
	}
	return ReadValues(data)
}
369951
func (dt *DbfTable) FieldValue(row int, fieldIndex int) (value string) {

	offset := int(dt.numberOfBytesInHeader)
	lengthOfRecord := int(dt.lengthOfEachRecord)

	offset = offset + (row * lengthOfRecord)

	recordOffset := 1

	for i := 0; i < len(dt.fields); i++ {
		if i == fieldIndex {
			break
		} else {
			recordOffset += int(dt.fields[i].length)
		}
	}

	temp := dt.dataStore[(offset + recordOffset):((offset + recordOffset) + int(dt.fields[fieldIndex].length))]

	enforceBlankPadding(temp)

	s := dt.decoder.ConvertString(string(temp))
	//fmt.Printf("utf-8 value:[%#v] original value:[%#v]\n", s, string(temp))

	value = strings.TrimSpace(s)

	//fmt.Printf("raw value:[%#v]\n", dt.dataStore[(offset + recordOffset):((offset + recordOffset) + int(dt.Fields[fieldIndex].fixedFieldLength))])
	//fmt.Printf("utf-8 value:[%#v]\n", []byte(s))
	//value = string(dt.dataStore[(offset + recordOffset):((offset + recordOffset) + int(dt.Fields[fieldIndex].fixedFieldLength))])
	return
}
889377
func valueMarshaler(t reflect.Type) marshaler {
	if zm, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(Marshaler); ok {
		return dynamicMarshaler{
			marshal: func(v reflect.Value, s string) error {
				return v.Addr().Interface().(Marshaler).Marshal(s)
			},
			explicitValueRequired: zm.RequiresExplicitValue(),
		}
	}
	if bm, ok := builtinMarshalers[t]; ok {
		return bm
	}
	switch t.Kind() {
	case reflect.Ptr:
		m := valueMarshaler(t.Elem())
		if m == nil {
			return nil
		}
		return ptrMarshaler{m}
	case reflect.Struct:
		return nil
	case reflect.Bool:
		return dynamicMarshaler{
			marshal: func(v reflect.Value, s string) error {
				if s == "" {
					v.SetBool(true)
					return nil
				}
				b, err := strconv.ParseBool(s)
				v.SetBool(b)
				return err
			},
			explicitValueRequired: false,
		}
	}
	return defaultMarshaler{}
}
1183179
func newSparseFileReader(rfr numBytesReader, sp []sparseEntry, total int64) (*sparseFileReader, error) {
	if total < 0 {
		return nil, ErrHeader // Total size cannot be negative
	}

	// Validate all sparse entries. These are the same checks as performed by
	// the BSD tar utility.
	for i, s := range sp {
		switch {
		case s.offset < 0 || s.numBytes < 0:
			return nil, ErrHeader // Negative values are never okay
		case s.offset > math.MaxInt64-s.numBytes:
			return nil, ErrHeader // Integer overflow with large length
		case s.offset+s.numBytes > total:
			return nil, ErrHeader // Region extends beyond the "real" size
		case i > 0 && sp[i-1].offset+sp[i-1].numBytes > s.offset:
			return nil, ErrHeader // Regions can't overlap and must be in order
		}
	}
	return &sparseFileReader{rfr: rfr, sp: sp, total: total}, nil
}
584379
func (n *FilteredString) ParseValue(val string) {
	if val == "" {
		n.IsSet = false
		n.Value = ""
		return
	}

	n.IsSet = true

	switch val {
	case "null", "default":
		n.Value = ""
	default:
		n.Value = val
	}
}
1155841
func Parse(reader io.ReadSeeker, c *Chunk, tiFlag bool) (Element, error) {
	var token [1]byte
	var err error
	read, err := reader.Read(token[:])
	if read != 1 || err != nil {
		return EmptyElement{}, err
	}
	_, err = reader.Seek(-1, os.SEEK_CUR)
	if err != nil {
		return EmptyElement{}, err
	}
	switch token[0] {
	case FragmentHeaderToken:
		f := Fragment{}
		err = f.Parse(reader)
		checkFullParsingError(err, reader, &f, c)
		f.BinXMLElement, err = Parse(reader, c, tiFlag)
		checkFullParsingError(err, reader, &f, c)
		if err != nil {
			return &f, err
		}
		// We hack a bit over here creating a fake TemplateInstance to benefit from
		// the further GoEvtxMap convertion of it. Conceptually it makes sense since
		// we just create a template without substitutions.
		if _, ok := f.BinXMLElement.(*ElementStart); ok {
			var e Element
			var ti TemplateInstance
			ti.Definition.Data.Elements = make([]Element, 0)

			ti.Definition.Data.Elements = append(ti.Definition.Data.Elements, f.BinXMLElement.(*ElementStart))
			for e, err = Parse(reader, c, tiFlag); err == nil; e, err = Parse(reader, c, tiFlag) {
				ti.Definition.Data.Elements = append(ti.Definition.Data.Elements, e)
				if _, ok := e.(*BinXMLEOF); ok {
					break
				}
			}
			checkFullParsingError(err, reader, e, c)
			f.BinXMLElement = &ti
		}
		return &f, err
	case TokenOpenStartElementTag1, TokenOpenStartElementTag2:
		es := ElementStart{IsTemplateInstance: tiFlag}
		err = es.Parse(reader)
		checkFullParsingError(err, reader, &es, c)
		return &es, err
	case TokenNormalSubstitution:
		ns := NormalSubstitution{}
		err = ns.Parse(reader)
		checkParsingError(err, reader, &ns)
		return &ns, err
	case TokenOptionalSubstitution:
		os := OptionalSubstitution{}
		err = os.Parse(reader)
		checkParsingError(err, reader, &os)
		return &os, err
	case TokenCharRef1:
		tcr := CharEntityRef{}
		err = tcr.Parse(reader)
		checkParsingError(err, reader, &tcr)
		return &tcr, err
	case TokenTemplateInstance:
		var offset int32
		ti := TemplateInstance{}
		if c != nil {
			// Check if template already parsed
			offset, err = ti.DataOffset(reader)
			if err != nil {
				return nil, err
			}
			if t, ok := c.TemplateTable[offset]; ok {
				// We have now to fix the offset to continue to read
				err = ti.ParseTemplateDefinitionHeader(reader)
				if err != nil {
					return nil, err
				}
				// Only the definition is valid, not the data
				ti.Definition.Data = t
				// We jump over the template definition data if needed
				if int64(offset) == BackupSeeker(reader) {
					// We patch offset to jump off to arrive after definition data size
					RelGoToSeeker(reader, int64(ti.Definition.Data.Size)+24)
				}
				// We parse the data
				err = ti.Data.Parse(reader)
				if err != nil {
					return nil, err
				}
				return &ti, nil
			}
		}
		// We have to parse the template since it cannot be found the template table
		err = ti.Parse(reader)
		if c != nil {
			// Update template table
			c.TemplateTable[ti.Definition.Header.DataOffset] = ti.Definition.Data
		}
		checkParsingError(err, reader, &ti)
		return &ti, err
	case TokenValue1, TokenValue2:
		// ValueText
		vt := ValueText{}
		err = vt.Parse(reader)
		checkParsingError(err, reader, &vt)
		return &vt, err

	case TokenEntityRef1, TokenEntityRef2:
		e := BinXMLEntityReference{}
		err = e.Parse(reader)
		checkParsingError(err, reader, &e)
		return &e, err

	case TokenEndElementTag:
		b := BinXMLEndElementTag{}
		err = b.Parse(reader)
		checkParsingError(err, reader, &b)
		return &b, err
	case TokenCloseStartElementTag:
		t := BinXMLCloseStartElementTag{}
		err = t.Parse(reader)
		checkParsingError(err, reader, &t)
		return &t, err
	case TokenCloseEmptyElementTag:
		t := BinXMLCloseEmptyElementTag{}
		err = t.Parse(reader)
		checkParsingError(err, reader, &t)
		return &t, err
	case TokenEOF:
		b := BinXMLEOF{}
		err = b.Parse(reader)
		checkParsingError(err, reader, &b)
		return &b, nil
	}
	//log.DontPanic(ErrUnknownToken{token[0]})
	log.DebugDontPanic(ErrUnknownToken{token[0]})
	return EmptyElement{}, ErrUnknownToken{token[0]}
}
330998
func (_m *DBClient) ReadingsByDeviceAndValueDescriptor(deviceId string, valueDescriptor string, limit int) ([]models.Reading, error) {
	ret := _m.Called(deviceId, valueDescriptor, limit)

	var r0 []models.Reading
	if rf, ok := ret.Get(0).(func(string, string, int) []models.Reading); ok {
		r0 = rf(deviceId, valueDescriptor, limit)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]models.Reading)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, string, int) error); ok {
		r1 = rf(deviceId, valueDescriptor, limit)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
430009
func UInt32Value(val string) (*wrappers.UInt32Value, error) {
	parsedVal, err := Uint32(val)
	return &wrappers.UInt32Value{Value: parsedVal}, err
}