// AddProcessCapabilityAmbient adds a process capability into g.Config.Process.Capabilities.Ambient.
359103
func (g *Generator) AddProcessCapabilityAmbient(c string) error {
	cp := strings.ToUpper(c)
	if err := validate.CapValid(cp, g.HostSpecific); err != nil {
		return err
	}

	g.initConfigProcessCapabilities()

	var foundAmbient bool
	for _, cap := range g.Config.Process.Capabilities.Ambient {
		if strings.ToUpper(cap) == cp {
			foundAmbient = true
			break
		}
	}

	if !foundAmbient {
		g.Config.Process.Capabilities.Ambient = append(g.Config.Process.Capabilities.Ambient, cp)
	}

	return nil
}
1256274
func (jd *JSONDecoder) IsProcessable(file string) bool {
	for _, ext := range jd.extensions {
		if strings.HasSuffix(file, ext) {
			return true
		}
	}
	return false
}
8998
func (s *SplunkDestinationDescription) SetProcessingConfiguration(v *ProcessingConfiguration) *SplunkDestinationDescription {
	s.ProcessingConfiguration = v
	return s
}
527060
func (s *CreateDBInstanceInput) SetProcessorFeatures(v []*ProcessorFeature) *CreateDBInstanceInput {
	s.ProcessorFeatures = v
	return s
}
631152
func WithProcessCacheData(c context.Context, data *ProcessCacheData) context.Context {
	if data.caches == nil {
		panic("use NewProcessCacheData to allocate ProcessCacheData")
	}
	return context.WithValue(c, &processCacheKey, data)
}
1293819
func (c Capabilities) AddChrome(f chrome.Capabilities) {
	c[chrome.CapabilitiesKey] = f
	c[chrome.DeprecatedCapabilitiesKey] = f
}
347680
func (s *ModifyDBInstanceInput) SetProcessorFeatures(v []*ProcessorFeature) *ModifyDBInstanceInput {
	s.ProcessorFeatures = v
	return s
}
1321536
func (s *RedshiftDestinationConfiguration) SetProcessingConfiguration(v *ProcessingConfiguration) *RedshiftDestinationConfiguration {
	s.ProcessingConfiguration = v
	return s
}
498767
func (s *SplunkDestinationConfiguration) SetProcessingConfiguration(v *ProcessingConfiguration) *SplunkDestinationConfiguration {
	s.ProcessingConfiguration = v
	return s
}
487782
func (s *ElasticsearchDomainStatus) SetUpgradeProcessing(v bool) *ElasticsearchDomainStatus {
	s.UpgradeProcessing = &v
	return s
}
744631
func (api *API) AddMonitoringPolicyProcesses(mp_id string, mp_procs []MonitoringProcess) (*MonitoringPolicy, error) {
	result := new(MonitoringPolicy)
	request := struct {
		Processes []MonitoringProcess `json:"processes"`
	}{mp_procs}
	url := createUrl(api, monitorPolicyPathSegment, mp_id, "processes")
	err := api.Client.Post(url, &request, &result, http.StatusAccepted)
	if err != nil {
		return nil, err
	}
	result.api = api
	return result, nil
}
901573
func NewProcessStorage(ctx context.Context, path string) (*ProcessStorage, error) {
	if path == "" {
		return nil, trace.BadParameter("missing parameter path")
	}
	litebk, err := lite.NewWithConfig(ctx, lite.Config{Path: path, EventsOff: true})
	if err != nil {
		return nil, trace.Wrap(err)
	}
	// Import storage data
	err = legacy.Import(ctx, litebk, func() (legacy.Exporter, error) {
		return dir.New(legacy.Params{"path": path})
	})
	if err != nil {
		return nil, trace.Wrap(err)
	}

	return &ProcessStorage{Backend: litebk}, nil
}
128764
func (rt *ResourceType) postProcess(name string, traitsMap map[string]Trait, apiDef *APIDefinition) {
	rt.Name = name
	rt.setMethods(traitsMap, apiDef)
	rt.setOptionalMethods()

	// TODO : inherit from other resource type

	// TODO : apply traits
}
564249
func (r *recorder) Enable() {
	r.mu.Lock()
	defer r.mu.Unlock()
	r.enabled = true

}
695950
func (g *Generator) ClearProcessCapabilities() {
	if g.Config == nil || g.Config.Process == nil || g.Config.Process.Capabilities == nil {
		return
	}
	g.Config.Process.Capabilities.Bounding = []string{}
	g.Config.Process.Capabilities.Effective = []string{}
	g.Config.Process.Capabilities.Inheritable = []string{}
	g.Config.Process.Capabilities.Permitted = []string{}
	g.Config.Process.Capabilities.Ambient = []string{}
}
921864
func (api *API) ModifyMonitoringPolicyProcess(mp_id string, proc_id string, mp_proc *MonitoringProcess) (*MonitoringPolicy, error) {
	url := createUrl(api, monitorPolicyPathSegment, mp_id, "processes", proc_id)
	result := new(MonitoringPolicy)
	req := struct {
		Processes *MonitoringProcess `json:"processes"`
	}{mp_proc}
	err := api.Client.Put(url, &req, &result, http.StatusAccepted)
	if err != nil {
		return nil, err
	}
	result.api = api
	return result, nil
}
659546
func WithProcessArgs(args ...string) SpecOpts {
	return func(_ context.Context, _ Client, _ *containers.Container, s *Spec) error {
		setProcess(s)
		s.Process.Args = args
		return nil
	}
}