// SetStringValue sets the StringValue field's value.
965155
func (s *Variable) SetStringValue(v string) *Variable {
	s.StringValue = &v
	return s
}
452143
func (s *ResourceRequirement) SetValue(v string) *ResourceRequirement {
	s.Value = &v
	return s
}
868268
func (s *LoadBalancerAttribute) SetValue(v string) *LoadBalancerAttribute {
	s.Value = &v
	return s
}
396586
func (s *ReplaceableAttribute) SetValue(v string) *ReplaceableAttribute {
	s.Value = &v
	return s
}
1174717
func (s setMap) SetString(key string, value *string) {
	if value == nil {
		return
	}

	s[key] = *value
}
521688
func (s *Ssml) SetValue(v string) *Ssml {
	s.Value = &v
	return s
}
570972
func (context *BaseContext) SetString(key string, value string) {
	context.userData[key] = value
}
808086
func (s *Tag) SetValue(v string) *Tag {
	s.Value = &v
	return s
}
529620
func (s *MessageAttributeValue) SetStringValue(v string) *MessageAttributeValue {
	s.StringValue = &v
	return s
}
170504
func (s *UpdateCondition) SetValue(v string) *UpdateCondition {
	s.Value = &v
	return s
}
846951
func (s *PutParameterInput) SetValue(v string) *PutParameterInput {
	s.Value = &v
	return s
}
206278
func (s *ApiKey) SetValue(v string) *ApiKey {
	s.Value = &v
	return s
}
1017461
func (s *Validity) SetValue(v int64) *Validity {
	s.Value = &v
	return s
}
835726
func (s *KeyValuePair) SetValue(v string) *KeyValuePair {
	s.Value = &v
	return s
}
744758
func (s *ParameterHistory) SetValue(v string) *ParameterHistory {
	s.Value = &v
	return s
}
848115
func (b *ByteBuffer) SetString(s string) {
	b.B = append(b.B[:0], s...)
}
1016939
func SetValueFromString(valueField reflect.Value, value string) error {
	if !valueField.IsValid() {
		return fmt.Errorf("r.SetValueFromString: %s is not valid", valueField)
	}
	if !valueField.CanSet() {
		return fmt.Errorf("r.SetValueFromString: Cannot set %s field value", valueField)
	}
	switch valueField.Interface().(type) {
	case string:
		valueField.SetString(value)
	case *string:
		refValue := reflect.ValueOf(&value)
		valueField.Set(refValue)
	case int:
		val, err := totype.StringToInt(value)
		if err != nil {
			return err
		}
		refValue := reflect.ValueOf(val)
		valueField.Set(refValue)
	case *int:
		val, err := totype.StringToInt(value)
		if err != nil {
			return err
		}
		refValue := reflect.ValueOf(&val)
		valueField.Set(refValue)
	case int16:
		val, err := totype.StringToInt16(value)
		if err != nil {
			return err
		}
		refValue := reflect.ValueOf(val)
		valueField.Set(refValue)
	case *int16:
		val, err := totype.StringToInt16(value)
		if err != nil {
			return err
		}
		refValue := reflect.ValueOf(&val)
		valueField.Set(refValue)
	case int32:
		val, err := totype.StringToInt32(value)
		if err != nil {
			return err
		}
		refValue := reflect.ValueOf(val)
		valueField.Set(refValue)
	case *int32:
		val, err := totype.StringToInt32(value)
		if err != nil {
			return err
		}
		refValue := reflect.ValueOf(&val)
		valueField.Set(refValue)
	case int64:
		val, err := totype.StringToInt64(value)
		if err != nil {
			return err
		}
		refValue := reflect.ValueOf(val)
		valueField.Set(refValue)
	case *int64:
		val, err := totype.StringToInt64(value)
		if err != nil {
			return err
		}
		refValue := reflect.ValueOf(&val)
		valueField.Set(refValue)
	case bool:
		val, err := totype.StringToBool(value)
		if err != nil {
			return err
		}
		refValue := reflect.ValueOf(val)
		valueField.Set(refValue)
	case *bool:
		val, err := totype.StringToBool(value)
		if err != nil {
			return err
		}
		refValue := reflect.ValueOf(&val)
		valueField.Set(refValue)
	default:
		return fmt.Errorf("unsupported value type %v", valueField.Type().String())
	}
	return nil
}