You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: fields.go
    path of file: ./repos/magistrala/consumers/writers/influxdb
    
    the code of the file until where you have to start completion: // Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package influxdb

import (
	"github.com/absmach/magistrala/pkg/transformers/senml"
)

type fields map[string]interface{}

func senmlFields(msg senml.Message) fields {
	ret := fields{
		"protocol":   msg.Protocol,
		"unit":       msg.Unit,
		"updateTime": msg.UpdateTime,
	}

	switch {
	case msg.Value != nil:
		ret["value"] = *msg.Value
	cas
    
func senmlFields(msg senml.Message) fields {
	ret := fields{
		"protocol":   msg.Protocol,
		"unit":       msg.Unit,
		"updateTime": msg.UpdateTime,
	}

	switch {
	case msg.Value != nil:
		ret["value"] = *msg.Value
	case msg.StringValue != nil:
		ret["stringValue"] = *msg.StringValue
	case msg.DataValue != nil:
		ret["dataValue"] = *msg.DataValue
	case msg.BoolValue != nil:
		ret["boolValue"] = *msg.BoolValue
	}

	if msg.Sum != nil {
		ret["sum"] = *msg.Sum
	}

	return ret
}