// Sets the value of the internal Quantity. (used by flag & pflag)
496601
func (qf qFlag) Set(val string) error {
	q, err := ParseQuantity(val)
	if err != nil {
		return err
	}
	// This copy is OK because q will not be referenced again.
	*qf.dest = *q
	return nil
}
405775
func (s *Aliases) SetQuantity(v int64) *Aliases {
	s.Quantity = &v
	return s
}
1016049
func (c *ListCommand) SetFlags(f *gnuflag.FlagSet) {
	c.SpaceCommandBase.SetFlags(f)
	c.out.AddFlags(f, "tabular", map[string]cmd.Formatter{
		"yaml":    cmd.FormatYaml,
		"json":    cmd.FormatJson,
		"tabular": c.printTabular,
	})
	f.BoolVar(&c.Short, "short", false, "only display spaces.")
}
556348
func (f *commaListFlag) Set(s string) error {
	if f == nil {
		return errors.Reason("commaListFlag pointer is nil").Err()
	}
	*f = splitCommaList(s)
	return nil
}
819322
func (g *Gauge) Set(value float64) {
	g.obs(g.name, lv.LabelValues{}, value)
}
595261
func (s *SeverityFlag) Set(value string) error {
	sev, err := log.ParseLevel(strings.ToLower(value))
	if err != nil {
		return err
	}
	s.S = sev
	return nil
}
434254
func (c *ListCommand) SetFlags(f *gnuflag.FlagSet) {
	c.ModelCommandBase.SetFlags(f)
	const defaultFormat = "tabular"
	c.out.AddFlags(f, defaultFormat, map[string]cmd.Formatter{
		defaultFormat: FormatAppTabular,
		"yaml":        cmd.FormatYaml,
		"json":        cmd.FormatJson,
	})

	f.BoolVar(&c.details, "details", false, "show detailed information about resources used by each unit.")
}
1145384
func (c *CommandBase) SetFlags(f *gnuflag.FlagSet) {
	c.ModelCommandBase.SetFlags(f)
	if c.Log != nil {
		c.Log.AddFlags(f)
	}
}
236766
func (s *QueryArgProfiles) SetQuantity(v int64) *QueryArgProfiles {
	s.Quantity = &v
	return s
}
517021
func (f *int32Flag) Set(s string) error {
	i, err := strconv.ParseInt(s, 10, 32)
	if err != nil {
		return errors.Reason("values must be 32-bit integers").Err()
	}
	*f = int32Flag(i)
	return nil
}
897319
func (c *showCommand) SetFlags(f *gnuflag.FlagSet) {
	c.RemoteEndpointsCommandBase.SetFlags(f)
	c.out.AddFlags(f, "tabular", map[string]cmd.Formatter{
		"yaml":    cmd.FormatYaml,
		"json":    cmd.FormatJson,
		"tabular": formatShowTabular,
	})
}
823888
func (c *updateCredentialCommand) SetFlags(f *gnuflag.FlagSet) {
	c.ControllerCommandBase.SetFlags(f)
}
444925
func (p *Parser) SetFlags(flags interface{}) {
	flagsElement := reflect.ValueOf(flags).Elem()
	flagsType := flagsElement.Type()
	for i := 0; i < flagsElement.NumField(); i++ {
		typeField := flagsType.Field(i)
		elementField := flagsElement.Field(i)
		var deletion string
		for k, v := range p.flags {
			if k == typeField.Tag.Get(v.kind) && elementField.CanSet() {
				var err error
				switch elementField.Kind() {
				case reflect.Bool:
					elementField.SetBool(true)
				case reflect.String:
					elementField.SetString(v.value)
				case reflect.Int64:
					i, e := strconv.ParseInt(v.value, 10, 64)
					if e == nil {
						elementField.SetInt(i)
					} else {
						err = e
					}
				case reflect.Uint64:
					u, e := strconv.ParseUint(v.value, 10, 64)
					if e == nil {
						elementField.SetUint(u)
					} else {
						err = e
					}
				case reflect.Float64:
					f, e := strconv.ParseFloat(v.value, 64)
					if e == nil {
						elementField.SetFloat(f)
					} else {
						err = e
					}
				default:
					panic("[cli-ng] Unsupported flag type: " + elementField.Kind().String())
				}
				if err != nil {
					panic("Failed to parse flag '" + k + "', reason: " + err.Error())
				}
				deletion = k
				break
			}
		}
		if deletion != "" {
			delete(p.flags, deletion)
		}
	}
}
149708
func (m *MemBytes) Set(value string) error {
	val, err := units.RAMInBytes(value)
	*m = MemBytes(val)
	return err
}
867244
func (q *Quantity) SetScaled(value int64, scale Scale) {
	if q.Amount == nil {
		q.Amount = &inf.Dec{}
	}
	q.Amount.SetUnscaled(value)
	q.Amount.SetScale(scale.infScale())
}
386396
func (s *CacheBehaviors) SetQuantity(v int64) *CacheBehaviors {
	s.Quantity = &v
	return s
}
1329134
func (s *ActiveTrustedSigners) SetQuantity(v int64) *ActiveTrustedSigners {
	s.Quantity = &v
	return s
}