func ReadAttributeValue(context *tosca.Context) tosca.EntityPtr {
	self := NewValue(context)
	if context.Is(ard.TypeMap) {
		map_ := context.Data.(ard.Map)
		if len(map_) == 2 {
			if description, ok := map_["description"]; ok {
				if value, ok := map_["value"]; ok {
					self.Description = context.FieldChild("description", description).ReadString()
					context.Data = value
				}
			}
		}
	}
	ToFunctionCall(context)
	return self
}
tosca.Reader signature
[TOSCA-Simple-Profile-YAML-v1.2] @ 3.6.12.2.2
[TOSCA-Simple-Profile-YAML-v1.1] @ 3.5.11.2.2
package tosca_v2_0
import (
	"fmt"
	"github.com/tliron/kutil/ard"
	"github.com/tliron/puccini/tosca"
	"github.com/tliron/puccini/tosca/normal"
	"github.com/tliron/yamlkeys"
)
type Value struct {
	*Entity `name:"value"`
	Name    string
	ConstraintClauses ConstraintClauses
	Description       *string
	DataType    *DataType                `traverse:"ignore" json:"-" yaml:"-"`
	Information *normal.ValueInformation `traverse:"ignore" json:"-" yaml:"-"`
	Converter   *tosca.FunctionCall      `traverse:"ignore" json:"-" yaml:"-"`
	rendered bool
}
func NewValue(context *tosca.Context) *Value {
	return &Value{
		Entity:      NewEntity(context),
		Name:        context.Name,
		Information: normal.NewValueInformation(),
	}
}
func ReadValue(context *tosca.Context) tosca.EntityPtr {
	ToFunctionCall(context)
	return NewValue(context)
}