// EnableOrDisableAddon updates addon status executing any commands necessary
176286
func EnableOrDisableAddon(name string, val string) error {
	enable, err := strconv.ParseBool(val)
	if err != nil {
		return errors.Wrapf(err, "parsing bool: %s", name)
	}

	//TODO(r2d4): config package should not reference API, pull this out
	api, err := machine.NewAPIClient()
	if err != nil {
		return errors.Wrap(err, "machine client")
	}
	defer api.Close()
	cluster.EnsureMinikubeRunningOrExit(api, 0)

	addon := assets.Addons[name]
	host, err := cluster.CheckIfHostExistsAndLoad(api, config.GetMachineName())
	if err != nil {
		return errors.Wrap(err, "getting host")
	}
	cmd, err := machine.CommandRunner(host)
	if err != nil {
		return errors.Wrap(err, "command runner")
	}

	cfg, err := config.Load()
	if err != nil && !os.IsNotExist(err) {
		exit.WithCode(exit.Data, "Unable to load config: %v", err)
	}

	data := assets.GenerateTemplateData(cfg.KubernetesConfig)
	return enableOrDisableAddonInternal(addon, cmd, data, enable)
}
346788
func (s *UpdateProfileInput) SetSetupModeDisabled(v bool) *UpdateProfileInput {
	s.SetupModeDisabled = &v
	return s
}
159726
func (c *UsergroupsListCall) IncludeDisabled(includeDisabled bool) *UsergroupsListCall {
	c.includeDisabled = includeDisabled
	return c
}
120603
func (s *Branch) SetEnableBasicAuth(v bool) *Branch {
	s.EnableBasicAuth = &v
	return s
}
111517
func (b *EvalBroker) Enabled() bool {
	b.l.RLock()
	defer b.l.RUnlock()
	return b.enabled
}
207278
func (s *TopicRuleListItem) SetRuleDisabled(v bool) *TopicRuleListItem {
	s.RuleDisabled = &v
	return s
}
728132
func (s *HTTPServer) checkACLDisabled(resp http.ResponseWriter, req *http.Request) bool {
	if s.agent.delegate.ACLsEnabled() {
		return false
	}

	resp.WriteHeader(http.StatusUnauthorized)
	fmt.Fprint(resp, "ACL support disabled")
	return true
}
1365927
func (a *Addon) IsEnabled() (bool, error) {
	addonStatusText, err := config.Get(a.addonName)
	if err == nil {
		addonStatus, err := strconv.ParseBool(addonStatusText)
		if err != nil {
			return false, err
		}
		return addonStatus, nil
	}
	return a.enabled, nil
}
27858
func (s *Profile) SetSetupModeDisabled(v bool) *Profile {
	s.SetupModeDisabled = &v
	return s
}
811864
func (s *TopicRule) SetRuleDisabled(v bool) *TopicRule {
	s.RuleDisabled = &v
	return s
}
1186474
func (s *CreateServerInput) SetDisableAutomatedBackup(v bool) *CreateServerInput {
	s.DisableAutomatedBackup = &v
	return s
}
455624
func (r Network_LBaaS_LoadBalancer) EnableOrDisableDataLogs(uuid *string, enabled *bool) (resp datatypes.Network_LBaaS_LoadBalancer, err error) {
	params := []interface{}{
		uuid,
		enabled,
	}
	err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "enableOrDisableDataLogs", params, &r.Options, &resp)
	return
}
25230
func (s *Application) SetEnabled(v bool) *Application {
	s.Enabled = &v
	return s
}
906794
func (s *KeyMetadata) SetEnabled(v bool) *KeyMetadata {
	s.Enabled = &v
	return s
}
213297
func (s *UpdateAcceleratorInput) SetEnabled(v bool) *UpdateAcceleratorInput {
	s.Enabled = &v
	return s
}
1351866
func (c *Compactor) EnableCompactions() {
	c.mu.Lock()
	c.compactionsEnabled = true
	if c.compactionsInterrupt == nil {
		c.compactionsInterrupt = make(chan struct{})
	}
	c.mu.Unlock()
}
374320
func (c *Conn) EnableFKConstraints(e bool) error {
	q := fkChecksEnabled
	if !e {
		q = fkChecksDisabled
	}
	_, err := c.sqlite.Exec(q, nil)
	return err
}