// defineValue defines symbol in current scope.
430553
func (e *Env) defineValue(k string, v reflect.Value) error {
	if strings.Contains(k, ".") {
		return fmt.Errorf("unknown symbol '%s'", k)
	}

	e.Lock()
	e.env[k] = v
	e.Unlock()

	return nil
}
883851
func (s *UsagePlanKey) SetValue(v string) *UsagePlanKey {
	s.Value = &v
	return s
}
39823
func (c *Class) DefineConst(name string, value Value) {
	cs := C.CString(name)
	defer C.free(unsafe.Pointer(cs))

	C.mrb_define_const(
		c.mrb.state, c.class, cs, value.MrbValue(c.mrb).value)
}
103895
func (s *ListTagOptionsFilters) SetValue(v string) *ListTagOptionsFilters {
	s.Value = &v
	return s
}
973553
func (e *Env) SetValue(v interface{}) {
	if reflect.TypeOf(v).Kind() == reflect.Ptr {
		e.Value = reflect.ValueOf(v).Elem()
	} else {
		e.Value = reflect.ValueOf(v)
	}
}
866260
func (s *ExtensionField) SetValue(v string) *ExtensionField {
	s.Value = &v
	return s
}
475791
func (s *AttributeKeyAndValue) SetValue(v *TypedAttributeValue) *AttributeKeyAndValue {
	s.Value = v
	return s
}
1262837
func (schema *Schema) stringValue(v interface{}) *string {
	switch v := v.(type) {
	default:
		fmt.Printf("stringValue: unexpected type %T\n", v)
	case string:
		return &v
	}
	return nil
}
441443
func (s *TagRef) SetValue(v string) *TagRef {
	s.Value = &v
	return s
}
589468
func (b *Builder) AddValue(v Value) error {
	if err := b.addInternal(v); err != nil {
		return WithStack(err)
	}
	return nil
}
452143
func (s *ResourceRequirement) SetValue(v string) *ResourceRequirement {
	s.Value = &v
	return s
}
211314
func reflectValue(valueType string, value interface{}) (reflect.Value, error) {
	theType, ok := typesMap[valueType]
	if !ok {
		return reflect.Value{}, NewErrUnsupportedType(valueType)
	}
	theValue := reflect.New(theType)

	// Booleans
	if theType.String() == "bool" {
		boolValue, err := getBoolValue(theType.String(), value)
		if err != nil {
			return reflect.Value{}, err
		}

		theValue.Elem().SetBool(boolValue)
		return theValue.Elem(), nil
	}

	// Integers
	if strings.HasPrefix(theType.String(), "int") {
		intValue, err := getIntValue(theType.String(), value)
		if err != nil {
			return reflect.Value{}, err
		}

		theValue.Elem().SetInt(intValue)
		return theValue.Elem(), err
	}

	// Unsigned integers
	if strings.HasPrefix(theType.String(), "uint") {
		uintValue, err := getUintValue(theType.String(), value)
		if err != nil {
			return reflect.Value{}, err
		}

		theValue.Elem().SetUint(uintValue)
		return theValue.Elem(), err
	}

	// Floating point numbers
	if strings.HasPrefix(theType.String(), "float") {
		floatValue, err := getFloatValue(theType.String(), value)
		if err != nil {
			return reflect.Value{}, err
		}

		theValue.Elem().SetFloat(floatValue)
		return theValue.Elem(), err
	}

	// Strings
	if theType.String() == "string" {
		stringValue, err := getStringValue(theType.String(), value)
		if err != nil {
			return reflect.Value{}, err
		}

		theValue.Elem().SetString(stringValue)
		return theValue.Elem(), nil
	}

	return reflect.Value{}, NewErrUnsupportedType(valueType)
}
1300168
func (u *Unit) NewValue(value int64, explicitSign Sign) (*Value, error) {
	if (value < 0 && explicitSign == Positive) || (value > 0 && explicitSign == Negative) {
		return nil, errors.New("Invalid value/explicitSign combination")
	}

	return &Value{
		unit:         u,
		Value:        value,
		ExplicitSign: explicitSign,
	}, nil
}
593229
func (s *ProcessorFeature) SetValue(v string) *ProcessorFeature {
	s.Value = &v
	return s
}
1108563
func (s *ConfigurationTag) SetValue(v string) *ConfigurationTag {
	s.Value = &v
	return s
}
1163339
func (s *AssociationExecutionTargetsFilter) SetValue(v string) *AssociationExecutionTargetsFilter {
	s.Value = &v
	return s
}
15228
func (s *Sizes) addValue(v reflect.Value, size uintptr) {
	s.Total += size
	rs := s.ByType[v.Type()]
	if rs == nil {
		rs = new(TypeSize)
		s.ByType[v.Type()] = rs
	}
	rs.Total += size
	rs.Count++
}