// NewGroupsListResult returns a new GroupsListResult instance
165919
func NewGroupsListResult(Groups []*team_common.GroupSummary, Cursor string, HasMore bool) *GroupsListResult {
	s := new(GroupsListResult)
	s.Groups = Groups
	s.Cursor = Cursor
	s.HasMore = HasMore
	return s
}
1266186
func NewListSharedLinksResult(Links []IsSharedLinkMetadata, HasMore bool) *ListSharedLinksResult {
	s := new(ListSharedLinksResult)
	s.Links = Links
	s.HasMore = HasMore
	return s
}
866107
func NewGroupBy(fields []string, reducers ...Reducer) *GroupBy {
	return &GroupBy{
		Fields:   fields,
		reducers: reducers,
	}
}
301706
func (sl *Slack) GroupsList() ([]*Group, error) {
	uv := sl.urlValues()
	body, err := sl.GetRequest(groupsListApiEndpoint, uv)
	if err != nil {
		return nil, err
	}
	res := new(GroupsListAPIResponse)
	err = json.Unmarshal(body, res)
	if err != nil {
		return nil, err
	}
	if !res.Ok {
		return nil, errors.New(res.Error)
	}
	return res.Groups()
}
795871
func NewGenResult(result interface{}, shrinker Shrinker) *GenResult {
	return &GenResult{
		Shrinker:   shrinker,
		ResultType: reflect.TypeOf(result),
		Result:     result,
	}
}
361535
func (g *groupRegistry) newGroup() *Group {
	c := &Group{
		g:        g,
		counters: make([]Counter, len(g.group.counters)),
		timers:   make([]Timer, len(g.group.timers)),
	}
	copy(c.counters, g.group.counters)
	copy(c.timers, g.group.timers)

	return c
}
742419
func (ff *firstRowFunction) GetGroupResult(groupKey []byte) types.Datum {
	return ff.getContext(groupKey).Value
}
569933
func (cf *countFunction) GetGroupResult(groupKey []byte) (d types.Datum) {
	d.SetInt64(cf.getContext(groupKey).Count)
	return d
}
1118657
func newGroups(permstring string) groups {
	plusStrSlice := strings.Split(permstring, "|")
	lr := len(plusStrSlice)
	result := make(groups, lr, lr)
	for i, plusStr := range plusStrSlice {
		result[i] = newGroup(plusStr)
	}
	return result
}
379719
func NewListFolderLongpollResult(Changes bool) *ListFolderLongpollResult {
	s := new(ListFolderLongpollResult)
	s.Changes = Changes
	return s
}
21649
func NewConsumerGroup(brokers []string, topic string, group string, offset int64) (*ConsumerGroup, error) {
	return newConsumer(brokers, topic, group, offset, false)
}
109779
func NewGroupByFinal(ctx *plan.Context, p *plan.GroupBy) *GroupByFinal {
	m := &GroupByFinal{
		TaskBase: NewTaskBase(ctx),
		p:        p,
		complete: make(chan bool),
	}
	return m
}
860694
func NewGroupRemoveExternalIdDetails(PreviousValue string) *GroupRemoveExternalIdDetails {
	s := new(GroupRemoveExternalIdDetails)
	s.PreviousValue = PreviousValue
	return s
}
1160035
func newGroup(client *Client, id int32) *GroupNode {
	return &GroupNode{
		client: client,
		id:     id,
	}
}
190373
func NewListFileMembersBatchResult(File string, Result *ListFileMembersIndividualResult) *ListFileMembersBatchResult {
	s := new(ListFileMembersBatchResult)
	s.File = File
	s.Result = Result
	return s
}
1152006
func NewGroup(remotes []string, tlsConfig *tls.Config, strategy Strategy) (Remote, error) {
	var servers = make([]*server, len(remotes))
	for i := range remotes {
		u, err := normalizeURL(remotes[i])
		if err != nil {
			return nil, err
		}
		servers[i] = newServer(u, tlsConfig)
	}

	switch strategy {
	case StrategyOrderedList:
		return newOrdererdListGroup(servers)
	default:
		return nil, errors.New("unrecognised strategy")
	}
}
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
}