HistoryMetadata.fromJson constructor

HistoryMetadata.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory HistoryMetadata.fromJson(Map<String, Object?> json) {
  return HistoryMetadata(
    activityDescription: json[r'activityDescription'] as String?,
    activityDescriptionKey: json[r'activityDescriptionKey'] as String?,
    actor: json[r'actor'] != null
        ? HistoryMetadataParticipant.fromJson(
            json[r'actor']! as Map<String, Object?>)
        : null,
    cause: json[r'cause'] != null
        ? HistoryMetadataParticipant.fromJson(
            json[r'cause']! as Map<String, Object?>)
        : null,
    description: json[r'description'] as String?,
    descriptionKey: json[r'descriptionKey'] as String?,
    emailDescription: json[r'emailDescription'] as String?,
    emailDescriptionKey: json[r'emailDescriptionKey'] as String?,
    extraData: json[r'extraData'] as Map<String, Object?>?,
    generator: json[r'generator'] != null
        ? HistoryMetadataParticipant.fromJson(
            json[r'generator']! as Map<String, Object?>)
        : null,
    type: json[r'type'] as String?,
  );
}