// ApplicationNames returns the names of applications
// represented by units running on the machine.
12979
func (m *Machine) ApplicationNames() ([]string, error) {
	units, err := m.Units()
	if err != nil {
		return nil, errors.Trace(err)
	}
	apps := set.NewStrings()
	for _, unit := range units {
		apps.Add(unit.ApplicationName())
	}
	return apps.SortedValues(), nil
}
744044
func applicationName() string {
	v := viper.GetViper()

	name := v.GetString("name")
	if name != "" {
		return name
	}
	port := v.GetString("port")
	var hostname string
	hostname, err := os.Hostname()
	if err != nil {
		hostname = "?"
	}
	return hostname + "_" + port
}
1307362
func (s *DeleteApplicationOutputInput) SetApplicationName(v string) *DeleteApplicationOutputInput {
	s.ApplicationName = &v
	return s
}
876991
func (r *Registry) Names() []string {
	keys := []string{}
	for key := range r.registrants {
		keys = append(keys, key)
	}
	sort.Strings(keys)
	return keys
}
461589
func (c *Client) GetApplications() ([]Application, error) {
	var appMap map[string]Application
	if err := c.get(`app/list`, &appMap); err != nil {
		return nil, err
	}

	var appList []Application
	for _, app := range appMap {
		appList = append(appList, app)
	}
	sort.Sort(applications(appList))
	return appList, nil
}
887974
func (s *CreateDeploymentInput) SetApplicationName(v string) *CreateDeploymentInput {
	s.ApplicationName = &v
	return s
}
653381
func (s *GetApplicationInput) SetApplicationName(v string) *GetApplicationInput {
	s.ApplicationName = &v
	return s
}
507244
func (r *marathonClient) ApplicationVersions(name string) (*ApplicationVersions, error) {
	path := fmt.Sprintf("%s/versions", buildPath(name))
	versions := new(ApplicationVersions)
	if err := r.apiGet(path, nil, versions); err != nil {
		return nil, err
	}
	return versions, nil
}
1079519
func (o *L2Domain) Applications(info *bambou.FetchingInfo) (ApplicationsList, *bambou.Error) {

	var list ApplicationsList
	err := bambou.CurrentSession().FetchChildren(o, ApplicationIdentity, &list, info)
	return list, err
}
798387
func (s *DeploymentGroupInfo) SetApplicationName(v string) *DeploymentGroupInfo {
	s.ApplicationName = &v
	return s
}
761035
func (s *GetApplicationRevisionInput) SetApplicationName(v string) *GetApplicationRevisionInput {
	s.ApplicationName = &v
	return s
}
1288825
func (s *DescribeApplicationsInput) SetApplicationNames(v []*string) *DescribeApplicationsInput {
	s.ApplicationNames = v
	return s
}
256884
func (s *CreateApplicationSnapshotInput) SetApplicationName(v string) *CreateApplicationSnapshotInput {
	s.ApplicationName = &v
	return s
}
1177767
func (s *ListApplicationsOutput) SetApplications(v []*string) *ListApplicationsOutput {
	s.Applications = v
	return s
}
570399
func (m *MockApplication) UnitNames() ([]string, error) {
	ret := m.ctrl.Call(m, "UnitNames")
	ret0, _ := ret[0].([]string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
1225899
func (s *ListApplicationRevisionsInput) SetApplicationName(v string) *ListApplicationRevisionsInput {
	s.ApplicationName = &v
	return s
}
375013
func (s *BatchGetDeploymentGroupsInput) SetApplicationName(v string) *BatchGetDeploymentGroupsInput {
	s.ApplicationName = &v
	return s
}