// ToParam generate param for scope
420305
func (scope *Scope) ToParam() string {
	if scope.Param != "" {
		return scope.Param
	}
	return utils.ToParamString(scope.Name)
}
340734
func (m *Mrb) TopSelf() *MrbValue {
	return newValue(m.state, C.mrb_obj_value(unsafe.Pointer(m.state.top_self)))
}
261282
func (b *HttpRequest) Param(key, value string) *HttpRequest {
	b.params[key] = value
	return b
}
1074157
func (b *Builder) SelectorParam(s string) *Builder {
	selector, err := labels.Parse(s)
	if err != nil {
		b.errs = append(b.errs, fmt.Errorf("the provided selector %q is not valid: %v", s, err))
		return b
	}
	if selector.Empty() {
		return b
	}
	if b.selectAll {
		b.errs = append(b.errs, fmt.Errorf("found non empty selector %q with previously set 'all' parameter. ", s))
		return b
	}
	return b.Selector(selector)
}
1343711
func (r *Request) Param(name, value string) *Request {
	r.Use(url.Param(name, value))
	return r
}
1178676
func ToParamWithVersion(version string, a Args) (string, error) {
	if a.Len() == 0 {
		return "", nil
	}

	if version != "" && versions.LessThan(version, "1.22") {
		buf, err := json.Marshal(convertArgsToSlice(a.fields))
		return string(buf), err
	}

	return ToJSON(a)
}
1133495
func Param(r *http.Request, key string) string {
	p := Params(r)
	if v, ok := p[key]; ok {
		return v
	}
	return ""
}
1020385
func (cmd *CLI) Params() values.Map {
	params := make(values.Map)
	for param, value := range cmd.paramValues {
		params[param.Name] = value
	}
	return params
}
404715
func (iampb *IAMPrincipalBuilder) ToPrivilege() sparta.IAMRolePrivilege {
	privilege := sparta.IAMRolePrivilege{
		Actions:   iampb.builder.apiCalls,
		Principal: iampb.principal,
	}
	if iampb.builder.condition != nil {
		privilege.Condition = iampb.builder.condition
	}
	return privilege
}
1159800
func (b *Builder) NamespaceParam(namespace string) *Builder {
	b.namespace = namespace
	return b
}
92753
func (r *Rets) ToParams() []*Param {
	ps := make([]*Param, 0)
	if len(r.Name) > 0 {
		ps = append(ps, &Param{Name: r.Name, Type: r.Type})
	}
	if r.ReturnsError {
		ps = append(ps, &Param{Name: "err", Type: "error"})
	}
	return ps
}
898584
func (ctx *Context) Param(key string) string {
	val, _ := ctx.Params.ByName(key)
	return val
}
499751
func (s *Script) Param(name string, value interface{}) *Script {
	if s.params == nil {
		s.params = make(map[string]interface{})
	}
	s.params[name] = value
	return s
}
62743
func (job MachineJob) ToParams() multiwatcher.MachineJob {
	if jujuJob, ok := jobNames[job]; ok {
		return jujuJob
	}
	return multiwatcher.MachineJob(fmt.Sprintf("<unknown job %d>", int(job)))
}
943998
func Param(i interface{}) string {
	switch v := i.(type) {
	case string:
		return v
	case []string:
		return strings.Join(v, ",")
	case int:
		return strconv.Itoa(v)
	case []int:
		return slices.Ints(v).Join("", ",")
	case uint:
		return strconv.FormatUint(uint64(v), 10)
	case []uint:
		return slices.Uints(v).Join("", ",")
	case []byte:
		return string(v)
	}

	panic("Only support int, []int, uint, []uint, string, []string, []byte")
}
832537
func (c *C) Param(name string) string {
	return c.params.ByName(name)
}
3593
func (cmd *CLI) Param(name string) values.Value {
	value, ok := cmd.Params()[name]
	if !ok {
		panic(fmt.Sprintf("param not defined %v", name))
	}
	return value
}