// AppCollaborators fetches the application collaborators
765127
func (a *Account) AppCollaborators(appID string) ([]Collaborator, error) {
	collaborators := make([]Collaborator, 0)
	err := a.get(a.auth.WithScope(scope.App(appID)), fmt.Sprintf("/api/v2/applications/%s/collaborators", appID), &collaborators)
	if err != nil {
		return nil, err
	}

	return collaborators, nil
}
1144459
func (r Virtual_PlacementGroup) GetAvailableRouters(datacenterId *int) (resp []datatypes.Hardware, err error) {
	params := []interface{}{
		datacenterId,
	}
	err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getAvailableRouters", params, &r.Options, &resp)
	return
}
1299744
func (s *DomainsService) RemoveCollaborator(accountID string, domainIdentifier string, collaboratorID int64) (*collaboratorResponse, error) {
	path := versioned(collaboratorPath(accountID, domainIdentifier, collaboratorID))
	collaboratorResponse := &collaboratorResponse{}

	resp, err := s.client.delete(path, nil, nil)
	if err != nil {
		return nil, err
	}

	collaboratorResponse.HttpResponse = resp
	return collaboratorResponse, nil
}
351889
func (o *Ownership) GetCollaborators() map[string]Ownership_AccessType {
	if o.GetAcls() == nil {
		return nil
	}
	return o.GetAcls().GetCollaborators()
}
20199
func (c *Client) ListAppEvents(eventType string) ([]AppEventEntity, error) {
	return c.ListAppEventsByQuery(eventType, nil)
}
715692
func (c *Client) CollaboratorInfo(appIdentity string, collaboratorIdentity string) (*Collaborator, error) {
	var collaborator Collaborator
	return &collaborator, c.Get(&collaborator, "/apps/"+appIdentity+"/collaborators/"+collaboratorIdentity)
}
748776
func (s *CreateCommentInput) SetNotifyCollaborators(v bool) *CreateCommentInput {
	s.NotifyCollaborators = &v
	return s
}
387993
func (o *VNFDescriptor) VNFInterfaceDescriptors(info *bambou.FetchingInfo) (VNFInterfaceDescriptorsList, *bambou.Error) {

	var list VNFInterfaceDescriptorsList
	err := bambou.CurrentSession().FetchChildren(o, VNFInterfaceDescriptorIdentity, &list, info)
	return list, err
}
20676
func (f *Facade) ApplicationsConfig(args params.Entities) (params.ApplicationGetConfigResults, error) {
	results := params.ApplicationGetConfigResults{
		Results: make([]params.ConfigResult, len(args.Entities)),
	}
	for i, arg := range args.Entities {
		result, err := f.getApplicationConfig(arg.Tag)
		results.Results[i].Config = result
		results.Results[i].Error = common.ServerError(err)
	}
	return results, nil
}
1196621
func (repo *Repository) AddCollaborator(u *User) error {
	collaboration := &Collaboration{
		RepoID: repo.ID,
		UserID: u.ID,
	}

	has, err := x.Get(collaboration)
	if err != nil {
		return err
	} else if has {
		return nil
	}
	collaboration.Mode = ACCESS_MODE_WRITE

	sess := x.NewSession()
	defer sess.Close()
	if err = sess.Begin(); err != nil {
		return err
	}

	if _, err = sess.Insert(collaboration); err != nil {
		return err
	} else if err = repo.recalculateAccesses(sess); err != nil {
		return fmt.Errorf("recalculateAccesses [repo_id: %v]: %v", repo.ID, err)
	}

	return sess.Commit()
}
814034
func (s *Service) CollaboratorCreate(ctx context.Context, appIdentity string, o CollaboratorCreateOpts) (*Collaborator, error) {
	var collaborator Collaborator
	return &collaborator, s.Post(ctx, &collaborator, fmt.Sprintf("/apps/%v/collaborators", appIdentity), o)
}
853831
func GetAppsResources(apps schema.AppList) (totalCpus, totalMem int64) {
	cpusSpecified := false
	for i := range apps {
		ra := &apps[i]
		app := ra.App
		mem, cpus := findResources(app.Isolators)
		cpusSpecified = cpusSpecified || cpus != 0
		totalCpus += cpus
		totalMem += mem
	}
	// In case when number of specified cpus is greater than
	// number or when cpus aren't specified, we set number
	// of logical cpus as a limit.
	availableCpus := int64(runtime.NumCPU())
	if !cpusSpecified || totalCpus > availableCpus {
		totalCpus = availableCpus
	}

	// Add an overhead for the VM system
	totalMem += systemMemOverhead

	// Always ensure we have at least the minimum RAM needed
	if totalMem < minMem {
		totalMem = minMem
	}

	return totalCpus, totalMem
}
261258
func (c *Client) CollaboratorList(appIdentity string, lr *ListRange) ([]Collaborator, error) {
	req, err := c.NewRequest("GET", "/apps/"+appIdentity+"/collaborators", nil, nil)
	if err != nil {
		return nil, err
	}

	if lr != nil {
		lr.SetHeader(req)
	}

	var collaboratorsRes []Collaborator
	return collaboratorsRes, c.DoReq(req, &collaboratorsRes)
}
762912
func (s *Service) CollaboratorList(ctx context.Context, appIdentity string, lr *ListRange) (CollaboratorListResult, error) {
	var collaborator CollaboratorListResult
	return collaborator, s.Get(ctx, &collaborator, fmt.Sprintf("/apps/%v/collaborators", appIdentity), nil, lr)
}
1025873
func GetUserAndCollaborativeRepositories(userID int64) ([]*Repository, error) {
	repos := make([]*Repository, 0, 10)
	if err := x.Alias("repo").
		Join("INNER", "collaboration", "collaboration.repo_id = repo.id").
		Where("collaboration.user_id = ?", userID).
		Find(&repos); err != nil {
		return nil, fmt.Errorf("select collaborative repositories: %v", err)
	}

	ownRepos := make([]*Repository, 0, 10)
	if err := x.Where("owner_id = ?", userID).Find(&ownRepos); err != nil {
		return nil, fmt.Errorf("select own repositories: %v", err)
	}

	return append(repos, ownRepos...), nil
}
183368
func NewCollaboratorsController(service *goa.Service, app application.Application, config collaboratorsConfiguration) *CollaboratorsController {
	return &CollaboratorsController{Controller: service.NewController("CollaboratorsController"), app: app, config: config}
}
517791
public void addCollaborator(String appName, String collaborator) {
        connection.execute(new SharingAdd(appName, collaborator), apiKey);
    }