SamplingEventTrigger class
A trigger that triggers when a measurement of measureType is collected.
For example, if measureType is CamsDataTypes.COMPLETED_APP_TASK, the
triggerCondition can be a CompletedAppTask with a specific
CompletedTask.taskName, to trigger when that task is done.
Unlike ConditionalSamplingEventTrigger, it can be serialized to JSON.
- Inheritance
-
- Object
- Serializable
- TriggerConfiguration
- SamplingEventTrigger
- Annotations
-
- @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
Constructors
- SamplingEventTrigger({required String measureType, Data? triggerCondition})
-
Creates a trigger that triggers when a measure of
measureTypeis collected, and checks thetriggerConditionto determine if it should trigger. -
SamplingEventTrigger.fromJson(Map<
String, dynamic> json) -
factory
Properties
- $type ↔ String?
-
The type name written to
__typein JSON; set tojsonTypeon creation.getter/setter pairinherited - fromJsonFunction → Function
-
The generated function that converts a JSON map to an object of this type.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- jsonType → String
-
The
__typeused for JSON serialization of this class.no setterinherited - measureType ↔ String
-
The data type of the event to look for.
getter/setter pair
- requiresPrimaryDevice ↔ bool?
-
Determines whether the trigger needs to be evaluated on a primary
device (
PrimaryDeviceConfiguration). For example, this is the case when the trigger is time bound and needs to be evaluated by a task scheduler running on a primary device. Not serialized.getter/setter pairinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceDeviceRoleName ↔ String?
-
The device role name from which the trigger originates.
getter/setter pairinherited
- triggerCondition ↔ Data?
-
The specific sampling value to compare with for triggering this trigger.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Returns a JSON map of this object, including the
__typeproperty.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited