// AddVals adds strings and values to an EnumParser.
336212
func (ep *EnumParser) AddVals(vals map[string]interface{}) {
	if ep.vals == nil {
		ep.vals = make(map[string]interface{})
	}
	for k, v := range vals {
		if ep.Type == "" {
			ep.Type = reflect.TypeOf(v).Name()
		}
		if !ep.CaseMatch {
			k = strings.ToLower(k)
		}
		ep.vals[k] = v
	}
}
181660
func (s *DeviceFilter) SetValues(v []*string) *DeviceFilter {
	s.Values = v
	return s
}
589468
func (b *Builder) AddValue(v Value) error {
	if err := b.addInternal(v); err != nil {
		return WithStack(err)
	}
	return nil
}
1152753
func (r *Request) AppendValues(values Values) []byte {
	if r.Signature != nil {
		values.Set("signature", hexutil.Encode(r.Signature[:]))
	}
	return r.Update.AppendValues(values)
}
834710
func (c *Client) AddDimensionValues(ctx context.Context, filterID, name string, options []string) error {
	uri := fmt.Sprintf("%s/filters/%s/dimensions/%s", c.url, filterID, name)

	clientlog.Do(ctx, "adding multiple dimension values to filter job", service, uri, log.Data{
		"method":  "POST",
		"options": options,
	})

	body := struct {
		Options []string `json:"options"`
	}{
		Options: options,
	}

	b, err := json.Marshal(body)
	if err != nil {
		return err
	}

	req, err := http.NewRequest("POST", uri, bytes.NewBuffer(b))
	if err != nil {
		return err
	}

	resp, err := c.cli.Do(ctx, req)
	if err != nil {
		return err
	}

	if resp.StatusCode != http.StatusCreated {
		return &ErrInvalidFilterAPIResponse{http.StatusCreated, resp.StatusCode, uri}
	}

	return nil
}
149487
func (pr *PilosaRecord) AddVal(field string, value int64) {
	pr.Vals = append(pr.Vals, Val{Field: field, Value: value})
}
901682
func (e Equalities) AddFuncs(funcs ...interface{}) error {
	for _, f := range funcs {
		if err := e.AddFunc(f); err != nil {
			return err
		}
	}
	return nil
}
100696
func (s *Filter) SetValues(v []*string) *Filter {
	s.Values = v
	return s
}
211243
func (v *OrderedValues) Add(key, val []byte) {
	for i, j := range *v {
		if len(j) > 0 && bytes.Equal(j[0], key) {
			if len(val) > 0 {
				(*v)[i] = append((*v)[i], val)
			}
			return
		}
	}
	if len(val) == 0 {
		*v = append(*v, [][]byte{key})
	} else {
		*v = append(*v, [][]byte{key, val})
	}
}
1037985
func (a *attachT) Keyvals() []interface{} {
	var keyvals []interface{}
	// TODO(jpj): this could be improved by checking if the
	// cause implements the keyvalser interface.
	keyvals = append(keyvals, "msg", a.cause.Error())
	keyvals = a.ctx.appendKeyvals(keyvals)
	return keyvals
}
154548
func (b *ReplaceBuilder) AddRows(rows Values) *ReplaceBuilder {
	if b.Insert.Rows == nil {
		b.Insert.Rows = rows
	} else {
		b.Insert.Rows = append(b.Insert.Rows.(Values), rows...)
	}
	return b
}
685973
func (p *ListParam) Vars() (string, string) {
	if len(p.values) == 0 {
		return p.Name(), p.Default()
	}
	out := make([]string, len(p.values))
	for i, v := range p.values {
		_, out[i] = v.EnvVars()
	}
	return p.Name(), strings.Join(out, ",")
}
87395
func (s *Target) SetValues(v []*string) *Target {
	s.Values = v
	return s
}
967936
func (s *InstanceInformationStringFilter) SetValues(v []*string) *InstanceInformationStringFilter {
	s.Values = v
	return s
}
203435
func (s *InstancePatchStateFilter) SetValues(v []*string) *InstancePatchStateFilter {
	s.Values = v
	return s
}
1286933
func (s *ServiceFilter) SetValues(v []*string) *ServiceFilter {
	s.Values = v
	return s
}
211598
func addValueFuncs(out map[string]reflect.Value, in FuncMap) {
	for name, fn := range in {
		v := reflect.ValueOf(fn)
		if v.Kind() != reflect.Func {
			panic("value for " + name + " not a function")
		}
		if !goodFunc(v.Type()) {
			panic(fmt.Errorf("can't install method/function %q with %d results", name, v.Type().NumOut()))
		}
		out[name] = v
	}
}