// SetGain sets the global gain of the specified haptic device.
// (https://wiki.libsdl.org/SDL_HapticSetGain)
541467
func (h *Haptic) SetGain(gain int) error {
	return errorFromInt(int(
		C.SDL_HapticSetGain(h.cptr(), C.int(gain))))
}
557426
func (s *AssessmentRun) SetArn(v string) *AssessmentRun {
	s.Arn = &v
	return s
}
1311529
func (d *TSL2561Driver) SetGain(gain TSL2561Gain) error {
	if err := d.enable(); err != nil {
		return err
	}

	timeGainVal := uint8(d.integrationTime) | uint8(gain)
	if err := d.connection.WriteByteData(tsl2561CommandBit|tsl2561RegisterTiming, timeGainVal); err != nil {
		return err
	}
	d.gain = gain

	return d.disable()
}
28188
func (s *Finding) SetArn(v string) *Finding {
	s.Arn = &v
	return s
}
492502
func (s *MeshRef) SetArn(v string) *MeshRef {
	s.Arn = &v
	return s
}
432697
func (s *VirtualNodeRef) SetArn(v string) *VirtualNodeRef {
	s.Arn = &v
	return s
}
989219
func (s *ResolverEndpoint) SetArn(v string) *ResolverEndpoint {
	s.Arn = &v
	return s
}
105052
func WithTSL2561Gain1X(c Config) {
	d, ok := c.(*TSL2561Driver)
	if ok {
		d.gain = TSL2561Gain1X
		return
	}
	// TODO: return errors.New("Trying to set Gain for non-TSL2561Driver")
}
819014
func (s *DeviceInstance) SetArn(v string) *DeviceInstance {
	s.Arn = &v
	return s
}
964402
func (s *Configuration) SetArn(v string) *Configuration {
	s.Arn = &v
	return s
}
1336525
func (s *GlobalConfiguration) SetInitialAudioGain(v int64) *GlobalConfiguration {
	s.InitialAudioGain = &v
	return s
}
899171
func (s *Stack) SetArn(v string) *Stack {
	s.Arn = &v
	return s
}
562968
func (s *HierarchyLevel) SetArn(v string) *HierarchyLevel {
	s.Arn = &v
	return s
}
895437
func (s *UserDetail) SetArn(v string) *UserDetail {
	s.Arn = &v
	return s
}
241188
func (s *TerminologyProperties) SetArn(v string) *TerminologyProperties {
	s.Arn = &v
	return s
}
691097
func (s *Domain) SetArn(v string) *Domain {
	s.Arn = &v
	return s
}
1223137
func (s *User) SetArn(v string) *User {
	s.Arn = &v
	return s
}