// SetCapabilities sets the Capabilities field's value.
198523
func (s *UpdateStackInput) SetCapabilities(v []*string) *UpdateStackInput {
	s.Capabilities = v
	return s
}
752493
func (s *Captions) SetCaptionFormats(v []*CaptionFormat) *Captions {
	s.CaptionFormats = v
	return s
}
324566
func (s *AllocateStaticIpOutput) SetOperations(v []*Operation) *AllocateStaticIpOutput {
	s.Operations = v
	return s
}
562310
func (s *ProvisionedThroughput) SetWriteCapacityUnits(v int64) *ProvisionedThroughput {
	s.WriteCapacityUnits = &v
	return s
}
626440
func WithAmbientCapabilities(caps []string) SpecOpts {
	return func(_ context.Context, _ Client, _ *containers.Container, s *Spec) error {
		setCapabilities(s)

		s.Process.Capabilities.Ambient = caps
		return nil
	}
}
1190968
func setCapabilities(s *Spec) {
	setProcess(s)
	if s.Process.Capabilities == nil {
		s.Process.Capabilities = &specs.LinuxCapabilities{}
	}
}
1167455
func (s *UpdateStackSetInput) SetCapabilities(v []*string) *UpdateStackSetInput {
	s.Capabilities = v
	return s
}
799301
func (s *LinuxParameters) SetCapabilities(v *KernelCapabilities) *LinuxParameters {
	s.Capabilities = v
	return s
}
341746
func (s *VersioningConfiguration) SetMaxVersions(v int64) *VersioningConfiguration {
	s.MaxVersions = &v
	return s
}
1028551
func (s *ConfigurationSettingsDescription) SetOptionSettings(v []*ConfigurationOptionSetting) *ConfigurationSettingsDescription {
	s.OptionSettings = v
	return s
}
1262658
func (s *UpdateEndpointGroupInput) SetEndpointConfigurations(v []*EndpointConfiguration) *UpdateEndpointGroupInput {
	s.EndpointConfigurations = v
	return s
}
120672
func (s *UpdateEnvironmentInput) SetOptionSettings(v []*ConfigurationOptionSetting) *UpdateEnvironmentInput {
	s.OptionSettings = v
	return s
}
693190
func (s *GetOperationsOutput) SetOperations(v []*Operation) *GetOperationsOutput {
	s.Operations = v
	return s
}
959320
func (s *SnapshotOptionsStatus) SetOptions(v *SnapshotOptions) *SnapshotOptionsStatus {
	s.Options = v
	return s
}
54465
func (s *OptionGroup) SetOptions(v []*Option) *OptionGroup {
	s.Options = v
	return s
}
1132488
func TweakCapabilities(basics, adds, drops, capabilities []string, privileged bool) ([]string, error) {
	switch {
	case privileged:
		// Privileged containers get all capabilities
		return GetAllCapabilities(), nil
	case capabilities != nil:
		// Use custom set of capabilities
		if err := ValidateCapabilities(capabilities); err != nil {
			return nil, err
		}
		return capabilities, nil
	case len(adds) == 0 && len(drops) == 0:
		// Nothing to tweak; we're done
		return basics, nil
	}

	capDrop, err := NormalizeLegacyCapabilities(drops)
	if err != nil {
		return nil, err
	}
	capAdd, err := NormalizeLegacyCapabilities(adds)
	if err != nil {
		return nil, err
	}

	var caps []string

	switch {
	case inSlice(capAdd, allCapabilities):
		// Add all capabilities except ones on capDrop
		for _, c := range GetAllCapabilities() {
			if !inSlice(capDrop, c) {
				caps = append(caps, c)
			}
		}
	case inSlice(capDrop, allCapabilities):
		// "Drop" all capabilities; use what's in capAdd instead
		caps = capAdd
	default:
		// First drop some capabilities
		for _, c := range basics {
			if !inSlice(capDrop, c) {
				caps = append(caps, c)
			}
		}
		// Then add the list of capabilities from capAdd
		caps = append(caps, capAdd...)
	}
	return caps, nil
}
1345020
func (s *DescribeMatchmakingConfigurationsOutput) SetConfigurations(v []*MatchmakingConfiguration) *DescribeMatchmakingConfigurationsOutput {
	s.Configurations = v
	return s
}