BrickhouseAlert constructor
const
BrickhouseAlert({
- required String id,
- required String name,
- required BrickhouseAlertType type,
- List<
Asset> ? assets, - List<
String> ? assetsIds, - List<
String> ? email, - List<
NullablePhoneNumber?> ? phone, - bool? hasMobilePopup,
- bool? hasWebPopup,
- bool? hasEmail,
- bool? hasPhone,
- int? batteryMinLevel,
- @BrickhouseTimeOfDayMinuteOrNullConverter() TimeOfDay? curfewStartHour,
- @BrickhouseTimeOfDayMinuteOrNullConverter() TimeOfDay? curfewEndHour,
- String? timezone,
- @JsonKey.new(unknownEnumValue: Weekday.monday) List<
Weekday> ? curfewWeekdays, - @ColorOrNullConverter() Color? geofenceColor,
- @JsonKey.new(unknownEnumValue: GeofenceMode.radial) GeofenceMode? geofenceMode,
- double? geofenceRadius,
- List<
GeofencePoint> ? geofenceShape, - @JsonKey.new(unknownEnumValue: BrickhouseGeofenceTrigger.unknown) BrickhouseGeofenceTrigger? geofenceTrigger,
- double? maxSpeedMaxValue,
- @Default.new(false) bool? isMuted,
- double? speedingThreshold,
- @Default.new(false) bool? isDisabled,
- String? triggerId,
Implementation
const factory BrickhouseAlert({
/// ID of the alert entity. This ID is unique.
required String id,
/// Name of the alert.
required String name,
/// Type of the alert.
required BrickhouseAlertType type,
/// List of assets
List<Asset>? assets,
/// List of assets IDs.
List<String>? assetsIds,
/// Email to send the alert to.
List<String>? email,
/// Phone number to send the alert to.
List<NullablePhoneNumber?>? phone,
/// If the alert should be shown in the mobile app.
bool? hasMobilePopup,
/// If the alert should be shown in the web app.
bool? hasWebPopup,
/// Email to send the alert to.
bool? hasEmail,
/// Phone number to send the alert to.
bool? hasPhone,
/// Minimum battery level to trigger the alert, in percentage (%). Only for BrickhouseAlertType.BATTERY
int? batteryMinLevel,
/// Start hour of the curfew, in minutes from midnight in the local timezone. Only for BrickhouseAlertType.CURFEW
@BrickhouseTimeOfDayMinuteOrNullConverter() TimeOfDay? curfewStartHour,
/// End hour of the curfew, in minutes from midnight in the local timezone. Only for BrickhouseAlertType.CURFEW
@BrickhouseTimeOfDayMinuteOrNullConverter() TimeOfDay? curfewEndHour,
/// Timezone of the curfew. Only for BrickhouseAlertType.CURFEW
String? timezone,
/// Weekdays to apply the curfew. Only for BrickhouseAlertType.CURFEW
@JsonKey(unknownEnumValue: Weekday.monday) List<Weekday>? curfewWeekdays,
/// Geofence color, in hex mode. Only for BrickhouseAlertType.PRESENCE_GEOFENCE
@ColorOrNullConverter() Color? geofenceColor,
/// Geofence mode. Only for BrickhouseAlertType.PRESENCE_GEOFENCE
@JsonKey(unknownEnumValue: GeofenceMode.radial) GeofenceMode? geofenceMode,
/// Geofence radius in meters. Only for BrickhouseAlertType.PRESENCE_GEOFENCE
double? geofenceRadius,
/// geofenceShape [GeofencePoint]
List<GeofencePoint>? geofenceShape,
/// Geofence trigger. Only for BrickhouseAlertType.PRESENCE_GEOFENCE
///
@JsonKey(unknownEnumValue: BrickhouseGeofenceTrigger.unknown) BrickhouseGeofenceTrigger? geofenceTrigger,
/// Maximum speed to trigger the alert, in kilometers per hour (km/h). Only for BrickhouseAlertType
double? maxSpeedMaxValue,
/// [isMuted] represents if the alert is muted or not.
@Default(false) bool? isMuted,
/// [speedingThreshold] represents the threshold of the speeding alert.
/// This is the maximum speed that the asset can reach before the alert is triggered.
double? speedingThreshold,
/// isDisabled
@Default(false) bool? isDisabled,
/// triggerId
/// triggerId of the alert
String? triggerId,
}) = _BrickhouseAlert;