// SetTeamMembers sets the TeamMembers field's value.
976992
func (s *ListTeamMembersOutput) SetTeamMembers(v []*TeamMember) *ListTeamMembersOutput {
	s.TeamMembers = v
	return s
}
185873
func (hs *HTTPServer) UpdateTeam(c *m.ReqContext, cmd m.UpdateTeamCommand) Response {
	cmd.OrgId = c.OrgId
	cmd.Id = c.ParamsInt64(":teamId")

	if err := teamguardian.CanAdmin(hs.Bus, cmd.OrgId, cmd.Id, c.SignedInUser); err != nil {
		return Error(403, "Not allowed to update team", err)
	}

	if err := hs.Bus.Dispatch(&cmd); err != nil {
		if err == m.ErrTeamNameTaken {
			return Error(400, "Team name taken", err)
		}
		return Error(500, "Failed to update Team", err)
	}

	return Success("Team updated")
}
1353816
func (s *GetNodeInput) SetMemberId(v string) *GetNodeInput {
	s.MemberId = &v
	return s
}
492637
func (s *GroupMember) SetMemberName(v string) *GroupMember {
	s.MemberName = &v
	return s
}
989538
func SetMemberByName(ptrToStruct interface{}, name string, data interface{}) {
	structVal := reflect.Indirect(reflect.ValueOf(ptrToStruct))
	member := structVal.FieldByName(name)

	SetValue(member, data)
}
856672
func (s *ListNodesInput) SetMemberId(v string) *ListNodesInput {
	s.MemberId = &v
	return s
}
577801
func (s *TeamsService) ListTeamMembers(ctx context.Context, team int64, opt *TeamListTeamMembersOptions) ([]*User, *Response, error) {
	u := fmt.Sprintf("teams/%v/members", team)
	u, err := addOptions(u, opt)
	if err != nil {
		return nil, nil, err
	}

	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	req.Header.Set("Accept", mediaTypeNestedTeamsPreview)

	var members []*User
	resp, err := s.client.Do(ctx, req, &members)
	if err != nil {
		return nil, resp, err
	}

	return members, resp, nil
}
633239
func (s *CreateNodeInput) SetMemberId(v string) *CreateNodeInput {
	s.MemberId = &v
	return s
}
1090298
func (s *CreateProposalInput) SetMemberId(v string) *CreateProposalInput {
	s.MemberId = &v
	return s
}
402594
func (b *Bridge) SetChannelMembers(newMembers *config.ChannelMembers) {
	b.Lock()
	b.ChannelMembers = newMembers
	b.Unlock()
}
1289946
func (s *OptionConfiguration) SetDBSecurityGroupMemberships(v []*string) *OptionConfiguration {
	s.DBSecurityGroupMemberships = v
	return s
}
112801
func (tx *AddMemberTx) AddMemberByUsername(ctx context.Context, username string, role keybase1.TeamRole) (err error) {
	team := tx.team
	g := team.G()
	m := libkb.NewMetaContext(ctx, g)

	defer m.Trace(fmt.Sprintf("AddMemberTx.AddMemberByUsername(%s,%v) to team %q", username, role, team.Name()), func() error { return err })()

	upak, err := engine.ResolveAndCheck(m, username, true /* useTracking */)
	if err != nil {
		return err
	}
	_, err = tx.addMemberByUPKV2(ctx, upak, role)
	return err
}
92316
func (hs *HTTPServer) UpdateTeamMember(c *m.ReqContext, cmd m.UpdateTeamMemberCommand) Response {
	teamId := c.ParamsInt64(":teamId")
	orgId := c.OrgId

	if err := teamguardian.CanAdmin(hs.Bus, orgId, teamId, c.SignedInUser); err != nil {
		return Error(403, "Not allowed to update team member", err)
	}

	if c.OrgRole != m.ROLE_ADMIN {
		cmd.ProtectLastAdmin = true
	}

	cmd.TeamId = teamId
	cmd.UserId = c.ParamsInt64(":userId")
	cmd.OrgId = orgId

	if err := hs.Bus.Dispatch(&cmd); err != nil {
		if err == m.ErrTeamMemberNotFound {
			return Error(404, "Team member not found.", nil)
		}
		return Error(500, "Failed to update team member.", err)
	}
	return Success("Team member updated")
}
201533
func (s *ListGroupMembersOutput) SetMembers(v []*Member) *ListGroupMembersOutput {
	s.Members = v
	return s
}
283460
func (s *SubscribedWorkteam) SetWorkteamArn(v string) *SubscribedWorkteam {
	s.WorkteamArn = &v
	return s
}
183324
func (s *DescribeSubscribedWorkteamOutput) SetSubscribedWorkteam(v *SubscribedWorkteam) *DescribeSubscribedWorkteamOutput {
	s.SubscribedWorkteam = v
	return s
}
733201
func (s *HumanTaskConfig) SetWorkteamArn(v string) *HumanTaskConfig {
	s.WorkteamArn = &v
	return s
}