Implementation
factory HistoryEvent.fromJson(Map<String, dynamic> json) {
return HistoryEvent(
eventId: json['eventId'] as int,
eventTimestamp:
nonNullableTimeStampFromJson(json['eventTimestamp'] as Object),
eventType: (json['eventType'] as String).toEventType(),
activityTaskCancelRequestedEventAttributes:
json['activityTaskCancelRequestedEventAttributes'] != null
? ActivityTaskCancelRequestedEventAttributes.fromJson(
json['activityTaskCancelRequestedEventAttributes']
as Map<String, dynamic>)
: null,
activityTaskCanceledEventAttributes:
json['activityTaskCanceledEventAttributes'] != null
? ActivityTaskCanceledEventAttributes.fromJson(
json['activityTaskCanceledEventAttributes']
as Map<String, dynamic>)
: null,
activityTaskCompletedEventAttributes:
json['activityTaskCompletedEventAttributes'] != null
? ActivityTaskCompletedEventAttributes.fromJson(
json['activityTaskCompletedEventAttributes']
as Map<String, dynamic>)
: null,
activityTaskFailedEventAttributes:
json['activityTaskFailedEventAttributes'] != null
? ActivityTaskFailedEventAttributes.fromJson(
json['activityTaskFailedEventAttributes']
as Map<String, dynamic>)
: null,
activityTaskScheduledEventAttributes:
json['activityTaskScheduledEventAttributes'] != null
? ActivityTaskScheduledEventAttributes.fromJson(
json['activityTaskScheduledEventAttributes']
as Map<String, dynamic>)
: null,
activityTaskStartedEventAttributes:
json['activityTaskStartedEventAttributes'] != null
? ActivityTaskStartedEventAttributes.fromJson(
json['activityTaskStartedEventAttributes']
as Map<String, dynamic>)
: null,
activityTaskTimedOutEventAttributes:
json['activityTaskTimedOutEventAttributes'] != null
? ActivityTaskTimedOutEventAttributes.fromJson(
json['activityTaskTimedOutEventAttributes']
as Map<String, dynamic>)
: null,
cancelTimerFailedEventAttributes:
json['cancelTimerFailedEventAttributes'] != null
? CancelTimerFailedEventAttributes.fromJson(
json['cancelTimerFailedEventAttributes']
as Map<String, dynamic>)
: null,
cancelWorkflowExecutionFailedEventAttributes:
json['cancelWorkflowExecutionFailedEventAttributes'] != null
? CancelWorkflowExecutionFailedEventAttributes.fromJson(
json['cancelWorkflowExecutionFailedEventAttributes']
as Map<String, dynamic>)
: null,
childWorkflowExecutionCanceledEventAttributes:
json['childWorkflowExecutionCanceledEventAttributes'] != null
? ChildWorkflowExecutionCanceledEventAttributes.fromJson(
json['childWorkflowExecutionCanceledEventAttributes']
as Map<String, dynamic>)
: null,
childWorkflowExecutionCompletedEventAttributes:
json['childWorkflowExecutionCompletedEventAttributes'] != null
? ChildWorkflowExecutionCompletedEventAttributes.fromJson(
json['childWorkflowExecutionCompletedEventAttributes']
as Map<String, dynamic>)
: null,
childWorkflowExecutionFailedEventAttributes:
json['childWorkflowExecutionFailedEventAttributes'] != null
? ChildWorkflowExecutionFailedEventAttributes.fromJson(
json['childWorkflowExecutionFailedEventAttributes']
as Map<String, dynamic>)
: null,
childWorkflowExecutionStartedEventAttributes:
json['childWorkflowExecutionStartedEventAttributes'] != null
? ChildWorkflowExecutionStartedEventAttributes.fromJson(
json['childWorkflowExecutionStartedEventAttributes']
as Map<String, dynamic>)
: null,
childWorkflowExecutionTerminatedEventAttributes:
json['childWorkflowExecutionTerminatedEventAttributes'] != null
? ChildWorkflowExecutionTerminatedEventAttributes.fromJson(
json['childWorkflowExecutionTerminatedEventAttributes']
as Map<String, dynamic>)
: null,
childWorkflowExecutionTimedOutEventAttributes:
json['childWorkflowExecutionTimedOutEventAttributes'] != null
? ChildWorkflowExecutionTimedOutEventAttributes.fromJson(
json['childWorkflowExecutionTimedOutEventAttributes']
as Map<String, dynamic>)
: null,
completeWorkflowExecutionFailedEventAttributes:
json['completeWorkflowExecutionFailedEventAttributes'] != null
? CompleteWorkflowExecutionFailedEventAttributes.fromJson(
json['completeWorkflowExecutionFailedEventAttributes']
as Map<String, dynamic>)
: null,
continueAsNewWorkflowExecutionFailedEventAttributes:
json['continueAsNewWorkflowExecutionFailedEventAttributes'] != null
? ContinueAsNewWorkflowExecutionFailedEventAttributes.fromJson(
json['continueAsNewWorkflowExecutionFailedEventAttributes']
as Map<String, dynamic>)
: null,
decisionTaskCompletedEventAttributes:
json['decisionTaskCompletedEventAttributes'] != null
? DecisionTaskCompletedEventAttributes.fromJson(
json['decisionTaskCompletedEventAttributes']
as Map<String, dynamic>)
: null,
decisionTaskScheduledEventAttributes:
json['decisionTaskScheduledEventAttributes'] != null
? DecisionTaskScheduledEventAttributes.fromJson(
json['decisionTaskScheduledEventAttributes']
as Map<String, dynamic>)
: null,
decisionTaskStartedEventAttributes:
json['decisionTaskStartedEventAttributes'] != null
? DecisionTaskStartedEventAttributes.fromJson(
json['decisionTaskStartedEventAttributes']
as Map<String, dynamic>)
: null,
decisionTaskTimedOutEventAttributes:
json['decisionTaskTimedOutEventAttributes'] != null
? DecisionTaskTimedOutEventAttributes.fromJson(
json['decisionTaskTimedOutEventAttributes']
as Map<String, dynamic>)
: null,
externalWorkflowExecutionCancelRequestedEventAttributes: json[
'externalWorkflowExecutionCancelRequestedEventAttributes'] !=
null
? ExternalWorkflowExecutionCancelRequestedEventAttributes.fromJson(
json['externalWorkflowExecutionCancelRequestedEventAttributes']
as Map<String, dynamic>)
: null,
externalWorkflowExecutionSignaledEventAttributes:
json['externalWorkflowExecutionSignaledEventAttributes'] != null
? ExternalWorkflowExecutionSignaledEventAttributes.fromJson(
json['externalWorkflowExecutionSignaledEventAttributes']
as Map<String, dynamic>)
: null,
failWorkflowExecutionFailedEventAttributes:
json['failWorkflowExecutionFailedEventAttributes'] != null
? FailWorkflowExecutionFailedEventAttributes.fromJson(
json['failWorkflowExecutionFailedEventAttributes']
as Map<String, dynamic>)
: null,
lambdaFunctionCompletedEventAttributes:
json['lambdaFunctionCompletedEventAttributes'] != null
? LambdaFunctionCompletedEventAttributes.fromJson(
json['lambdaFunctionCompletedEventAttributes']
as Map<String, dynamic>)
: null,
lambdaFunctionFailedEventAttributes:
json['lambdaFunctionFailedEventAttributes'] != null
? LambdaFunctionFailedEventAttributes.fromJson(
json['lambdaFunctionFailedEventAttributes']
as Map<String, dynamic>)
: null,
lambdaFunctionScheduledEventAttributes:
json['lambdaFunctionScheduledEventAttributes'] != null
? LambdaFunctionScheduledEventAttributes.fromJson(
json['lambdaFunctionScheduledEventAttributes']
as Map<String, dynamic>)
: null,
lambdaFunctionStartedEventAttributes:
json['lambdaFunctionStartedEventAttributes'] != null
? LambdaFunctionStartedEventAttributes.fromJson(
json['lambdaFunctionStartedEventAttributes']
as Map<String, dynamic>)
: null,
lambdaFunctionTimedOutEventAttributes:
json['lambdaFunctionTimedOutEventAttributes'] != null
? LambdaFunctionTimedOutEventAttributes.fromJson(
json['lambdaFunctionTimedOutEventAttributes']
as Map<String, dynamic>)
: null,
markerRecordedEventAttributes:
json['markerRecordedEventAttributes'] != null
? MarkerRecordedEventAttributes.fromJson(
json['markerRecordedEventAttributes'] as Map<String, dynamic>)
: null,
recordMarkerFailedEventAttributes:
json['recordMarkerFailedEventAttributes'] != null
? RecordMarkerFailedEventAttributes.fromJson(
json['recordMarkerFailedEventAttributes']
as Map<String, dynamic>)
: null,
requestCancelActivityTaskFailedEventAttributes:
json['requestCancelActivityTaskFailedEventAttributes'] != null
? RequestCancelActivityTaskFailedEventAttributes.fromJson(
json['requestCancelActivityTaskFailedEventAttributes']
as Map<String, dynamic>)
: null,
requestCancelExternalWorkflowExecutionFailedEventAttributes: json[
'requestCancelExternalWorkflowExecutionFailedEventAttributes'] !=
null
? RequestCancelExternalWorkflowExecutionFailedEventAttributes.fromJson(
json['requestCancelExternalWorkflowExecutionFailedEventAttributes']
as Map<String, dynamic>)
: null,
requestCancelExternalWorkflowExecutionInitiatedEventAttributes: json[
'requestCancelExternalWorkflowExecutionInitiatedEventAttributes'] !=
null
? RequestCancelExternalWorkflowExecutionInitiatedEventAttributes
.fromJson(json[
'requestCancelExternalWorkflowExecutionInitiatedEventAttributes']
as Map<String, dynamic>)
: null,
scheduleActivityTaskFailedEventAttributes:
json['scheduleActivityTaskFailedEventAttributes'] != null
? ScheduleActivityTaskFailedEventAttributes.fromJson(
json['scheduleActivityTaskFailedEventAttributes']
as Map<String, dynamic>)
: null,
scheduleLambdaFunctionFailedEventAttributes:
json['scheduleLambdaFunctionFailedEventAttributes'] != null
? ScheduleLambdaFunctionFailedEventAttributes.fromJson(
json['scheduleLambdaFunctionFailedEventAttributes']
as Map<String, dynamic>)
: null,
signalExternalWorkflowExecutionFailedEventAttributes:
json['signalExternalWorkflowExecutionFailedEventAttributes'] != null
? SignalExternalWorkflowExecutionFailedEventAttributes.fromJson(
json['signalExternalWorkflowExecutionFailedEventAttributes']
as Map<String, dynamic>)
: null,
signalExternalWorkflowExecutionInitiatedEventAttributes: json[
'signalExternalWorkflowExecutionInitiatedEventAttributes'] !=
null
? SignalExternalWorkflowExecutionInitiatedEventAttributes.fromJson(
json['signalExternalWorkflowExecutionInitiatedEventAttributes']
as Map<String, dynamic>)
: null,
startChildWorkflowExecutionFailedEventAttributes:
json['startChildWorkflowExecutionFailedEventAttributes'] != null
? StartChildWorkflowExecutionFailedEventAttributes.fromJson(
json['startChildWorkflowExecutionFailedEventAttributes']
as Map<String, dynamic>)
: null,
startChildWorkflowExecutionInitiatedEventAttributes:
json['startChildWorkflowExecutionInitiatedEventAttributes'] != null
? StartChildWorkflowExecutionInitiatedEventAttributes.fromJson(
json['startChildWorkflowExecutionInitiatedEventAttributes']
as Map<String, dynamic>)
: null,
startLambdaFunctionFailedEventAttributes:
json['startLambdaFunctionFailedEventAttributes'] != null
? StartLambdaFunctionFailedEventAttributes.fromJson(
json['startLambdaFunctionFailedEventAttributes']
as Map<String, dynamic>)
: null,
startTimerFailedEventAttributes:
json['startTimerFailedEventAttributes'] != null
? StartTimerFailedEventAttributes.fromJson(
json['startTimerFailedEventAttributes']
as Map<String, dynamic>)
: null,
timerCanceledEventAttributes: json['timerCanceledEventAttributes'] != null
? TimerCanceledEventAttributes.fromJson(
json['timerCanceledEventAttributes'] as Map<String, dynamic>)
: null,
timerFiredEventAttributes: json['timerFiredEventAttributes'] != null
? TimerFiredEventAttributes.fromJson(
json['timerFiredEventAttributes'] as Map<String, dynamic>)
: null,
timerStartedEventAttributes: json['timerStartedEventAttributes'] != null
? TimerStartedEventAttributes.fromJson(
json['timerStartedEventAttributes'] as Map<String, dynamic>)
: null,
workflowExecutionCancelRequestedEventAttributes:
json['workflowExecutionCancelRequestedEventAttributes'] != null
? WorkflowExecutionCancelRequestedEventAttributes.fromJson(
json['workflowExecutionCancelRequestedEventAttributes']
as Map<String, dynamic>)
: null,
workflowExecutionCanceledEventAttributes:
json['workflowExecutionCanceledEventAttributes'] != null
? WorkflowExecutionCanceledEventAttributes.fromJson(
json['workflowExecutionCanceledEventAttributes']
as Map<String, dynamic>)
: null,
workflowExecutionCompletedEventAttributes:
json['workflowExecutionCompletedEventAttributes'] != null
? WorkflowExecutionCompletedEventAttributes.fromJson(
json['workflowExecutionCompletedEventAttributes']
as Map<String, dynamic>)
: null,
workflowExecutionContinuedAsNewEventAttributes:
json['workflowExecutionContinuedAsNewEventAttributes'] != null
? WorkflowExecutionContinuedAsNewEventAttributes.fromJson(
json['workflowExecutionContinuedAsNewEventAttributes']
as Map<String, dynamic>)
: null,
workflowExecutionFailedEventAttributes:
json['workflowExecutionFailedEventAttributes'] != null
? WorkflowExecutionFailedEventAttributes.fromJson(
json['workflowExecutionFailedEventAttributes']
as Map<String, dynamic>)
: null,
workflowExecutionSignaledEventAttributes:
json['workflowExecutionSignaledEventAttributes'] != null
? WorkflowExecutionSignaledEventAttributes.fromJson(
json['workflowExecutionSignaledEventAttributes']
as Map<String, dynamic>)
: null,
workflowExecutionStartedEventAttributes:
json['workflowExecutionStartedEventAttributes'] != null
? WorkflowExecutionStartedEventAttributes.fromJson(
json['workflowExecutionStartedEventAttributes']
as Map<String, dynamic>)
: null,
workflowExecutionTerminatedEventAttributes:
json['workflowExecutionTerminatedEventAttributes'] != null
? WorkflowExecutionTerminatedEventAttributes.fromJson(
json['workflowExecutionTerminatedEventAttributes']
as Map<String, dynamic>)
: null,
workflowExecutionTimedOutEventAttributes:
json['workflowExecutionTimedOutEventAttributes'] != null
? WorkflowExecutionTimedOutEventAttributes.fromJson(
json['workflowExecutionTimedOutEventAttributes']
as Map<String, dynamic>)
: null,
);
}