HistoryEvent.fromJson constructor

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

Implementation

factory HistoryEvent.fromJson(Map<String, dynamic> json) {
  return HistoryEvent(
    id: json['id'] as int,
    timestamp: nonNullableTimeStampFromJson(json['timestamp'] as Object),
    type: (json['type'] as String).toHistoryEventType(),
    activityFailedEventDetails: json['activityFailedEventDetails'] != null
        ? ActivityFailedEventDetails.fromJson(
            json['activityFailedEventDetails'] as Map<String, dynamic>)
        : null,
    activityScheduleFailedEventDetails:
        json['activityScheduleFailedEventDetails'] != null
            ? ActivityScheduleFailedEventDetails.fromJson(
                json['activityScheduleFailedEventDetails']
                    as Map<String, dynamic>)
            : null,
    activityScheduledEventDetails:
        json['activityScheduledEventDetails'] != null
            ? ActivityScheduledEventDetails.fromJson(
                json['activityScheduledEventDetails'] as Map<String, dynamic>)
            : null,
    activityStartedEventDetails: json['activityStartedEventDetails'] != null
        ? ActivityStartedEventDetails.fromJson(
            json['activityStartedEventDetails'] as Map<String, dynamic>)
        : null,
    activitySucceededEventDetails:
        json['activitySucceededEventDetails'] != null
            ? ActivitySucceededEventDetails.fromJson(
                json['activitySucceededEventDetails'] as Map<String, dynamic>)
            : null,
    activityTimedOutEventDetails: json['activityTimedOutEventDetails'] != null
        ? ActivityTimedOutEventDetails.fromJson(
            json['activityTimedOutEventDetails'] as Map<String, dynamic>)
        : null,
    executionAbortedEventDetails: json['executionAbortedEventDetails'] != null
        ? ExecutionAbortedEventDetails.fromJson(
            json['executionAbortedEventDetails'] as Map<String, dynamic>)
        : null,
    executionFailedEventDetails: json['executionFailedEventDetails'] != null
        ? ExecutionFailedEventDetails.fromJson(
            json['executionFailedEventDetails'] as Map<String, dynamic>)
        : null,
    executionStartedEventDetails: json['executionStartedEventDetails'] != null
        ? ExecutionStartedEventDetails.fromJson(
            json['executionStartedEventDetails'] as Map<String, dynamic>)
        : null,
    executionSucceededEventDetails: json['executionSucceededEventDetails'] !=
            null
        ? ExecutionSucceededEventDetails.fromJson(
            json['executionSucceededEventDetails'] as Map<String, dynamic>)
        : null,
    executionTimedOutEventDetails:
        json['executionTimedOutEventDetails'] != null
            ? ExecutionTimedOutEventDetails.fromJson(
                json['executionTimedOutEventDetails'] as Map<String, dynamic>)
            : null,
    lambdaFunctionFailedEventDetails:
        json['lambdaFunctionFailedEventDetails'] != null
            ? LambdaFunctionFailedEventDetails.fromJson(
                json['lambdaFunctionFailedEventDetails']
                    as Map<String, dynamic>)
            : null,
    lambdaFunctionScheduleFailedEventDetails:
        json['lambdaFunctionScheduleFailedEventDetails'] != null
            ? LambdaFunctionScheduleFailedEventDetails.fromJson(
                json['lambdaFunctionScheduleFailedEventDetails']
                    as Map<String, dynamic>)
            : null,
    lambdaFunctionScheduledEventDetails:
        json['lambdaFunctionScheduledEventDetails'] != null
            ? LambdaFunctionScheduledEventDetails.fromJson(
                json['lambdaFunctionScheduledEventDetails']
                    as Map<String, dynamic>)
            : null,
    lambdaFunctionStartFailedEventDetails:
        json['lambdaFunctionStartFailedEventDetails'] != null
            ? LambdaFunctionStartFailedEventDetails.fromJson(
                json['lambdaFunctionStartFailedEventDetails']
                    as Map<String, dynamic>)
            : null,
    lambdaFunctionSucceededEventDetails:
        json['lambdaFunctionSucceededEventDetails'] != null
            ? LambdaFunctionSucceededEventDetails.fromJson(
                json['lambdaFunctionSucceededEventDetails']
                    as Map<String, dynamic>)
            : null,
    lambdaFunctionTimedOutEventDetails:
        json['lambdaFunctionTimedOutEventDetails'] != null
            ? LambdaFunctionTimedOutEventDetails.fromJson(
                json['lambdaFunctionTimedOutEventDetails']
                    as Map<String, dynamic>)
            : null,
    mapIterationAbortedEventDetails:
        json['mapIterationAbortedEventDetails'] != null
            ? MapIterationEventDetails.fromJson(
                json['mapIterationAbortedEventDetails']
                    as Map<String, dynamic>)
            : null,
    mapIterationFailedEventDetails: json['mapIterationFailedEventDetails'] !=
            null
        ? MapIterationEventDetails.fromJson(
            json['mapIterationFailedEventDetails'] as Map<String, dynamic>)
        : null,
    mapIterationStartedEventDetails:
        json['mapIterationStartedEventDetails'] != null
            ? MapIterationEventDetails.fromJson(
                json['mapIterationStartedEventDetails']
                    as Map<String, dynamic>)
            : null,
    mapIterationSucceededEventDetails:
        json['mapIterationSucceededEventDetails'] != null
            ? MapIterationEventDetails.fromJson(
                json['mapIterationSucceededEventDetails']
                    as Map<String, dynamic>)
            : null,
    mapStateStartedEventDetails: json['mapStateStartedEventDetails'] != null
        ? MapStateStartedEventDetails.fromJson(
            json['mapStateStartedEventDetails'] as Map<String, dynamic>)
        : null,
    previousEventId: json['previousEventId'] as int?,
    stateEnteredEventDetails: json['stateEnteredEventDetails'] != null
        ? StateEnteredEventDetails.fromJson(
            json['stateEnteredEventDetails'] as Map<String, dynamic>)
        : null,
    stateExitedEventDetails: json['stateExitedEventDetails'] != null
        ? StateExitedEventDetails.fromJson(
            json['stateExitedEventDetails'] as Map<String, dynamic>)
        : null,
    taskFailedEventDetails: json['taskFailedEventDetails'] != null
        ? TaskFailedEventDetails.fromJson(
            json['taskFailedEventDetails'] as Map<String, dynamic>)
        : null,
    taskScheduledEventDetails: json['taskScheduledEventDetails'] != null
        ? TaskScheduledEventDetails.fromJson(
            json['taskScheduledEventDetails'] as Map<String, dynamic>)
        : null,
    taskStartFailedEventDetails: json['taskStartFailedEventDetails'] != null
        ? TaskStartFailedEventDetails.fromJson(
            json['taskStartFailedEventDetails'] as Map<String, dynamic>)
        : null,
    taskStartedEventDetails: json['taskStartedEventDetails'] != null
        ? TaskStartedEventDetails.fromJson(
            json['taskStartedEventDetails'] as Map<String, dynamic>)
        : null,
    taskSubmitFailedEventDetails: json['taskSubmitFailedEventDetails'] != null
        ? TaskSubmitFailedEventDetails.fromJson(
            json['taskSubmitFailedEventDetails'] as Map<String, dynamic>)
        : null,
    taskSubmittedEventDetails: json['taskSubmittedEventDetails'] != null
        ? TaskSubmittedEventDetails.fromJson(
            json['taskSubmittedEventDetails'] as Map<String, dynamic>)
        : null,
    taskSucceededEventDetails: json['taskSucceededEventDetails'] != null
        ? TaskSucceededEventDetails.fromJson(
            json['taskSucceededEventDetails'] as Map<String, dynamic>)
        : null,
    taskTimedOutEventDetails: json['taskTimedOutEventDetails'] != null
        ? TaskTimedOutEventDetails.fromJson(
            json['taskTimedOutEventDetails'] as Map<String, dynamic>)
        : null,
  );
}