// NewApplicationGroup create a new application group
//		name:			the name of the group
970707
func NewApplicationGroup(name string) *Group {
	return &Group{
		ID:           name,
		Apps:         make([]*Application, 0),
		Dependencies: make([]string, 0),
		Groups:       make([]*Group, 0),
	}
}
831432
func NewApplication() *Application {
	return &Application{
		events:            make(chan tcell.Event, queueSize),
		updates:           make(chan func(), queueSize),
		screenReplacement: make(chan tcell.Screen, 1),
	}
}
377952
func (s *AddApplicationCloudWatchLoggingOptionInput) SetApplicationName(v string) *AddApplicationCloudWatchLoggingOptionInput {
	s.ApplicationName = &v
	return s
}
46650
func (s *AddApplicationInputProcessingConfigurationInput) SetApplicationName(v string) *AddApplicationInputProcessingConfigurationInput {
	s.ApplicationName = &v
	return s
}
1347997
func (api *Client) CreateUserGroup(userGroup UserGroup) (UserGroup, error) {
	return api.CreateUserGroupContext(context.Background(), userGroup)
}
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
}
324346
func (s *Version) SetApplicationId(v string) *Version {
	s.ApplicationId = &v
	return s
}
81276
func NewGroupAddExternalIdType(Description string) *GroupAddExternalIdType {
	s := new(GroupAddExternalIdType)
	s.Description = Description
	return s
}
77445
func (o *Enterprise) CreateSaaSApplicationGroup(child *SaaSApplicationGroup) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
287795
func (g *Generation) AssignApplication(appName string) error {
	buildTxn := func(attempt int) ([]txn.Op, error) {
		if attempt > 0 {
			if err := g.Refresh(); err != nil {
				return nil, errors.Trace(err)
			}
		}
		if _, ok := g.doc.AssignedUnits[appName]; ok {
			return nil, jujutxn.ErrNoOperations
		}
		if err := g.CheckNotComplete(); err != nil {
			return nil, err
		}
		return assignGenerationAppTxnOps(g.doc.DocId, appName), nil
	}

	return errors.Trace(g.st.db().Run(buildTxn))
}
1157674
func (s *ListDeploymentsInput) SetApplicationName(v string) *ListDeploymentsInput {
	s.ApplicationName = &v
	return s
}
1305079
func NewGroup(signatures ...*Signature) (*Group, error) {
	// Generate a group UUID
	groupUUID := uuid.New().String()
	groupID := fmt.Sprintf("group_%v", groupUUID)

	// Auto generate task UUIDs if needed, group tasks by common group UUID
	for _, signature := range signatures {
		if signature.UUID == "" {
			signatureID := uuid.New().String()
			signature.UUID = fmt.Sprintf("task_%v", signatureID)
		}
		signature.GroupUUID = groupID
		signature.GroupTaskCount = len(signatures)
	}

	return &Group{
		GroupUUID: groupID,
		Tasks:     signatures,
	}, nil
}
104025
func (s *UpdateEnvironmentInput) SetApplicationName(v string) *UpdateEnvironmentInput {
	s.ApplicationName = &v
	return s
}
798798
func (s *ValidateConfigurationSettingsInput) SetApplicationName(v string) *ValidateConfigurationSettingsInput {
	s.ApplicationName = &v
	return s
}
1123898
func (groups *Groups) AddGroup(newGroup *Group) {
	if newGroup.GroupID != "" {
		for key, group := range groups.Groups.Items {
			if group.GroupID == newGroup.GroupID {
				groups.Groups.Items[key] = newGroup
				return
			}
		}
	}

	newGroup.parent = groups

	groups.Groups.Items = append(groups.Groups.Items, newGroup)
}
743647
func NewGroupingBuilder(g Grouping) *GroupingBuilder {
	if g == nil {
		return new(GroupingBuilder)
	}
	b := GroupingBuilder{groupedTable{
		tables:   make(map[GroupID]*Table),
		groups:   append([]GroupID(nil), g.Tables()...),
		colNames: append([]string(nil), g.Columns()...),
	}, nil}
	for _, gid := range g.Tables() {
		t := g.Table(gid)
		b.g.tables[gid] = t
		if b.colTypes == nil {
			b.colTypes = colTypes(t)
		}
	}
	return &b
}
798387
func (s *DeploymentGroupInfo) SetApplicationName(v string) *DeploymentGroupInfo {
	s.ApplicationName = &v
	return s
}