// UpdateApplication makes changes to an application
// It returns error object
972852
func (api *Client) UpdateApplication(id string, changedData *ApplicationData) error {
	_, _, err := api.makeRequest(http.MethodPost, fmt.Sprintf("%s/%s", api.concatUserPath(applicationsPath), id), nil, changedData)
	return err
}
199342
func (s *RemoveAttributesInput) SetApplicationId(v string) *RemoveAttributesInput {
	s.ApplicationId = &v
	return s
}
555963
func (s *GetCampaignActivitiesInput) SetApplicationId(v string) *GetCampaignActivitiesInput {
	s.ApplicationId = &v
	return s
}
1254394
func (a *Facade) UpdateApplicationsService(args params.UpdateApplicationServiceArgs) (params.ErrorResults, error) {
	result := params.ErrorResults{
		Results: make([]params.ErrorResult, len(args.Args)),
	}
	if len(args.Args) == 0 {
		return result, nil
	}
	for i, appUpdate := range args.Args {
		appTag, err := names.ParseApplicationTag(appUpdate.ApplicationTag)
		if err != nil {
			result.Results[i].Error = common.ServerError(err)
			continue
		}
		app, err := a.state.Application(appTag.Id())
		if err != nil {
			result.Results[i].Error = common.ServerError(err)
			continue
		}
		if err := app.UpdateCloudService(appUpdate.ProviderId, params.NetworkAddresses(appUpdate.Addresses...)); err != nil {
			result.Results[i].Error = common.ServerError(err)
		}
	}
	return result, nil
}
678175
func (s *ChannelResponse) SetApplicationId(v string) *ChannelResponse {
	s.ApplicationId = &v
	return s
}
117010
func (s *UpdateRobotApplicationInput) SetApplication(v string) *UpdateRobotApplicationInput {
	s.Application = &v
	return s
}
837089
func (s *DescribeSimulationApplicationInput) SetApplication(v string) *DescribeSimulationApplicationInput {
	s.Application = &v
	return s
}
831432
func NewApplication() *Application {
	return &Application{
		events:            make(chan tcell.Event, queueSize),
		updates:           make(chan func(), queueSize),
		screenReplacement: make(chan tcell.Screen, 1),
	}
}
1197490
func (a *Application) UpdateApplicationConfig(
	changes application.ConfigAttributes,
	reset []string,
	schema environschema.Fields,
	defaults schema.Defaults,
) error {
	node, err := readSettings(a.st.db(), settingsC, a.applicationConfigKey())
	if errors.IsNotFound(err) {
		return errors.Errorf("cannot update application config since no config exists for application %v", a.doc.Name)
	} else if err != nil {
		return errors.Annotatef(err, "application config for application %q", a.doc.Name)
	}
	resetKeys := set.NewStrings(reset...)
	for name, value := range changes {
		if resetKeys.Contains(name) {
			continue
		}
		node.Set(name, value)
	}
	for _, name := range reset {
		node.Delete(name)
	}
	newConfig, err := application.NewConfig(node.Map(), schema, defaults)
	if err != nil {
		return errors.Trace(err)
	}
	if err := newConfig.Validate(); err != nil {
		return errors.Trace(err)
	}
	// Update node so it gets coerced values with correct types.
	coerced := newConfig.Attributes()
	for _, key := range node.Keys() {
		node.Set(key, coerced[key])
	}
	_, err = node.Write()
	return err
}
714858
func (o *Enterprise) CreateApplication(child *Application) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
666089
func (s *RobotApplicationConfig) SetApplication(v string) *RobotApplicationConfig {
	s.Application = &v
	return s
}
729461
func (s *EmailChannelResponse) SetApplicationId(v string) *EmailChannelResponse {
	s.ApplicationId = &v
	return s
}
1156685
func (m *Model) updateApplication(ch ApplicationChange, rm *residentManager) {
	m.mu.Lock()

	app, found := m.applications[ch.Name]
	if !found {
		app = newApplication(m.metrics, m.hub, rm.new())
		m.applications[ch.Name] = app
	}
	app.setDetails(ch)

	m.mu.Unlock()
}
395337
func (s *EventStream) SetApplicationId(v string) *EventStream {
	s.ApplicationId = &v
	return s
}
235430
func (s *RunJobFlowInput) SetApplications(v []*Application) *RunJobFlowInput {
	s.Applications = v
	return s
}
389438
func (s *CreateCloudFormationChangeSetRequest) SetApplicationId(v string) *CreateCloudFormationChangeSetRequest {
	s.ApplicationId = &v
	return s
}
899874
func (s *GetApnsVoipSandboxChannelInput) SetApplicationId(v string) *GetApnsVoipSandboxChannelInput {
	s.ApplicationId = &v
	return s
}