// UnitName sets the optional parameter "unitName":
765233
func (c *UnitStateListCall) UnitName(unitName string) *UnitStateListCall {
	c.urlParams_.Set("unitName", unitName)
	return c
}
12962
func (r *EtcdRegistry) UnitState(name string) (state *unit.UnitState, err error) {
	var us *unit.UnitState
	us, err = r.stateByMUSKey(name)
	if err != nil {
		return nil, err
	}

	return us, nil
}
369102
func (s *CreateClusterInput) SetParameterGroupName(v string) *CreateClusterInput {
	s.ParameterGroupName = &v
	return s
}
250262
func opName(op interface{}) string {
	// We expect all ops to be pointers.
	t := reflect.TypeOf(op).Elem()

	// Strip the "Op" from "FooOp".
	return strings.TrimSuffix(t.Name(), "Op")
}
606171
func NewUnitNameInfo(un string) *UnitNameInfo {

	// Everything past the first @ and before the last . is the instance
	s := strings.LastIndex(un, ".")
	if s == -1 {
		return nil
	}

	nu := &UnitNameInfo{FullName: un}
	name := un[:s]
	suffix := un[s:]
	nu.Name = name

	a := strings.Index(name, "@")
	if a == -1 {
		// This does not appear to be a template or instance unit.
		nu.Prefix = name
		return nu
	}

	nu.Prefix = name[:a]
	nu.Template = fmt.Sprintf("%s@%s", name[:a], suffix)
	nu.Instance = name[a+1:]
	return nu
}
830708
func (s *CreateClusterParameterGroupInput) SetParameterGroupName(v string) *CreateClusterParameterGroupInput {
	s.ParameterGroupName = &v
	return s
}
500297
func (s *OptionConfiguration) SetOptionName(v string) *OptionConfiguration {
	s.OptionName = &v
	return s
}
873078
func (s *IspPlacement) SetIspName(v string) *IspPlacement {
	s.IspName = &v
	return s
}
1038553
func (s *UpdateRouteOutput) SetOperationName(v string) *UpdateRouteOutput {
	s.OperationName = &v
	return s
}
178454
func (q *SimpleQueryStringQuery) QueryName(queryName string) *SimpleQueryStringQuery {
	q.queryName = queryName
	return q
}
21279
func osName() string {
	name, err := syscall.Sysctl("kern.ostype")
	if err != nil {
		return runtime.GOOS
	}
	return name
}
1207295
func Name(n string) Option {
	return func(o *Options) {
		o.Server.Init(server.Name(n))
	}
}
649545
func InstanceName() (string, error) {
	host, err := Hostname()
	if err != nil {
		return "", err
	}
	return strings.Split(host, ".")[0], nil
}
623043
func (r *UnitsService) Set(unitName string, unit *Unit) *UnitsSetCall {
	c := &UnitsSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.unitName = unitName
	c.unit = unit
	return c
}
1230445
func (s *Option) SetOptionName(v string) *Option {
	s.OptionName = &v
	return s
}
950245
func (nsPayloads_) forUnitWithNames(unit string, names []string) bson.D {
	ids := make([]string, 0, len(names))
	for _, name := range names {
		ids = append(ids, nsPayloads.docID(unit, name))
	}
	return bson.D{{"_id", bson.D{{"$in", ids}}}}
}
301425
func (s *ProcessorParameter) SetParameterName(v string) *ProcessorParameter {
	s.ParameterName = &v
	return s
}