toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.dateCreated != null) {
    json[r'date_created'] = this.dateCreated!.toUtc().toIso8601String();
  } else {
    json[r'date_created'] = null;
  }
  if (this.lastUpdated != null) {
    json[r'last_updated'] = this.lastUpdated!.toUtc().toIso8601String();
  } else {
    json[r'last_updated'] = null;
  }
  if (this.alertId != null) {
    json[r'alert_id'] = this.alertId;
  } else {
    json[r'alert_id'] = null;
  }
    json[r'asset_id'] = this.assetId;
  if (this.userId != null) {
    json[r'user_id'] = this.userId;
  } else {
    json[r'user_id'] = null;
  }
    json[r'company_id'] = this.companyId;
    json[r'is_active'] = this.isActive;
  return json;
}