toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final comparisonOperator = this.comparisonOperator;
  final notificationType = this.notificationType;
  final threshold = this.threshold;
  final notificationState = this.notificationState;
  final thresholdType = this.thresholdType;
  return {
    'ComparisonOperator': comparisonOperator.toValue(),
    'NotificationType': notificationType.toValue(),
    'Threshold': threshold,
    if (notificationState != null)
      'NotificationState': notificationState.toValue(),
    if (thresholdType != null) 'ThresholdType': thresholdType.toValue(),
  };
}