BatteryAwareSamplingConfiguration
A sampling configuration which changes based on how much battery the device has left.
Holds one SamplingConfiguration per battery level.
- Inheritance
-
- Object
- Serializable
- SamplingConfiguration
- BatteryAwareSamplingConfiguration
- Annotations
-
- @JsonSerializable(includeIfNull: false, explicitToJson: true)
Constructors
BatteryAwareSamplingConfiguration.fromJson
BatteryAwareSamplingConfiguration
- required SamplingConfiguration normal,
- required SamplingConfiguration low,
- SamplingConfiguration? critical,
Properties
critical
getter/setter pair
The sampling configuration to use when the battery is critically low. By default, sampling should be disabled at this point.
fromJsonFunction
The function which can convert a JSON string to an object of this type.
low
getter/setter pair
The sampling configuration to use when the battery is low.
normal
getter/setter pair
The sampling configuration to use when there is plenty of battery left.
Methods
toJson
Return a JSON encoding of this object.