// groupsSet returns a set of groups that the layouts contain
550451
func (l layouts) groupsSet() map[string]struct{} {
	m := make(map[string]struct{})
	for _, layout := range l {
		for grp := range layout.QuantitiesByGroup {
			m[grp] = struct{}{}
		}
	}
	return m
}
802515
func (s *WriteSegmentRequest) SetSegmentGroups(v *SegmentGroupList) *WriteSegmentRequest {
	s.SegmentGroups = v
	return s
}
443321
func (p *V2) GetGroups() ([]common.Group, error) {
	p.RLock()
	defer p.RUnlock()
	if len(p.groups) == 0 {
		return nil, common.ErrNotFound
	}
	groups := make([]common.Group, len(p.groups))
	i := 0
	for _, group := range p.groups {
		groups[i] = group
		i++
	}

	return groups, nil
}
1230537
func (s *SegmentResponse) SetSegmentGroups(v *SegmentGroupList) *SegmentResponse {
	s.SegmentGroups = v
	return s
}
40014
func (s *ListWorkGroupsOutput) SetWorkGroups(v []*WorkGroupSummary) *ListWorkGroupsOutput {
	s.WorkGroups = v
	return s
}
865957
func (s *Participants) SetGroups(v []*GroupMetadata) *Participants {
	s.Groups = v
	return s
}
398788
func (renderer *renderer) Fieldsets(fields []Field) (f []fieldset, err error) {
	if len(fields) > 0 {
		for _, field := range fields {
			cur := fieldset{}
			cur.AmqpType, err = renderer.FieldType(field)
			if err != nil {
				return
			}

			cur.NativeType, err = renderer.NativeType(cur.AmqpType)
			if err != nil {
				return
			}
			cur.Fields = append(cur.Fields, field)
			f = append(f, cur)
		}

		i, j := 0, 1
		for j < len(f) {
			if f[i].AmqpType == f[j].AmqpType {
				f[i].Fields = append(f[i].Fields, f[j].Fields...)
			} else {
				i++
				f[i] = f[j]
			}
			j++
		}
		return f[:i+1], nil
	}

	return
}
153475
func ParseGroups(resourceConfig cliflag.ConfigurationMap) ([]string, error) {
	groups := []string{}
	for key := range resourceConfig {
		if key == "api/all" {
			continue
		}
		tokens := strings.Split(key, "/")
		if len(tokens) != 2 && len(tokens) != 3 {
			return groups, fmt.Errorf("runtime-config invalid key %s", key)
		}
		groupVersionString := tokens[0] + "/" + tokens[1]
		groupVersion, err := schema.ParseGroupVersion(groupVersionString)
		if err != nil {
			return nil, fmt.Errorf("runtime-config invalid key %s", key)
		}
		groups = append(groups, groupVersion.Group)
	}

	return groups, nil
}
374269
func (s *JobFlowInstancesDetail) SetInstanceGroups(v []*InstanceGroupDetail) *JobFlowInstancesDetail {
	s.InstanceGroups = v
	return s
}
812070
func (s *GetCostAndUsageOutput) SetGroupDefinitions(v []*GroupDefinition) *GetCostAndUsageOutput {
	s.GroupDefinitions = v
	return s
}
822769
func (v *Container) ChildSet(w IWidget, propName string, value interface{}) {

	ptr := C.CString(propName)
	defer cfree(ptr)

	switch value.(type) {
	case bool:
		C._gtk_container_child_set_bool(CONTAINER(v), ToNative(w), gstring(ptr), gbool(value.(bool)))
	case int:
		C._gtk_container_child_set_int(CONTAINER(v), ToNative(w), gstring(ptr), gint(value.(int)))
	}
}
129833
func (s *User) SetGroups(v []*string) *User {
	s.Groups = v
	return s
}
783033
func (s *UpdateUserRequest) SetGroups(v []*string) *UpdateUserRequest {
	s.Groups = v
	return s
}
1215825
func GetGroups() (*Groups, error) {
	groups := NewGroups()
	if err := groups.GetGroups(); err != nil {
		return nil, err
	}

	return groups, nil
}
838941
func subsetOfGroups(inner, outer map[string]*cb.ConfigGroup) bool {
	// The empty set is a subset of all sets
	if len(inner) == 0 {
		return true
	}

	// If inner has more elements than outer, it cannot be a subset
	if len(inner) > len(outer) {
		return false
	}

	// If any element in inner is not in outer, it is not a subset
	for key := range inner {
		if _, ok := outer[key]; !ok {
			return false
		}
	}

	return true
}
251609
func (s *Set) AddGroup(group string) {
	if !s.All {
		if s.Groups == nil {
			s.Groups = make(groupSet, 1)
		}
		s.Groups[group] = struct{}{}
	}
}
976265
func (a allocSet) nameSet() map[string]struct{} {
	names := make(map[string]struct{}, len(a))
	for _, alloc := range a {
		names[alloc.Name] = struct{}{}
	}
	return names
}