// SaaSApplicationGroups retrieves the list of child SaaSApplicationGroups of the Enterprise
322689
func (o *Enterprise) SaaSApplicationGroups(info *bambou.FetchingInfo) (SaaSApplicationGroupsList, *bambou.Error) {

	var list SaaSApplicationGroupsList
	err := bambou.CurrentSession().FetchChildren(o, SaaSApplicationGroupIdentity, &list, info)
	return list, err
}
476676
func (c *VFSClientset) InstanceGroupsFor(cluster *kops.Cluster) kopsinternalversion.InstanceGroupInterface {
	return newInstanceGroupVFS(c, cluster)
}
456810
func (c *FakeDiscovery) ServerGroups() (*metav1.APIGroupList, error) {
	action := testing.ActionImpl{
		Verb:     "get",
		Resource: schema.GroupVersionResource{Resource: "group"},
	}
	c.Invokes(action, nil)

	groups := map[string]*metav1.APIGroup{}

	for _, res := range c.Resources {
		gv, err := schema.ParseGroupVersion(res.GroupVersion)
		if err != nil {
			return nil, err
		}
		group := groups[gv.Group]
		if group == nil {
			group = &metav1.APIGroup{
				Name: gv.Group,
				PreferredVersion: metav1.GroupVersionForDiscovery{
					GroupVersion: res.GroupVersion,
					Version:      gv.Version,
				},
			}
			groups[gv.Group] = group
		}

		group.Versions = append(group.Versions, metav1.GroupVersionForDiscovery{
			GroupVersion: res.GroupVersion,
			Version:      gv.Version,
		})
	}

	list := &metav1.APIGroupList{}
	for _, apiGroup := range groups {
		list.Groups = append(list.Groups, *apiGroup)
	}

	return list, nil

}
922920
func (groups *Groups) GetGroups() error {
	req, err := client.NewRequest(
		Config,
		"GET",
		"/papi/v1/groups",
		nil,
	)
	if err != nil {
		return err
	}

	res, err := client.Do(Config, req)
	if err != nil {
		return err
	}

	if client.IsError(res) {
		return client.NewAPIError(res)
	}

	if err = client.BodyJSON(res, groups); err != nil {
		return err
	}

	return nil
}
668228
func InstanceGroups(svc *compute.Service, proj, zone string) (map[string]InstanceGroupAndManager, error) {
	managerList, err := svc.InstanceGroupManagers.List(proj, zone).Do()
	if err != nil {
		return nil, err
	}
	if managerList.NextPageToken != "" {
		return nil, errors.New("too many managers; pagination not supported")
	}
	managedBy := make(map[string]*compute.InstanceGroupManager) // instance group URL -> its manager
	for _, it := range managerList.Items {
		managedBy[it.InstanceGroup] = it
	}
	groupList, err := svc.InstanceGroups.List(proj, zone).Do()
	if err != nil {
		return nil, err
	}
	if groupList.NextPageToken != "" {
		return nil, errors.New("too many instance groups; pagination not supported")
	}
	ret := make(map[string]InstanceGroupAndManager)
	for _, it := range groupList.Items {
		ret[it.SelfLink] = InstanceGroupAndManager{it, managedBy[it.SelfLink]}
	}
	return ret, nil
}
793346
func (n *nessusImpl) ListGroups() ([]Group, error) {
	if n.verbose {
		log.Println("Listing groups...")
	}

	resp, err := n.doRequest("GET", "/groups", nil, []int{http.StatusOK})
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	reply := &listGroupsResp{}
	if err = json.NewDecoder(resp.Body).Decode(&reply); err != nil {
		return nil, err
	}
	return reply.Groups, nil
}
1153513
func (o *Enterprise) PolicyGroupCategories(info *bambou.FetchingInfo) (PolicyGroupCategoriesList, *bambou.Error) {

	var list PolicyGroupCategoriesList
	err := bambou.CurrentSession().FetchChildren(o, PolicyGroupCategoryIdentity, &list, info)
	return list, err
}
1045113
func (s *DescribeParameterGroupsOutput) SetParameterGroups(v []*ParameterGroup) *DescribeParameterGroupsOutput {
	s.ParameterGroups = v
	return s
}
347147
func (api *Client) GetGroups(excludeArchived bool) ([]Group, error) {
	return api.GetGroupsContext(context.Background(), excludeArchived)
}
377572
func (b *Broker) ListGroups(request *ListGroupsRequest) (*ListGroupsResponse, error) {
	response := new(ListGroupsResponse)

	err := b.sendAndReceive(request, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}
1043298
func (r Hardware_Server) GetResourceGroups() (resp []datatypes.Resource_Group, err error) {
	err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroups", nil, &r.Options, &resp)
	return
}
830318
func (o *NSGGroup) DUCGroupBindings(info *bambou.FetchingInfo) (DUCGroupBindingsList, *bambou.Error) {

	var list DUCGroupBindingsList
	err := bambou.CurrentSession().FetchChildren(o, DUCGroupBindingIdentity, &list, info)
	return list, err
}
1240126
func (res *GroupsListAPIResponse) Groups() ([]*Group, error) {
	var groups []*Group
	err := json.Unmarshal(res.RawGroups, &groups)
	if err != nil {
		return nil, err
	}
	return groups, nil
}
917121
func (t *Template) GetAllAWSInspectorResourceGroupResources() map[string]*resources.AWSInspectorResourceGroup {
	results := map[string]*resources.AWSInspectorResourceGroup{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSInspectorResourceGroup:
			results[name] = resource
		}
	}
	return results
}
853816
func (c *Client) ListSecurityGroups(p *ListSecurityGroupsParameter) ([]*SecurityGroup, error) {
	obj, err := c.Request("listSecurityGroups", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.([]*SecurityGroup), err
}
250263
func (st *State) AllApplications() (applications []*Application, err error) {
	applicationsCollection, closer := st.db().GetCollection(applicationsC)
	defer closer()

	sdocs := []applicationDoc{}
	err = applicationsCollection.Find(bson.D{}).All(&sdocs)
	if err != nil {
		return nil, errors.Errorf("cannot get all applications")
	}
	for _, v := range sdocs {
		applications = append(applications, newApplication(st, &v))
	}
	return applications, nil
}
469650
func (ip *Interpreter) userGroups(args []string) {
	items, err := ip.Backend.UserGroups(args[0])
	ip.groupResponder(items, err)
}