DecisionTask.fromJson constructor

DecisionTask.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory DecisionTask.fromJson(Map<String, dynamic> json) {
  return DecisionTask(
    events: (json['events'] as List)
        .whereNotNull()
        .map((e) => HistoryEvent.fromJson(e as Map<String, dynamic>))
        .toList(),
    startedEventId: json['startedEventId'] as int,
    taskToken: json['taskToken'] as String,
    workflowExecution: WorkflowExecution.fromJson(
        json['workflowExecution'] as Map<String, dynamic>),
    workflowType:
        WorkflowType.fromJson(json['workflowType'] as Map<String, dynamic>),
    nextPageToken: json['nextPageToken'] as String?,
    previousStartedEventId: json['previousStartedEventId'] as int?,
  );
}