// Value returns the value key as a string
352948
func Value(res *api.GenericResource) string {
	switch res := res.Resource.(type) {
	case *api.GenericResource_DiscreteResourceSpec:
		return discreteToString(res)
	case *api.GenericResource_NamedResourceSpec:
		return res.NamedResourceSpec.Value
	}

	return ""
}
1261427
func Value(keyvals []interface{}, key interface{}) interface{} {
	for i := 0; i < 2*(len(keyvals)/2); i += 2 {
		if keyvals[i] == key {
			return keyvals[i+1]
		}
	}
	return nil
}
644567
func (resultsTable ResultsTable) Value() (driver.Value, error) {
	result, err := json.Marshal(resultsTable)
	return string(result), err
}
851225
func (t SQLUUID) Value() (v driver.Value, err error) {
	if t == "" {
		return nil, nil
	}
	return string(t), nil
}
1323424
func (i *tableIter) Value() []byte {
	if i.data == nil {
		return nil
	}
	return i.data.Value()
}
1249378
func (d *decodeState) value(v reflect.Value) error {
	if !v.IsValid() {
		_, rest, err := nextValue(d.data[d.off:], &d.nextscan)
		if err != nil {
			return err
		}
		d.off = len(d.data) - len(rest)

		// d.scan thinks we're still at the beginning of the item.
		// Feed in an empty string - the shortest, simplest value -
		// so that it knows we got to the end of the value.
		if d.scan.redo {
			// rewind.
			d.scan.redo = false
			d.scan.step = stateBeginValue
		}
		d.scan.step(&d.scan, '"')
		d.scan.step(&d.scan, '"')

		n := len(d.scan.parseState)
		if n > 0 && d.scan.parseState[n-1] == parseObjectKey {
			// d.scan thinks we just read an object key; finish the object
			d.scan.step(&d.scan, ':')
			d.scan.step(&d.scan, '"')
			d.scan.step(&d.scan, '"')
			d.scan.step(&d.scan, '}')
		}

		return nil
	}

	switch op := d.scanWhile(scanSkipSpace); op {
	default:
		return errPhase

	case scanBeginArray:
		return d.array(v)

	case scanBeginObject:
		return d.object(v)

	case scanBeginLiteral:
		return d.literal(v)
	}
}
1043378
func (h *Handle) Value() []byte {
	b, err := json.Marshal(h)
	if err != nil {
		return nil
	}
	return b
}
508515
func (i Int) Value() (driver.Value, error) {
	sa := make([]string, len(i))
	for x, v := range i {
		sa[x] = strconv.Itoa(v)
	}
	return fmt.Sprintf("{%s}", strings.Join(sa, ",")), nil
}
835336
func (c *UsersProfileSetCall) Value(value string) *UsersProfileSetCall {
	c.value = value
	return c
}
582634
func (l *Lock) Value() (bool, string, error) {
	defer metrics.MeasureSince(metricLockValue, time.Now())

	r, err := l.get(context.Background())
	if err != nil {
		return false, "", err
	}
	if r == nil {
		return false, "", err
	}
	return true, string(r.Value), nil
}
1263917
func (kv KeyVal) Value() string {
	if !strings.Contains(string(kv), "=") {
		return ""
	}
	return strings.SplitN(strings.TrimSpace(string(kv)), "=", 2)[1]
}
631360
func (l *DynamoDBLock) Value() (bool, string, error) {
	entry, err := l.backend.Get(context.Background(), l.key)
	if err != nil {
		return false, "", err
	}
	if entry == nil {
		return false, "", nil
	}

	return true, string(entry.Value), nil
}
819214
func (iter *Iterator) Value() Entry {
	if iter.n == nil {
		return nil
	}

	return iter.n.entry
}
353035
func (p *ctx) Value(key interface{}) interface{} {
	if k, ok := key.(string); ok {
		if val, exist := p.ParamOk(k); exist {
			return val
		}
	}

	return p.parent.Value(key)
}
975996
func (it *iterator) Value() []byte {
	if len(it.values) > 0 {
		return it.values[0]
	}
	return nil
}
1073536
func (h Headers) Value(k string) string {
	for i := 0; i < len(h); i += 2 {
		if h[i] == k {
			return h[i+1]
		}
	}
	return ""
}
233154
func (t *iterator) Value() []byte {
	if t.i0 < 0 {
		return nil
	}
	return t.buf[t.i0][fVal]
}