// Values returns the ChannelsListCall object as url.Values
426047
func (c *ChannelsListCall) Values() (url.Values, error) {
	if err := c.ValidateArgs(); err != nil {
		return nil, errors.Wrap(err, `failed validation`)
	}
	v := url.Values{}
	v.Set(`token`, c.service.token)

	if c.excludeArchive {
		v.Set("exclude_archive", "true")
	}

	if c.excludeMembers {
		v.Set("exclude_members", "true")
	}

	if c.limit > 0 {
		v.Set("limit", strconv.Itoa(c.limit))
	}
	return v, nil
}
520639
func Values(values cty.Value) (cty.Value, error) {
	return ValuesFunc.Call([]cty.Value{values})
}
1359768
func (s *SampleSnapshot) Values() []int64 {
	values := make([]int64, len(s.values))
	copy(values, s.values)
	return values
}
751591
func (c *DialogOpenCall) Values() (url.Values, error) {
	if err := c.ValidateArgs(); err != nil {
		return nil, errors.Wrap(err, `failed validation`)
	}
	v := url.Values{}
	v.Set(`token`, c.service.token)

	dialogEncoded, err := c.dialog.Encode()
	if err != nil {
		return nil, errors.Wrap(err, `failed to encode field`)
	}
	v.Set("dialog", dialogEncoded)

	v.Set("trigger_id", c.trigger_id)
	return v, nil
}
500119
func (c *ReactionsGetCall) Values() (url.Values, error) {
	if err := c.ValidateArgs(); err != nil {
		return nil, errors.Wrap(err, `failed validation`)
	}
	v := url.Values{}
	v.Set(`token`, c.service.token)

	if len(c.channel) > 0 {
		v.Set("channel", c.channel)
	}

	if len(c.file) > 0 {
		v.Set("file", c.file)
	}

	if len(c.fileComment) > 0 {
		v.Set("fileComment", c.fileComment)
	}

	if c.full {
		v.Set("full", "true")
	}

	if len(c.timestamp) > 0 {
		v.Set("timestamp", c.timestamp)
	}
	return v, nil
}
323236
func (c *GroupsHistoryCall) FromValues(v url.Values) error {
	var tmp GroupsHistoryCall
	if raw := strings.TrimSpace(v.Get("channel")); len(raw) > 0 {
		tmp.channel = raw
	}
	if raw := strings.TrimSpace(v.Get("count")); len(raw) > 0 {
		parsed, err := strconv.ParseInt(raw, 10, 64)
		if err != nil {
			return errors.Wrap(err, `failed to parse integer value "count"`)
		}
		tmp.count = int(parsed)
	}
	if raw := strings.TrimSpace(v.Get("inclusive")); len(raw) > 0 {
		parsed, err := strconv.ParseBool(raw)
		if err != nil {
			return errors.Wrap(err, `failed to parse boolean value "inclusive"`)
		}
		tmp.inclusive = parsed
	}
	if raw := strings.TrimSpace(v.Get("latest")); len(raw) > 0 {
		tmp.latest = raw
	}
	if raw := strings.TrimSpace(v.Get("oldest")); len(raw) > 0 {
		tmp.oldest = raw
	}
	if raw := strings.TrimSpace(v.Get("unreads")); len(raw) > 0 {
		parsed, err := strconv.ParseBool(raw)
		if err != nil {
			return errors.Wrap(err, `failed to parse boolean value "unreads"`)
		}
		tmp.unreads = parsed
	}
	*c = tmp
	return nil
}
389051
func (r *Request) QueryValues() url.Values {
	if r.Values == nil {
		if r.Request != nil {
			r.Values = r.Request.URL.Query()
		} else {
			r.Values = url.Values{}
		}
	}
	return r.Values
}
186144
func (c *GroupsRenameCall) Values() (url.Values, error) {
	if err := c.ValidateArgs(); err != nil {
		return nil, errors.Wrap(err, `failed validation`)
	}
	v := url.Values{}
	v.Set(`token`, c.service.token)

	v.Set("channel", c.channel)

	v.Set("name", c.name)

	if c.validate {
		v.Set("validate", "true")
	}
	return v, nil
}
1294700
func (m *Meta) Values(i interface{}, cols ...string) []interface{} {
	ptr := reflects.Ptr(i)
	values := make([]interface{}, len(cols))
	for i, f := range cols {
		values[i] = m.fieldMap[f].Get(ptr)
	}
	return values
}
954669
func Values(e error) map[interface{}]interface{} {
	if e == nil {
		return nil
	}
	var values map[interface{}]interface{}
	for {
		w, ok := e.(*merryErr)
		if !ok {
			return values
		}
		if values == nil {
			values = make(map[interface{}]interface{}, 1)
		}
		if _, ok := values[w.key]; !ok {
			values[w.key] = w.value
		}
		e = w.err
	}
}
898971
func ListValues(v string) (spl []string) {
	if len(v) == 0 {
		return
	}
	lastWs := true
	wsr := func(r rune) bool {
		return (r == ' ') || (r == '\r') || (r == '\n') || (r == '\t')
	}
	wss := func(r string) bool {
		return (r == " ") || (r == "\r") || (r == "\n") || (r == "\t")
	}
	for wss(v[len(v)-1:]) {
		v = v[:len(v)-1]
	}
	for wss(v[:1]) {
		v = v[1:]
	}
	if len(v) > 0 {
		cur, num, i := "", 1, 0
		for _, r := range v {
			if wsr(r) {
				if !lastWs {
					num++
					lastWs = true
				}
			} else {
				lastWs = false
			}
		}
		lastWs, spl = true, make([]string, num)
		for _, r := range v {
			if wsr(r) {
				if !lastWs {
					if len(cur) > 0 {
						spl[i] = cur
						i++
					}
					cur, lastWs = "", true
				}
			} else {
				lastWs = false
				cur += string(r)
			}
		}
		if len(cur) > 0 {
			spl[i] = cur
		}
	}
	return
}
938195
func (c *UsersProfileGetCall) Values() (url.Values, error) {
	if err := c.ValidateArgs(); err != nil {
		return nil, errors.Wrap(err, `failed validation`)
	}
	v := url.Values{}
	v.Set(`token`, c.service.token)

	if c.includeLabels {
		v.Set("include_labels", "true")
	}

	if len(c.user) > 0 {
		v.Set("user", c.user)
	}
	return v, nil
}
464807
func (c *GroupsArchiveCall) Values() (url.Values, error) {
	if err := c.ValidateArgs(); err != nil {
		return nil, errors.Wrap(err, `failed validation`)
	}
	v := url.Values{}
	v.Set(`token`, c.service.token)

	v.Set("channel", c.channel)
	return v, nil
}
412536
func buildValues(value string, ttl uint64) url.Values {
	v := url.Values{}

	if value != "" {
		v.Set("value", value)
	}

	if ttl > 0 {
		v.Set("ttl", fmt.Sprintf("%v", ttl))
	}

	return v
}
704612
func Values(cols []string, v interface{}) ([]interface{}, error) {
	vals := make([]interface{}, len(cols))
	model, err := reflectValue(v)
	if err != nil {
		return nil, fmt.Errorf("values: %v", err)
	}

	fields := loadFields(model)

	for i, col := range cols {
		j, ok := fields[col]
		if !ok {
			return nil, fmt.Errorf("field %T.%q either does not exist or is unexported", v, col)
		}

		vals[i] = model.Field(j).Interface()
	}
	return vals, nil
}
769430
func (config DocumentConfig) values() (url.Values, error) {
	v, err := config.BaseChat.values()
	if err != nil {
		return v, err
	}

	v.Add(config.name(), config.FileID)
	if config.Caption != "" {
		v.Add("caption", config.Caption)
		if config.ParseMode != "" {
			v.Add("parse_mode", config.ParseMode)
		}
	}

	return v, nil
}
281209
func (stmt RetInsertStmt) Values(args interface{}) RetInsertStmt {
	stmt.InsertStmt = stmt.InsertStmt.Values(args)
	return stmt
}