All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.uber.cadence.HistoryEvent Maven / Gradle / Ivy

There is a newer version: 3.12.5
Show newest version
/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.uber.cadence;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-06-18")
public class HistoryEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HistoryEvent");

  private static final org.apache.thrift.protocol.TField EVENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("eventId", org.apache.thrift.protocol.TType.I64, (short)10);
  private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)20);
  private static final org.apache.thrift.protocol.TField EVENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventType", org.apache.thrift.protocol.TType.I32, (short)30);
  private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.I64, (short)35);
  private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.I64, (short)36);
  private static final org.apache.thrift.protocol.TField WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowExecutionStartedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)40);
  private static final org.apache.thrift.protocol.TField WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowExecutionCompletedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)50);
  private static final org.apache.thrift.protocol.TField WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowExecutionFailedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)60);
  private static final org.apache.thrift.protocol.TField WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowExecutionTimedOutEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)70);
  private static final org.apache.thrift.protocol.TField DECISION_TASK_SCHEDULED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("decisionTaskScheduledEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)80);
  private static final org.apache.thrift.protocol.TField DECISION_TASK_STARTED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("decisionTaskStartedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)90);
  private static final org.apache.thrift.protocol.TField DECISION_TASK_COMPLETED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("decisionTaskCompletedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)100);
  private static final org.apache.thrift.protocol.TField DECISION_TASK_TIMED_OUT_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("decisionTaskTimedOutEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)110);
  private static final org.apache.thrift.protocol.TField DECISION_TASK_FAILED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("decisionTaskFailedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)120);
  private static final org.apache.thrift.protocol.TField ACTIVITY_TASK_SCHEDULED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("activityTaskScheduledEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)130);
  private static final org.apache.thrift.protocol.TField ACTIVITY_TASK_STARTED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("activityTaskStartedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)140);
  private static final org.apache.thrift.protocol.TField ACTIVITY_TASK_COMPLETED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("activityTaskCompletedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)150);
  private static final org.apache.thrift.protocol.TField ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("activityTaskFailedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)160);
  private static final org.apache.thrift.protocol.TField ACTIVITY_TASK_TIMED_OUT_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("activityTaskTimedOutEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)170);
  private static final org.apache.thrift.protocol.TField TIMER_STARTED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("timerStartedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)180);
  private static final org.apache.thrift.protocol.TField TIMER_FIRED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("timerFiredEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)190);
  private static final org.apache.thrift.protocol.TField ACTIVITY_TASK_CANCEL_REQUESTED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("activityTaskCancelRequestedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)200);
  private static final org.apache.thrift.protocol.TField REQUEST_CANCEL_ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("requestCancelActivityTaskFailedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)210);
  private static final org.apache.thrift.protocol.TField ACTIVITY_TASK_CANCELED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("activityTaskCanceledEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)220);
  private static final org.apache.thrift.protocol.TField TIMER_CANCELED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("timerCanceledEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)230);
  private static final org.apache.thrift.protocol.TField CANCEL_TIMER_FAILED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("cancelTimerFailedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)240);
  private static final org.apache.thrift.protocol.TField MARKER_RECORDED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("markerRecordedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)250);
  private static final org.apache.thrift.protocol.TField WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowExecutionSignaledEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)260);
  private static final org.apache.thrift.protocol.TField WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowExecutionTerminatedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)270);
  private static final org.apache.thrift.protocol.TField WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowExecutionCancelRequestedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)280);
  private static final org.apache.thrift.protocol.TField WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowExecutionCanceledEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)290);
  private static final org.apache.thrift.protocol.TField REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("requestCancelExternalWorkflowExecutionInitiatedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)300);
  private static final org.apache.thrift.protocol.TField REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("requestCancelExternalWorkflowExecutionFailedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)310);
  private static final org.apache.thrift.protocol.TField EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("externalWorkflowExecutionCancelRequestedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)320);
  private static final org.apache.thrift.protocol.TField WORKFLOW_EXECUTION_CONTINUED_AS_NEW_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowExecutionContinuedAsNewEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)330);
  private static final org.apache.thrift.protocol.TField START_CHILD_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("startChildWorkflowExecutionInitiatedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)340);
  private static final org.apache.thrift.protocol.TField START_CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("startChildWorkflowExecutionFailedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)350);
  private static final org.apache.thrift.protocol.TField CHILD_WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("childWorkflowExecutionStartedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)360);
  private static final org.apache.thrift.protocol.TField CHILD_WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("childWorkflowExecutionCompletedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)370);
  private static final org.apache.thrift.protocol.TField CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("childWorkflowExecutionFailedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)380);
  private static final org.apache.thrift.protocol.TField CHILD_WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("childWorkflowExecutionCanceledEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)390);
  private static final org.apache.thrift.protocol.TField CHILD_WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("childWorkflowExecutionTimedOutEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)400);
  private static final org.apache.thrift.protocol.TField CHILD_WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("childWorkflowExecutionTerminatedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)410);
  private static final org.apache.thrift.protocol.TField SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("signalExternalWorkflowExecutionInitiatedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)420);
  private static final org.apache.thrift.protocol.TField SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("signalExternalWorkflowExecutionFailedEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)430);
  private static final org.apache.thrift.protocol.TField EXTERNAL_WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("externalWorkflowExecutionSignaledEventAttributes", org.apache.thrift.protocol.TType.STRUCT, (short)440);

  private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new HistoryEventStandardSchemeFactory());
    schemes.put(TupleScheme.class, new HistoryEventTupleSchemeFactory());
  }

  public long eventId; // optional
  public long timestamp; // optional
  /**
   * 
   * @see EventType
   */
  public EventType eventType; // optional
  public long version; // optional
  public long taskId; // optional
  public WorkflowExecutionStartedEventAttributes workflowExecutionStartedEventAttributes; // optional
  public WorkflowExecutionCompletedEventAttributes workflowExecutionCompletedEventAttributes; // optional
  public WorkflowExecutionFailedEventAttributes workflowExecutionFailedEventAttributes; // optional
  public WorkflowExecutionTimedOutEventAttributes workflowExecutionTimedOutEventAttributes; // optional
  public DecisionTaskScheduledEventAttributes decisionTaskScheduledEventAttributes; // optional
  public DecisionTaskStartedEventAttributes decisionTaskStartedEventAttributes; // optional
  public DecisionTaskCompletedEventAttributes decisionTaskCompletedEventAttributes; // optional
  public DecisionTaskTimedOutEventAttributes decisionTaskTimedOutEventAttributes; // optional
  public DecisionTaskFailedEventAttributes decisionTaskFailedEventAttributes; // optional
  public ActivityTaskScheduledEventAttributes activityTaskScheduledEventAttributes; // optional
  public ActivityTaskStartedEventAttributes activityTaskStartedEventAttributes; // optional
  public ActivityTaskCompletedEventAttributes activityTaskCompletedEventAttributes; // optional
  public ActivityTaskFailedEventAttributes activityTaskFailedEventAttributes; // optional
  public ActivityTaskTimedOutEventAttributes activityTaskTimedOutEventAttributes; // optional
  public TimerStartedEventAttributes timerStartedEventAttributes; // optional
  public TimerFiredEventAttributes timerFiredEventAttributes; // optional
  public ActivityTaskCancelRequestedEventAttributes activityTaskCancelRequestedEventAttributes; // optional
  public RequestCancelActivityTaskFailedEventAttributes requestCancelActivityTaskFailedEventAttributes; // optional
  public ActivityTaskCanceledEventAttributes activityTaskCanceledEventAttributes; // optional
  public TimerCanceledEventAttributes timerCanceledEventAttributes; // optional
  public CancelTimerFailedEventAttributes cancelTimerFailedEventAttributes; // optional
  public MarkerRecordedEventAttributes markerRecordedEventAttributes; // optional
  public WorkflowExecutionSignaledEventAttributes workflowExecutionSignaledEventAttributes; // optional
  public WorkflowExecutionTerminatedEventAttributes workflowExecutionTerminatedEventAttributes; // optional
  public WorkflowExecutionCancelRequestedEventAttributes workflowExecutionCancelRequestedEventAttributes; // optional
  public WorkflowExecutionCanceledEventAttributes workflowExecutionCanceledEventAttributes; // optional
  public RequestCancelExternalWorkflowExecutionInitiatedEventAttributes requestCancelExternalWorkflowExecutionInitiatedEventAttributes; // optional
  public RequestCancelExternalWorkflowExecutionFailedEventAttributes requestCancelExternalWorkflowExecutionFailedEventAttributes; // optional
  public ExternalWorkflowExecutionCancelRequestedEventAttributes externalWorkflowExecutionCancelRequestedEventAttributes; // optional
  public WorkflowExecutionContinuedAsNewEventAttributes workflowExecutionContinuedAsNewEventAttributes; // optional
  public StartChildWorkflowExecutionInitiatedEventAttributes startChildWorkflowExecutionInitiatedEventAttributes; // optional
  public StartChildWorkflowExecutionFailedEventAttributes startChildWorkflowExecutionFailedEventAttributes; // optional
  public ChildWorkflowExecutionStartedEventAttributes childWorkflowExecutionStartedEventAttributes; // optional
  public ChildWorkflowExecutionCompletedEventAttributes childWorkflowExecutionCompletedEventAttributes; // optional
  public ChildWorkflowExecutionFailedEventAttributes childWorkflowExecutionFailedEventAttributes; // optional
  public ChildWorkflowExecutionCanceledEventAttributes childWorkflowExecutionCanceledEventAttributes; // optional
  public ChildWorkflowExecutionTimedOutEventAttributes childWorkflowExecutionTimedOutEventAttributes; // optional
  public ChildWorkflowExecutionTerminatedEventAttributes childWorkflowExecutionTerminatedEventAttributes; // optional
  public SignalExternalWorkflowExecutionInitiatedEventAttributes signalExternalWorkflowExecutionInitiatedEventAttributes; // optional
  public SignalExternalWorkflowExecutionFailedEventAttributes signalExternalWorkflowExecutionFailedEventAttributes; // optional
  public ExternalWorkflowExecutionSignaledEventAttributes externalWorkflowExecutionSignaledEventAttributes; // optional

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    EVENT_ID((short)10, "eventId"),
    TIMESTAMP((short)20, "timestamp"),
    /**
     * 
     * @see EventType
     */
    EVENT_TYPE((short)30, "eventType"),
    VERSION((short)35, "version"),
    TASK_ID((short)36, "taskId"),
    WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES((short)40, "workflowExecutionStartedEventAttributes"),
    WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES((short)50, "workflowExecutionCompletedEventAttributes"),
    WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES((short)60, "workflowExecutionFailedEventAttributes"),
    WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES((short)70, "workflowExecutionTimedOutEventAttributes"),
    DECISION_TASK_SCHEDULED_EVENT_ATTRIBUTES((short)80, "decisionTaskScheduledEventAttributes"),
    DECISION_TASK_STARTED_EVENT_ATTRIBUTES((short)90, "decisionTaskStartedEventAttributes"),
    DECISION_TASK_COMPLETED_EVENT_ATTRIBUTES((short)100, "decisionTaskCompletedEventAttributes"),
    DECISION_TASK_TIMED_OUT_EVENT_ATTRIBUTES((short)110, "decisionTaskTimedOutEventAttributes"),
    DECISION_TASK_FAILED_EVENT_ATTRIBUTES((short)120, "decisionTaskFailedEventAttributes"),
    ACTIVITY_TASK_SCHEDULED_EVENT_ATTRIBUTES((short)130, "activityTaskScheduledEventAttributes"),
    ACTIVITY_TASK_STARTED_EVENT_ATTRIBUTES((short)140, "activityTaskStartedEventAttributes"),
    ACTIVITY_TASK_COMPLETED_EVENT_ATTRIBUTES((short)150, "activityTaskCompletedEventAttributes"),
    ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES((short)160, "activityTaskFailedEventAttributes"),
    ACTIVITY_TASK_TIMED_OUT_EVENT_ATTRIBUTES((short)170, "activityTaskTimedOutEventAttributes"),
    TIMER_STARTED_EVENT_ATTRIBUTES((short)180, "timerStartedEventAttributes"),
    TIMER_FIRED_EVENT_ATTRIBUTES((short)190, "timerFiredEventAttributes"),
    ACTIVITY_TASK_CANCEL_REQUESTED_EVENT_ATTRIBUTES((short)200, "activityTaskCancelRequestedEventAttributes"),
    REQUEST_CANCEL_ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES((short)210, "requestCancelActivityTaskFailedEventAttributes"),
    ACTIVITY_TASK_CANCELED_EVENT_ATTRIBUTES((short)220, "activityTaskCanceledEventAttributes"),
    TIMER_CANCELED_EVENT_ATTRIBUTES((short)230, "timerCanceledEventAttributes"),
    CANCEL_TIMER_FAILED_EVENT_ATTRIBUTES((short)240, "cancelTimerFailedEventAttributes"),
    MARKER_RECORDED_EVENT_ATTRIBUTES((short)250, "markerRecordedEventAttributes"),
    WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES((short)260, "workflowExecutionSignaledEventAttributes"),
    WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES((short)270, "workflowExecutionTerminatedEventAttributes"),
    WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES((short)280, "workflowExecutionCancelRequestedEventAttributes"),
    WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES((short)290, "workflowExecutionCanceledEventAttributes"),
    REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES((short)300, "requestCancelExternalWorkflowExecutionInitiatedEventAttributes"),
    REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES((short)310, "requestCancelExternalWorkflowExecutionFailedEventAttributes"),
    EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES((short)320, "externalWorkflowExecutionCancelRequestedEventAttributes"),
    WORKFLOW_EXECUTION_CONTINUED_AS_NEW_EVENT_ATTRIBUTES((short)330, "workflowExecutionContinuedAsNewEventAttributes"),
    START_CHILD_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES((short)340, "startChildWorkflowExecutionInitiatedEventAttributes"),
    START_CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES((short)350, "startChildWorkflowExecutionFailedEventAttributes"),
    CHILD_WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES((short)360, "childWorkflowExecutionStartedEventAttributes"),
    CHILD_WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES((short)370, "childWorkflowExecutionCompletedEventAttributes"),
    CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES((short)380, "childWorkflowExecutionFailedEventAttributes"),
    CHILD_WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES((short)390, "childWorkflowExecutionCanceledEventAttributes"),
    CHILD_WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES((short)400, "childWorkflowExecutionTimedOutEventAttributes"),
    CHILD_WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES((short)410, "childWorkflowExecutionTerminatedEventAttributes"),
    SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES((short)420, "signalExternalWorkflowExecutionInitiatedEventAttributes"),
    SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES((short)430, "signalExternalWorkflowExecutionFailedEventAttributes"),
    EXTERNAL_WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES((short)440, "externalWorkflowExecutionSignaledEventAttributes");

    private static final Map byName = new HashMap();

    static {
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 10: // EVENT_ID
          return EVENT_ID;
        case 20: // TIMESTAMP
          return TIMESTAMP;
        case 30: // EVENT_TYPE
          return EVENT_TYPE;
        case 35: // VERSION
          return VERSION;
        case 36: // TASK_ID
          return TASK_ID;
        case 40: // WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES
          return WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES;
        case 50: // WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES
          return WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES;
        case 60: // WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES
          return WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES;
        case 70: // WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES
          return WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES;
        case 80: // DECISION_TASK_SCHEDULED_EVENT_ATTRIBUTES
          return DECISION_TASK_SCHEDULED_EVENT_ATTRIBUTES;
        case 90: // DECISION_TASK_STARTED_EVENT_ATTRIBUTES
          return DECISION_TASK_STARTED_EVENT_ATTRIBUTES;
        case 100: // DECISION_TASK_COMPLETED_EVENT_ATTRIBUTES
          return DECISION_TASK_COMPLETED_EVENT_ATTRIBUTES;
        case 110: // DECISION_TASK_TIMED_OUT_EVENT_ATTRIBUTES
          return DECISION_TASK_TIMED_OUT_EVENT_ATTRIBUTES;
        case 120: // DECISION_TASK_FAILED_EVENT_ATTRIBUTES
          return DECISION_TASK_FAILED_EVENT_ATTRIBUTES;
        case 130: // ACTIVITY_TASK_SCHEDULED_EVENT_ATTRIBUTES
          return ACTIVITY_TASK_SCHEDULED_EVENT_ATTRIBUTES;
        case 140: // ACTIVITY_TASK_STARTED_EVENT_ATTRIBUTES
          return ACTIVITY_TASK_STARTED_EVENT_ATTRIBUTES;
        case 150: // ACTIVITY_TASK_COMPLETED_EVENT_ATTRIBUTES
          return ACTIVITY_TASK_COMPLETED_EVENT_ATTRIBUTES;
        case 160: // ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES
          return ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES;
        case 170: // ACTIVITY_TASK_TIMED_OUT_EVENT_ATTRIBUTES
          return ACTIVITY_TASK_TIMED_OUT_EVENT_ATTRIBUTES;
        case 180: // TIMER_STARTED_EVENT_ATTRIBUTES
          return TIMER_STARTED_EVENT_ATTRIBUTES;
        case 190: // TIMER_FIRED_EVENT_ATTRIBUTES
          return TIMER_FIRED_EVENT_ATTRIBUTES;
        case 200: // ACTIVITY_TASK_CANCEL_REQUESTED_EVENT_ATTRIBUTES
          return ACTIVITY_TASK_CANCEL_REQUESTED_EVENT_ATTRIBUTES;
        case 210: // REQUEST_CANCEL_ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES
          return REQUEST_CANCEL_ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES;
        case 220: // ACTIVITY_TASK_CANCELED_EVENT_ATTRIBUTES
          return ACTIVITY_TASK_CANCELED_EVENT_ATTRIBUTES;
        case 230: // TIMER_CANCELED_EVENT_ATTRIBUTES
          return TIMER_CANCELED_EVENT_ATTRIBUTES;
        case 240: // CANCEL_TIMER_FAILED_EVENT_ATTRIBUTES
          return CANCEL_TIMER_FAILED_EVENT_ATTRIBUTES;
        case 250: // MARKER_RECORDED_EVENT_ATTRIBUTES
          return MARKER_RECORDED_EVENT_ATTRIBUTES;
        case 260: // WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES
          return WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES;
        case 270: // WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES
          return WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES;
        case 280: // WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES
          return WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES;
        case 290: // WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES
          return WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES;
        case 300: // REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES
          return REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES;
        case 310: // REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES
          return REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES;
        case 320: // EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES
          return EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES;
        case 330: // WORKFLOW_EXECUTION_CONTINUED_AS_NEW_EVENT_ATTRIBUTES
          return WORKFLOW_EXECUTION_CONTINUED_AS_NEW_EVENT_ATTRIBUTES;
        case 340: // START_CHILD_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES
          return START_CHILD_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES;
        case 350: // START_CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES
          return START_CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES;
        case 360: // CHILD_WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES
          return CHILD_WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES;
        case 370: // CHILD_WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES
          return CHILD_WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES;
        case 380: // CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES
          return CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES;
        case 390: // CHILD_WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES
          return CHILD_WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES;
        case 400: // CHILD_WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES
          return CHILD_WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES;
        case 410: // CHILD_WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES
          return CHILD_WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES;
        case 420: // SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES
          return SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES;
        case 430: // SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES
          return SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES;
        case 440: // EXTERNAL_WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES
          return EXTERNAL_WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    public static _Fields findByName(String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final String _fieldName;

    _Fields(short thriftId, String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __EVENTID_ISSET_ID = 0;
  private static final int __TIMESTAMP_ISSET_ID = 1;
  private static final int __VERSION_ISSET_ID = 2;
  private static final int __TASKID_ISSET_ID = 3;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.EVENT_ID,_Fields.TIMESTAMP,_Fields.EVENT_TYPE,_Fields.VERSION,_Fields.TASK_ID,_Fields.WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES,_Fields.WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES,_Fields.WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES,_Fields.WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES,_Fields.DECISION_TASK_SCHEDULED_EVENT_ATTRIBUTES,_Fields.DECISION_TASK_STARTED_EVENT_ATTRIBUTES,_Fields.DECISION_TASK_COMPLETED_EVENT_ATTRIBUTES,_Fields.DECISION_TASK_TIMED_OUT_EVENT_ATTRIBUTES,_Fields.DECISION_TASK_FAILED_EVENT_ATTRIBUTES,_Fields.ACTIVITY_TASK_SCHEDULED_EVENT_ATTRIBUTES,_Fields.ACTIVITY_TASK_STARTED_EVENT_ATTRIBUTES,_Fields.ACTIVITY_TASK_COMPLETED_EVENT_ATTRIBUTES,_Fields.ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES,_Fields.ACTIVITY_TASK_TIMED_OUT_EVENT_ATTRIBUTES,_Fields.TIMER_STARTED_EVENT_ATTRIBUTES,_Fields.TIMER_FIRED_EVENT_ATTRIBUTES,_Fields.ACTIVITY_TASK_CANCEL_REQUESTED_EVENT_ATTRIBUTES,_Fields.REQUEST_CANCEL_ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES,_Fields.ACTIVITY_TASK_CANCELED_EVENT_ATTRIBUTES,_Fields.TIMER_CANCELED_EVENT_ATTRIBUTES,_Fields.CANCEL_TIMER_FAILED_EVENT_ATTRIBUTES,_Fields.MARKER_RECORDED_EVENT_ATTRIBUTES,_Fields.WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES,_Fields.WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES,_Fields.WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES,_Fields.WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES,_Fields.REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES,_Fields.REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES,_Fields.EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES,_Fields.WORKFLOW_EXECUTION_CONTINUED_AS_NEW_EVENT_ATTRIBUTES,_Fields.START_CHILD_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES,_Fields.START_CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES,_Fields.CHILD_WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES,_Fields.CHILD_WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES,_Fields.CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES,_Fields.CHILD_WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES,_Fields.CHILD_WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES,_Fields.CHILD_WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES,_Fields.SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES,_Fields.SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES,_Fields.EXTERNAL_WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES};
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.EVENT_ID, new org.apache.thrift.meta_data.FieldMetaData("eventId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.EVENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("eventType", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, EventType.class)));
    tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("workflowExecutionStartedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowExecutionStartedEventAttributes.class)));
    tmpMap.put(_Fields.WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("workflowExecutionCompletedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowExecutionCompletedEventAttributes.class)));
    tmpMap.put(_Fields.WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("workflowExecutionFailedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowExecutionFailedEventAttributes.class)));
    tmpMap.put(_Fields.WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("workflowExecutionTimedOutEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowExecutionTimedOutEventAttributes.class)));
    tmpMap.put(_Fields.DECISION_TASK_SCHEDULED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("decisionTaskScheduledEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DecisionTaskScheduledEventAttributes.class)));
    tmpMap.put(_Fields.DECISION_TASK_STARTED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("decisionTaskStartedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DecisionTaskStartedEventAttributes.class)));
    tmpMap.put(_Fields.DECISION_TASK_COMPLETED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("decisionTaskCompletedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DecisionTaskCompletedEventAttributes.class)));
    tmpMap.put(_Fields.DECISION_TASK_TIMED_OUT_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("decisionTaskTimedOutEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DecisionTaskTimedOutEventAttributes.class)));
    tmpMap.put(_Fields.DECISION_TASK_FAILED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("decisionTaskFailedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DecisionTaskFailedEventAttributes.class)));
    tmpMap.put(_Fields.ACTIVITY_TASK_SCHEDULED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("activityTaskScheduledEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActivityTaskScheduledEventAttributes.class)));
    tmpMap.put(_Fields.ACTIVITY_TASK_STARTED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("activityTaskStartedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActivityTaskStartedEventAttributes.class)));
    tmpMap.put(_Fields.ACTIVITY_TASK_COMPLETED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("activityTaskCompletedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActivityTaskCompletedEventAttributes.class)));
    tmpMap.put(_Fields.ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("activityTaskFailedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActivityTaskFailedEventAttributes.class)));
    tmpMap.put(_Fields.ACTIVITY_TASK_TIMED_OUT_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("activityTaskTimedOutEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActivityTaskTimedOutEventAttributes.class)));
    tmpMap.put(_Fields.TIMER_STARTED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("timerStartedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimerStartedEventAttributes.class)));
    tmpMap.put(_Fields.TIMER_FIRED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("timerFiredEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimerFiredEventAttributes.class)));
    tmpMap.put(_Fields.ACTIVITY_TASK_CANCEL_REQUESTED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("activityTaskCancelRequestedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActivityTaskCancelRequestedEventAttributes.class)));
    tmpMap.put(_Fields.REQUEST_CANCEL_ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("requestCancelActivityTaskFailedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RequestCancelActivityTaskFailedEventAttributes.class)));
    tmpMap.put(_Fields.ACTIVITY_TASK_CANCELED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("activityTaskCanceledEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActivityTaskCanceledEventAttributes.class)));
    tmpMap.put(_Fields.TIMER_CANCELED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("timerCanceledEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimerCanceledEventAttributes.class)));
    tmpMap.put(_Fields.CANCEL_TIMER_FAILED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("cancelTimerFailedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CancelTimerFailedEventAttributes.class)));
    tmpMap.put(_Fields.MARKER_RECORDED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("markerRecordedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MarkerRecordedEventAttributes.class)));
    tmpMap.put(_Fields.WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("workflowExecutionSignaledEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowExecutionSignaledEventAttributes.class)));
    tmpMap.put(_Fields.WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("workflowExecutionTerminatedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowExecutionTerminatedEventAttributes.class)));
    tmpMap.put(_Fields.WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("workflowExecutionCancelRequestedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowExecutionCancelRequestedEventAttributes.class)));
    tmpMap.put(_Fields.WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("workflowExecutionCanceledEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowExecutionCanceledEventAttributes.class)));
    tmpMap.put(_Fields.REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("requestCancelExternalWorkflowExecutionInitiatedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RequestCancelExternalWorkflowExecutionInitiatedEventAttributes.class)));
    tmpMap.put(_Fields.REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("requestCancelExternalWorkflowExecutionFailedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RequestCancelExternalWorkflowExecutionFailedEventAttributes.class)));
    tmpMap.put(_Fields.EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("externalWorkflowExecutionCancelRequestedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExternalWorkflowExecutionCancelRequestedEventAttributes.class)));
    tmpMap.put(_Fields.WORKFLOW_EXECUTION_CONTINUED_AS_NEW_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("workflowExecutionContinuedAsNewEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowExecutionContinuedAsNewEventAttributes.class)));
    tmpMap.put(_Fields.START_CHILD_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("startChildWorkflowExecutionInitiatedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StartChildWorkflowExecutionInitiatedEventAttributes.class)));
    tmpMap.put(_Fields.START_CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("startChildWorkflowExecutionFailedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StartChildWorkflowExecutionFailedEventAttributes.class)));
    tmpMap.put(_Fields.CHILD_WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("childWorkflowExecutionStartedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ChildWorkflowExecutionStartedEventAttributes.class)));
    tmpMap.put(_Fields.CHILD_WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("childWorkflowExecutionCompletedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ChildWorkflowExecutionCompletedEventAttributes.class)));
    tmpMap.put(_Fields.CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("childWorkflowExecutionFailedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ChildWorkflowExecutionFailedEventAttributes.class)));
    tmpMap.put(_Fields.CHILD_WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("childWorkflowExecutionCanceledEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ChildWorkflowExecutionCanceledEventAttributes.class)));
    tmpMap.put(_Fields.CHILD_WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("childWorkflowExecutionTimedOutEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ChildWorkflowExecutionTimedOutEventAttributes.class)));
    tmpMap.put(_Fields.CHILD_WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("childWorkflowExecutionTerminatedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ChildWorkflowExecutionTerminatedEventAttributes.class)));
    tmpMap.put(_Fields.SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("signalExternalWorkflowExecutionInitiatedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SignalExternalWorkflowExecutionInitiatedEventAttributes.class)));
    tmpMap.put(_Fields.SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("signalExternalWorkflowExecutionFailedEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SignalExternalWorkflowExecutionFailedEventAttributes.class)));
    tmpMap.put(_Fields.EXTERNAL_WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("externalWorkflowExecutionSignaledEventAttributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExternalWorkflowExecutionSignaledEventAttributes.class)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HistoryEvent.class, metaDataMap);
  }

  public HistoryEvent() {
  }

  /**
   * Performs a deep copy on other.
   */
  public HistoryEvent(HistoryEvent other) {
    __isset_bitfield = other.__isset_bitfield;
    this.eventId = other.eventId;
    this.timestamp = other.timestamp;
    if (other.isSetEventType()) {
      this.eventType = other.eventType;
    }
    this.version = other.version;
    this.taskId = other.taskId;
    if (other.isSetWorkflowExecutionStartedEventAttributes()) {
      this.workflowExecutionStartedEventAttributes = new WorkflowExecutionStartedEventAttributes(other.workflowExecutionStartedEventAttributes);
    }
    if (other.isSetWorkflowExecutionCompletedEventAttributes()) {
      this.workflowExecutionCompletedEventAttributes = new WorkflowExecutionCompletedEventAttributes(other.workflowExecutionCompletedEventAttributes);
    }
    if (other.isSetWorkflowExecutionFailedEventAttributes()) {
      this.workflowExecutionFailedEventAttributes = new WorkflowExecutionFailedEventAttributes(other.workflowExecutionFailedEventAttributes);
    }
    if (other.isSetWorkflowExecutionTimedOutEventAttributes()) {
      this.workflowExecutionTimedOutEventAttributes = new WorkflowExecutionTimedOutEventAttributes(other.workflowExecutionTimedOutEventAttributes);
    }
    if (other.isSetDecisionTaskScheduledEventAttributes()) {
      this.decisionTaskScheduledEventAttributes = new DecisionTaskScheduledEventAttributes(other.decisionTaskScheduledEventAttributes);
    }
    if (other.isSetDecisionTaskStartedEventAttributes()) {
      this.decisionTaskStartedEventAttributes = new DecisionTaskStartedEventAttributes(other.decisionTaskStartedEventAttributes);
    }
    if (other.isSetDecisionTaskCompletedEventAttributes()) {
      this.decisionTaskCompletedEventAttributes = new DecisionTaskCompletedEventAttributes(other.decisionTaskCompletedEventAttributes);
    }
    if (other.isSetDecisionTaskTimedOutEventAttributes()) {
      this.decisionTaskTimedOutEventAttributes = new DecisionTaskTimedOutEventAttributes(other.decisionTaskTimedOutEventAttributes);
    }
    if (other.isSetDecisionTaskFailedEventAttributes()) {
      this.decisionTaskFailedEventAttributes = new DecisionTaskFailedEventAttributes(other.decisionTaskFailedEventAttributes);
    }
    if (other.isSetActivityTaskScheduledEventAttributes()) {
      this.activityTaskScheduledEventAttributes = new ActivityTaskScheduledEventAttributes(other.activityTaskScheduledEventAttributes);
    }
    if (other.isSetActivityTaskStartedEventAttributes()) {
      this.activityTaskStartedEventAttributes = new ActivityTaskStartedEventAttributes(other.activityTaskStartedEventAttributes);
    }
    if (other.isSetActivityTaskCompletedEventAttributes()) {
      this.activityTaskCompletedEventAttributes = new ActivityTaskCompletedEventAttributes(other.activityTaskCompletedEventAttributes);
    }
    if (other.isSetActivityTaskFailedEventAttributes()) {
      this.activityTaskFailedEventAttributes = new ActivityTaskFailedEventAttributes(other.activityTaskFailedEventAttributes);
    }
    if (other.isSetActivityTaskTimedOutEventAttributes()) {
      this.activityTaskTimedOutEventAttributes = new ActivityTaskTimedOutEventAttributes(other.activityTaskTimedOutEventAttributes);
    }
    if (other.isSetTimerStartedEventAttributes()) {
      this.timerStartedEventAttributes = new TimerStartedEventAttributes(other.timerStartedEventAttributes);
    }
    if (other.isSetTimerFiredEventAttributes()) {
      this.timerFiredEventAttributes = new TimerFiredEventAttributes(other.timerFiredEventAttributes);
    }
    if (other.isSetActivityTaskCancelRequestedEventAttributes()) {
      this.activityTaskCancelRequestedEventAttributes = new ActivityTaskCancelRequestedEventAttributes(other.activityTaskCancelRequestedEventAttributes);
    }
    if (other.isSetRequestCancelActivityTaskFailedEventAttributes()) {
      this.requestCancelActivityTaskFailedEventAttributes = new RequestCancelActivityTaskFailedEventAttributes(other.requestCancelActivityTaskFailedEventAttributes);
    }
    if (other.isSetActivityTaskCanceledEventAttributes()) {
      this.activityTaskCanceledEventAttributes = new ActivityTaskCanceledEventAttributes(other.activityTaskCanceledEventAttributes);
    }
    if (other.isSetTimerCanceledEventAttributes()) {
      this.timerCanceledEventAttributes = new TimerCanceledEventAttributes(other.timerCanceledEventAttributes);
    }
    if (other.isSetCancelTimerFailedEventAttributes()) {
      this.cancelTimerFailedEventAttributes = new CancelTimerFailedEventAttributes(other.cancelTimerFailedEventAttributes);
    }
    if (other.isSetMarkerRecordedEventAttributes()) {
      this.markerRecordedEventAttributes = new MarkerRecordedEventAttributes(other.markerRecordedEventAttributes);
    }
    if (other.isSetWorkflowExecutionSignaledEventAttributes()) {
      this.workflowExecutionSignaledEventAttributes = new WorkflowExecutionSignaledEventAttributes(other.workflowExecutionSignaledEventAttributes);
    }
    if (other.isSetWorkflowExecutionTerminatedEventAttributes()) {
      this.workflowExecutionTerminatedEventAttributes = new WorkflowExecutionTerminatedEventAttributes(other.workflowExecutionTerminatedEventAttributes);
    }
    if (other.isSetWorkflowExecutionCancelRequestedEventAttributes()) {
      this.workflowExecutionCancelRequestedEventAttributes = new WorkflowExecutionCancelRequestedEventAttributes(other.workflowExecutionCancelRequestedEventAttributes);
    }
    if (other.isSetWorkflowExecutionCanceledEventAttributes()) {
      this.workflowExecutionCanceledEventAttributes = new WorkflowExecutionCanceledEventAttributes(other.workflowExecutionCanceledEventAttributes);
    }
    if (other.isSetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes()) {
      this.requestCancelExternalWorkflowExecutionInitiatedEventAttributes = new RequestCancelExternalWorkflowExecutionInitiatedEventAttributes(other.requestCancelExternalWorkflowExecutionInitiatedEventAttributes);
    }
    if (other.isSetRequestCancelExternalWorkflowExecutionFailedEventAttributes()) {
      this.requestCancelExternalWorkflowExecutionFailedEventAttributes = new RequestCancelExternalWorkflowExecutionFailedEventAttributes(other.requestCancelExternalWorkflowExecutionFailedEventAttributes);
    }
    if (other.isSetExternalWorkflowExecutionCancelRequestedEventAttributes()) {
      this.externalWorkflowExecutionCancelRequestedEventAttributes = new ExternalWorkflowExecutionCancelRequestedEventAttributes(other.externalWorkflowExecutionCancelRequestedEventAttributes);
    }
    if (other.isSetWorkflowExecutionContinuedAsNewEventAttributes()) {
      this.workflowExecutionContinuedAsNewEventAttributes = new WorkflowExecutionContinuedAsNewEventAttributes(other.workflowExecutionContinuedAsNewEventAttributes);
    }
    if (other.isSetStartChildWorkflowExecutionInitiatedEventAttributes()) {
      this.startChildWorkflowExecutionInitiatedEventAttributes = new StartChildWorkflowExecutionInitiatedEventAttributes(other.startChildWorkflowExecutionInitiatedEventAttributes);
    }
    if (other.isSetStartChildWorkflowExecutionFailedEventAttributes()) {
      this.startChildWorkflowExecutionFailedEventAttributes = new StartChildWorkflowExecutionFailedEventAttributes(other.startChildWorkflowExecutionFailedEventAttributes);
    }
    if (other.isSetChildWorkflowExecutionStartedEventAttributes()) {
      this.childWorkflowExecutionStartedEventAttributes = new ChildWorkflowExecutionStartedEventAttributes(other.childWorkflowExecutionStartedEventAttributes);
    }
    if (other.isSetChildWorkflowExecutionCompletedEventAttributes()) {
      this.childWorkflowExecutionCompletedEventAttributes = new ChildWorkflowExecutionCompletedEventAttributes(other.childWorkflowExecutionCompletedEventAttributes);
    }
    if (other.isSetChildWorkflowExecutionFailedEventAttributes()) {
      this.childWorkflowExecutionFailedEventAttributes = new ChildWorkflowExecutionFailedEventAttributes(other.childWorkflowExecutionFailedEventAttributes);
    }
    if (other.isSetChildWorkflowExecutionCanceledEventAttributes()) {
      this.childWorkflowExecutionCanceledEventAttributes = new ChildWorkflowExecutionCanceledEventAttributes(other.childWorkflowExecutionCanceledEventAttributes);
    }
    if (other.isSetChildWorkflowExecutionTimedOutEventAttributes()) {
      this.childWorkflowExecutionTimedOutEventAttributes = new ChildWorkflowExecutionTimedOutEventAttributes(other.childWorkflowExecutionTimedOutEventAttributes);
    }
    if (other.isSetChildWorkflowExecutionTerminatedEventAttributes()) {
      this.childWorkflowExecutionTerminatedEventAttributes = new ChildWorkflowExecutionTerminatedEventAttributes(other.childWorkflowExecutionTerminatedEventAttributes);
    }
    if (other.isSetSignalExternalWorkflowExecutionInitiatedEventAttributes()) {
      this.signalExternalWorkflowExecutionInitiatedEventAttributes = new SignalExternalWorkflowExecutionInitiatedEventAttributes(other.signalExternalWorkflowExecutionInitiatedEventAttributes);
    }
    if (other.isSetSignalExternalWorkflowExecutionFailedEventAttributes()) {
      this.signalExternalWorkflowExecutionFailedEventAttributes = new SignalExternalWorkflowExecutionFailedEventAttributes(other.signalExternalWorkflowExecutionFailedEventAttributes);
    }
    if (other.isSetExternalWorkflowExecutionSignaledEventAttributes()) {
      this.externalWorkflowExecutionSignaledEventAttributes = new ExternalWorkflowExecutionSignaledEventAttributes(other.externalWorkflowExecutionSignaledEventAttributes);
    }
  }

  public HistoryEvent deepCopy() {
    return new HistoryEvent(this);
  }

  @Override
  public void clear() {
    setEventIdIsSet(false);
    this.eventId = 0;
    setTimestampIsSet(false);
    this.timestamp = 0;
    this.eventType = null;
    setVersionIsSet(false);
    this.version = 0;
    setTaskIdIsSet(false);
    this.taskId = 0;
    this.workflowExecutionStartedEventAttributes = null;
    this.workflowExecutionCompletedEventAttributes = null;
    this.workflowExecutionFailedEventAttributes = null;
    this.workflowExecutionTimedOutEventAttributes = null;
    this.decisionTaskScheduledEventAttributes = null;
    this.decisionTaskStartedEventAttributes = null;
    this.decisionTaskCompletedEventAttributes = null;
    this.decisionTaskTimedOutEventAttributes = null;
    this.decisionTaskFailedEventAttributes = null;
    this.activityTaskScheduledEventAttributes = null;
    this.activityTaskStartedEventAttributes = null;
    this.activityTaskCompletedEventAttributes = null;
    this.activityTaskFailedEventAttributes = null;
    this.activityTaskTimedOutEventAttributes = null;
    this.timerStartedEventAttributes = null;
    this.timerFiredEventAttributes = null;
    this.activityTaskCancelRequestedEventAttributes = null;
    this.requestCancelActivityTaskFailedEventAttributes = null;
    this.activityTaskCanceledEventAttributes = null;
    this.timerCanceledEventAttributes = null;
    this.cancelTimerFailedEventAttributes = null;
    this.markerRecordedEventAttributes = null;
    this.workflowExecutionSignaledEventAttributes = null;
    this.workflowExecutionTerminatedEventAttributes = null;
    this.workflowExecutionCancelRequestedEventAttributes = null;
    this.workflowExecutionCanceledEventAttributes = null;
    this.requestCancelExternalWorkflowExecutionInitiatedEventAttributes = null;
    this.requestCancelExternalWorkflowExecutionFailedEventAttributes = null;
    this.externalWorkflowExecutionCancelRequestedEventAttributes = null;
    this.workflowExecutionContinuedAsNewEventAttributes = null;
    this.startChildWorkflowExecutionInitiatedEventAttributes = null;
    this.startChildWorkflowExecutionFailedEventAttributes = null;
    this.childWorkflowExecutionStartedEventAttributes = null;
    this.childWorkflowExecutionCompletedEventAttributes = null;
    this.childWorkflowExecutionFailedEventAttributes = null;
    this.childWorkflowExecutionCanceledEventAttributes = null;
    this.childWorkflowExecutionTimedOutEventAttributes = null;
    this.childWorkflowExecutionTerminatedEventAttributes = null;
    this.signalExternalWorkflowExecutionInitiatedEventAttributes = null;
    this.signalExternalWorkflowExecutionFailedEventAttributes = null;
    this.externalWorkflowExecutionSignaledEventAttributes = null;
  }

  public long getEventId() {
    return this.eventId;
  }

  public HistoryEvent setEventId(long eventId) {
    this.eventId = eventId;
    setEventIdIsSet(true);
    return this;
  }

  public void unsetEventId() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EVENTID_ISSET_ID);
  }

  /** Returns true if field eventId is set (has been assigned a value) and false otherwise */
  public boolean isSetEventId() {
    return EncodingUtils.testBit(__isset_bitfield, __EVENTID_ISSET_ID);
  }

  public void setEventIdIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EVENTID_ISSET_ID, value);
  }

  public long getTimestamp() {
    return this.timestamp;
  }

  public HistoryEvent setTimestamp(long timestamp) {
    this.timestamp = timestamp;
    setTimestampIsSet(true);
    return this;
  }

  public void unsetTimestamp() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
  }

  /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
  public boolean isSetTimestamp() {
    return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
  }

  public void setTimestampIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
  }

  /**
   * 
   * @see EventType
   */
  public EventType getEventType() {
    return this.eventType;
  }

  /**
   * 
   * @see EventType
   */
  public HistoryEvent setEventType(EventType eventType) {
    this.eventType = eventType;
    return this;
  }

  public void unsetEventType() {
    this.eventType = null;
  }

  /** Returns true if field eventType is set (has been assigned a value) and false otherwise */
  public boolean isSetEventType() {
    return this.eventType != null;
  }

  public void setEventTypeIsSet(boolean value) {
    if (!value) {
      this.eventType = null;
    }
  }

  public long getVersion() {
    return this.version;
  }

  public HistoryEvent setVersion(long version) {
    this.version = version;
    setVersionIsSet(true);
    return this;
  }

  public void unsetVersion() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
  }

  /** Returns true if field version is set (has been assigned a value) and false otherwise */
  public boolean isSetVersion() {
    return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
  }

  public void setVersionIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
  }

  public long getTaskId() {
    return this.taskId;
  }

  public HistoryEvent setTaskId(long taskId) {
    this.taskId = taskId;
    setTaskIdIsSet(true);
    return this;
  }

  public void unsetTaskId() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TASKID_ISSET_ID);
  }

  /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
  public boolean isSetTaskId() {
    return EncodingUtils.testBit(__isset_bitfield, __TASKID_ISSET_ID);
  }

  public void setTaskIdIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TASKID_ISSET_ID, value);
  }

  public WorkflowExecutionStartedEventAttributes getWorkflowExecutionStartedEventAttributes() {
    return this.workflowExecutionStartedEventAttributes;
  }

  public HistoryEvent setWorkflowExecutionStartedEventAttributes(WorkflowExecutionStartedEventAttributes workflowExecutionStartedEventAttributes) {
    this.workflowExecutionStartedEventAttributes = workflowExecutionStartedEventAttributes;
    return this;
  }

  public void unsetWorkflowExecutionStartedEventAttributes() {
    this.workflowExecutionStartedEventAttributes = null;
  }

  /** Returns true if field workflowExecutionStartedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetWorkflowExecutionStartedEventAttributes() {
    return this.workflowExecutionStartedEventAttributes != null;
  }

  public void setWorkflowExecutionStartedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.workflowExecutionStartedEventAttributes = null;
    }
  }

  public WorkflowExecutionCompletedEventAttributes getWorkflowExecutionCompletedEventAttributes() {
    return this.workflowExecutionCompletedEventAttributes;
  }

  public HistoryEvent setWorkflowExecutionCompletedEventAttributes(WorkflowExecutionCompletedEventAttributes workflowExecutionCompletedEventAttributes) {
    this.workflowExecutionCompletedEventAttributes = workflowExecutionCompletedEventAttributes;
    return this;
  }

  public void unsetWorkflowExecutionCompletedEventAttributes() {
    this.workflowExecutionCompletedEventAttributes = null;
  }

  /** Returns true if field workflowExecutionCompletedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetWorkflowExecutionCompletedEventAttributes() {
    return this.workflowExecutionCompletedEventAttributes != null;
  }

  public void setWorkflowExecutionCompletedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.workflowExecutionCompletedEventAttributes = null;
    }
  }

  public WorkflowExecutionFailedEventAttributes getWorkflowExecutionFailedEventAttributes() {
    return this.workflowExecutionFailedEventAttributes;
  }

  public HistoryEvent setWorkflowExecutionFailedEventAttributes(WorkflowExecutionFailedEventAttributes workflowExecutionFailedEventAttributes) {
    this.workflowExecutionFailedEventAttributes = workflowExecutionFailedEventAttributes;
    return this;
  }

  public void unsetWorkflowExecutionFailedEventAttributes() {
    this.workflowExecutionFailedEventAttributes = null;
  }

  /** Returns true if field workflowExecutionFailedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetWorkflowExecutionFailedEventAttributes() {
    return this.workflowExecutionFailedEventAttributes != null;
  }

  public void setWorkflowExecutionFailedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.workflowExecutionFailedEventAttributes = null;
    }
  }

  public WorkflowExecutionTimedOutEventAttributes getWorkflowExecutionTimedOutEventAttributes() {
    return this.workflowExecutionTimedOutEventAttributes;
  }

  public HistoryEvent setWorkflowExecutionTimedOutEventAttributes(WorkflowExecutionTimedOutEventAttributes workflowExecutionTimedOutEventAttributes) {
    this.workflowExecutionTimedOutEventAttributes = workflowExecutionTimedOutEventAttributes;
    return this;
  }

  public void unsetWorkflowExecutionTimedOutEventAttributes() {
    this.workflowExecutionTimedOutEventAttributes = null;
  }

  /** Returns true if field workflowExecutionTimedOutEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetWorkflowExecutionTimedOutEventAttributes() {
    return this.workflowExecutionTimedOutEventAttributes != null;
  }

  public void setWorkflowExecutionTimedOutEventAttributesIsSet(boolean value) {
    if (!value) {
      this.workflowExecutionTimedOutEventAttributes = null;
    }
  }

  public DecisionTaskScheduledEventAttributes getDecisionTaskScheduledEventAttributes() {
    return this.decisionTaskScheduledEventAttributes;
  }

  public HistoryEvent setDecisionTaskScheduledEventAttributes(DecisionTaskScheduledEventAttributes decisionTaskScheduledEventAttributes) {
    this.decisionTaskScheduledEventAttributes = decisionTaskScheduledEventAttributes;
    return this;
  }

  public void unsetDecisionTaskScheduledEventAttributes() {
    this.decisionTaskScheduledEventAttributes = null;
  }

  /** Returns true if field decisionTaskScheduledEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetDecisionTaskScheduledEventAttributes() {
    return this.decisionTaskScheduledEventAttributes != null;
  }

  public void setDecisionTaskScheduledEventAttributesIsSet(boolean value) {
    if (!value) {
      this.decisionTaskScheduledEventAttributes = null;
    }
  }

  public DecisionTaskStartedEventAttributes getDecisionTaskStartedEventAttributes() {
    return this.decisionTaskStartedEventAttributes;
  }

  public HistoryEvent setDecisionTaskStartedEventAttributes(DecisionTaskStartedEventAttributes decisionTaskStartedEventAttributes) {
    this.decisionTaskStartedEventAttributes = decisionTaskStartedEventAttributes;
    return this;
  }

  public void unsetDecisionTaskStartedEventAttributes() {
    this.decisionTaskStartedEventAttributes = null;
  }

  /** Returns true if field decisionTaskStartedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetDecisionTaskStartedEventAttributes() {
    return this.decisionTaskStartedEventAttributes != null;
  }

  public void setDecisionTaskStartedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.decisionTaskStartedEventAttributes = null;
    }
  }

  public DecisionTaskCompletedEventAttributes getDecisionTaskCompletedEventAttributes() {
    return this.decisionTaskCompletedEventAttributes;
  }

  public HistoryEvent setDecisionTaskCompletedEventAttributes(DecisionTaskCompletedEventAttributes decisionTaskCompletedEventAttributes) {
    this.decisionTaskCompletedEventAttributes = decisionTaskCompletedEventAttributes;
    return this;
  }

  public void unsetDecisionTaskCompletedEventAttributes() {
    this.decisionTaskCompletedEventAttributes = null;
  }

  /** Returns true if field decisionTaskCompletedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetDecisionTaskCompletedEventAttributes() {
    return this.decisionTaskCompletedEventAttributes != null;
  }

  public void setDecisionTaskCompletedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.decisionTaskCompletedEventAttributes = null;
    }
  }

  public DecisionTaskTimedOutEventAttributes getDecisionTaskTimedOutEventAttributes() {
    return this.decisionTaskTimedOutEventAttributes;
  }

  public HistoryEvent setDecisionTaskTimedOutEventAttributes(DecisionTaskTimedOutEventAttributes decisionTaskTimedOutEventAttributes) {
    this.decisionTaskTimedOutEventAttributes = decisionTaskTimedOutEventAttributes;
    return this;
  }

  public void unsetDecisionTaskTimedOutEventAttributes() {
    this.decisionTaskTimedOutEventAttributes = null;
  }

  /** Returns true if field decisionTaskTimedOutEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetDecisionTaskTimedOutEventAttributes() {
    return this.decisionTaskTimedOutEventAttributes != null;
  }

  public void setDecisionTaskTimedOutEventAttributesIsSet(boolean value) {
    if (!value) {
      this.decisionTaskTimedOutEventAttributes = null;
    }
  }

  public DecisionTaskFailedEventAttributes getDecisionTaskFailedEventAttributes() {
    return this.decisionTaskFailedEventAttributes;
  }

  public HistoryEvent setDecisionTaskFailedEventAttributes(DecisionTaskFailedEventAttributes decisionTaskFailedEventAttributes) {
    this.decisionTaskFailedEventAttributes = decisionTaskFailedEventAttributes;
    return this;
  }

  public void unsetDecisionTaskFailedEventAttributes() {
    this.decisionTaskFailedEventAttributes = null;
  }

  /** Returns true if field decisionTaskFailedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetDecisionTaskFailedEventAttributes() {
    return this.decisionTaskFailedEventAttributes != null;
  }

  public void setDecisionTaskFailedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.decisionTaskFailedEventAttributes = null;
    }
  }

  public ActivityTaskScheduledEventAttributes getActivityTaskScheduledEventAttributes() {
    return this.activityTaskScheduledEventAttributes;
  }

  public HistoryEvent setActivityTaskScheduledEventAttributes(ActivityTaskScheduledEventAttributes activityTaskScheduledEventAttributes) {
    this.activityTaskScheduledEventAttributes = activityTaskScheduledEventAttributes;
    return this;
  }

  public void unsetActivityTaskScheduledEventAttributes() {
    this.activityTaskScheduledEventAttributes = null;
  }

  /** Returns true if field activityTaskScheduledEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetActivityTaskScheduledEventAttributes() {
    return this.activityTaskScheduledEventAttributes != null;
  }

  public void setActivityTaskScheduledEventAttributesIsSet(boolean value) {
    if (!value) {
      this.activityTaskScheduledEventAttributes = null;
    }
  }

  public ActivityTaskStartedEventAttributes getActivityTaskStartedEventAttributes() {
    return this.activityTaskStartedEventAttributes;
  }

  public HistoryEvent setActivityTaskStartedEventAttributes(ActivityTaskStartedEventAttributes activityTaskStartedEventAttributes) {
    this.activityTaskStartedEventAttributes = activityTaskStartedEventAttributes;
    return this;
  }

  public void unsetActivityTaskStartedEventAttributes() {
    this.activityTaskStartedEventAttributes = null;
  }

  /** Returns true if field activityTaskStartedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetActivityTaskStartedEventAttributes() {
    return this.activityTaskStartedEventAttributes != null;
  }

  public void setActivityTaskStartedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.activityTaskStartedEventAttributes = null;
    }
  }

  public ActivityTaskCompletedEventAttributes getActivityTaskCompletedEventAttributes() {
    return this.activityTaskCompletedEventAttributes;
  }

  public HistoryEvent setActivityTaskCompletedEventAttributes(ActivityTaskCompletedEventAttributes activityTaskCompletedEventAttributes) {
    this.activityTaskCompletedEventAttributes = activityTaskCompletedEventAttributes;
    return this;
  }

  public void unsetActivityTaskCompletedEventAttributes() {
    this.activityTaskCompletedEventAttributes = null;
  }

  /** Returns true if field activityTaskCompletedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetActivityTaskCompletedEventAttributes() {
    return this.activityTaskCompletedEventAttributes != null;
  }

  public void setActivityTaskCompletedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.activityTaskCompletedEventAttributes = null;
    }
  }

  public ActivityTaskFailedEventAttributes getActivityTaskFailedEventAttributes() {
    return this.activityTaskFailedEventAttributes;
  }

  public HistoryEvent setActivityTaskFailedEventAttributes(ActivityTaskFailedEventAttributes activityTaskFailedEventAttributes) {
    this.activityTaskFailedEventAttributes = activityTaskFailedEventAttributes;
    return this;
  }

  public void unsetActivityTaskFailedEventAttributes() {
    this.activityTaskFailedEventAttributes = null;
  }

  /** Returns true if field activityTaskFailedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetActivityTaskFailedEventAttributes() {
    return this.activityTaskFailedEventAttributes != null;
  }

  public void setActivityTaskFailedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.activityTaskFailedEventAttributes = null;
    }
  }

  public ActivityTaskTimedOutEventAttributes getActivityTaskTimedOutEventAttributes() {
    return this.activityTaskTimedOutEventAttributes;
  }

  public HistoryEvent setActivityTaskTimedOutEventAttributes(ActivityTaskTimedOutEventAttributes activityTaskTimedOutEventAttributes) {
    this.activityTaskTimedOutEventAttributes = activityTaskTimedOutEventAttributes;
    return this;
  }

  public void unsetActivityTaskTimedOutEventAttributes() {
    this.activityTaskTimedOutEventAttributes = null;
  }

  /** Returns true if field activityTaskTimedOutEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetActivityTaskTimedOutEventAttributes() {
    return this.activityTaskTimedOutEventAttributes != null;
  }

  public void setActivityTaskTimedOutEventAttributesIsSet(boolean value) {
    if (!value) {
      this.activityTaskTimedOutEventAttributes = null;
    }
  }

  public TimerStartedEventAttributes getTimerStartedEventAttributes() {
    return this.timerStartedEventAttributes;
  }

  public HistoryEvent setTimerStartedEventAttributes(TimerStartedEventAttributes timerStartedEventAttributes) {
    this.timerStartedEventAttributes = timerStartedEventAttributes;
    return this;
  }

  public void unsetTimerStartedEventAttributes() {
    this.timerStartedEventAttributes = null;
  }

  /** Returns true if field timerStartedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetTimerStartedEventAttributes() {
    return this.timerStartedEventAttributes != null;
  }

  public void setTimerStartedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.timerStartedEventAttributes = null;
    }
  }

  public TimerFiredEventAttributes getTimerFiredEventAttributes() {
    return this.timerFiredEventAttributes;
  }

  public HistoryEvent setTimerFiredEventAttributes(TimerFiredEventAttributes timerFiredEventAttributes) {
    this.timerFiredEventAttributes = timerFiredEventAttributes;
    return this;
  }

  public void unsetTimerFiredEventAttributes() {
    this.timerFiredEventAttributes = null;
  }

  /** Returns true if field timerFiredEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetTimerFiredEventAttributes() {
    return this.timerFiredEventAttributes != null;
  }

  public void setTimerFiredEventAttributesIsSet(boolean value) {
    if (!value) {
      this.timerFiredEventAttributes = null;
    }
  }

  public ActivityTaskCancelRequestedEventAttributes getActivityTaskCancelRequestedEventAttributes() {
    return this.activityTaskCancelRequestedEventAttributes;
  }

  public HistoryEvent setActivityTaskCancelRequestedEventAttributes(ActivityTaskCancelRequestedEventAttributes activityTaskCancelRequestedEventAttributes) {
    this.activityTaskCancelRequestedEventAttributes = activityTaskCancelRequestedEventAttributes;
    return this;
  }

  public void unsetActivityTaskCancelRequestedEventAttributes() {
    this.activityTaskCancelRequestedEventAttributes = null;
  }

  /** Returns true if field activityTaskCancelRequestedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetActivityTaskCancelRequestedEventAttributes() {
    return this.activityTaskCancelRequestedEventAttributes != null;
  }

  public void setActivityTaskCancelRequestedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.activityTaskCancelRequestedEventAttributes = null;
    }
  }

  public RequestCancelActivityTaskFailedEventAttributes getRequestCancelActivityTaskFailedEventAttributes() {
    return this.requestCancelActivityTaskFailedEventAttributes;
  }

  public HistoryEvent setRequestCancelActivityTaskFailedEventAttributes(RequestCancelActivityTaskFailedEventAttributes requestCancelActivityTaskFailedEventAttributes) {
    this.requestCancelActivityTaskFailedEventAttributes = requestCancelActivityTaskFailedEventAttributes;
    return this;
  }

  public void unsetRequestCancelActivityTaskFailedEventAttributes() {
    this.requestCancelActivityTaskFailedEventAttributes = null;
  }

  /** Returns true if field requestCancelActivityTaskFailedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetRequestCancelActivityTaskFailedEventAttributes() {
    return this.requestCancelActivityTaskFailedEventAttributes != null;
  }

  public void setRequestCancelActivityTaskFailedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.requestCancelActivityTaskFailedEventAttributes = null;
    }
  }

  public ActivityTaskCanceledEventAttributes getActivityTaskCanceledEventAttributes() {
    return this.activityTaskCanceledEventAttributes;
  }

  public HistoryEvent setActivityTaskCanceledEventAttributes(ActivityTaskCanceledEventAttributes activityTaskCanceledEventAttributes) {
    this.activityTaskCanceledEventAttributes = activityTaskCanceledEventAttributes;
    return this;
  }

  public void unsetActivityTaskCanceledEventAttributes() {
    this.activityTaskCanceledEventAttributes = null;
  }

  /** Returns true if field activityTaskCanceledEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetActivityTaskCanceledEventAttributes() {
    return this.activityTaskCanceledEventAttributes != null;
  }

  public void setActivityTaskCanceledEventAttributesIsSet(boolean value) {
    if (!value) {
      this.activityTaskCanceledEventAttributes = null;
    }
  }

  public TimerCanceledEventAttributes getTimerCanceledEventAttributes() {
    return this.timerCanceledEventAttributes;
  }

  public HistoryEvent setTimerCanceledEventAttributes(TimerCanceledEventAttributes timerCanceledEventAttributes) {
    this.timerCanceledEventAttributes = timerCanceledEventAttributes;
    return this;
  }

  public void unsetTimerCanceledEventAttributes() {
    this.timerCanceledEventAttributes = null;
  }

  /** Returns true if field timerCanceledEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetTimerCanceledEventAttributes() {
    return this.timerCanceledEventAttributes != null;
  }

  public void setTimerCanceledEventAttributesIsSet(boolean value) {
    if (!value) {
      this.timerCanceledEventAttributes = null;
    }
  }

  public CancelTimerFailedEventAttributes getCancelTimerFailedEventAttributes() {
    return this.cancelTimerFailedEventAttributes;
  }

  public HistoryEvent setCancelTimerFailedEventAttributes(CancelTimerFailedEventAttributes cancelTimerFailedEventAttributes) {
    this.cancelTimerFailedEventAttributes = cancelTimerFailedEventAttributes;
    return this;
  }

  public void unsetCancelTimerFailedEventAttributes() {
    this.cancelTimerFailedEventAttributes = null;
  }

  /** Returns true if field cancelTimerFailedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetCancelTimerFailedEventAttributes() {
    return this.cancelTimerFailedEventAttributes != null;
  }

  public void setCancelTimerFailedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.cancelTimerFailedEventAttributes = null;
    }
  }

  public MarkerRecordedEventAttributes getMarkerRecordedEventAttributes() {
    return this.markerRecordedEventAttributes;
  }

  public HistoryEvent setMarkerRecordedEventAttributes(MarkerRecordedEventAttributes markerRecordedEventAttributes) {
    this.markerRecordedEventAttributes = markerRecordedEventAttributes;
    return this;
  }

  public void unsetMarkerRecordedEventAttributes() {
    this.markerRecordedEventAttributes = null;
  }

  /** Returns true if field markerRecordedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetMarkerRecordedEventAttributes() {
    return this.markerRecordedEventAttributes != null;
  }

  public void setMarkerRecordedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.markerRecordedEventAttributes = null;
    }
  }

  public WorkflowExecutionSignaledEventAttributes getWorkflowExecutionSignaledEventAttributes() {
    return this.workflowExecutionSignaledEventAttributes;
  }

  public HistoryEvent setWorkflowExecutionSignaledEventAttributes(WorkflowExecutionSignaledEventAttributes workflowExecutionSignaledEventAttributes) {
    this.workflowExecutionSignaledEventAttributes = workflowExecutionSignaledEventAttributes;
    return this;
  }

  public void unsetWorkflowExecutionSignaledEventAttributes() {
    this.workflowExecutionSignaledEventAttributes = null;
  }

  /** Returns true if field workflowExecutionSignaledEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetWorkflowExecutionSignaledEventAttributes() {
    return this.workflowExecutionSignaledEventAttributes != null;
  }

  public void setWorkflowExecutionSignaledEventAttributesIsSet(boolean value) {
    if (!value) {
      this.workflowExecutionSignaledEventAttributes = null;
    }
  }

  public WorkflowExecutionTerminatedEventAttributes getWorkflowExecutionTerminatedEventAttributes() {
    return this.workflowExecutionTerminatedEventAttributes;
  }

  public HistoryEvent setWorkflowExecutionTerminatedEventAttributes(WorkflowExecutionTerminatedEventAttributes workflowExecutionTerminatedEventAttributes) {
    this.workflowExecutionTerminatedEventAttributes = workflowExecutionTerminatedEventAttributes;
    return this;
  }

  public void unsetWorkflowExecutionTerminatedEventAttributes() {
    this.workflowExecutionTerminatedEventAttributes = null;
  }

  /** Returns true if field workflowExecutionTerminatedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetWorkflowExecutionTerminatedEventAttributes() {
    return this.workflowExecutionTerminatedEventAttributes != null;
  }

  public void setWorkflowExecutionTerminatedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.workflowExecutionTerminatedEventAttributes = null;
    }
  }

  public WorkflowExecutionCancelRequestedEventAttributes getWorkflowExecutionCancelRequestedEventAttributes() {
    return this.workflowExecutionCancelRequestedEventAttributes;
  }

  public HistoryEvent setWorkflowExecutionCancelRequestedEventAttributes(WorkflowExecutionCancelRequestedEventAttributes workflowExecutionCancelRequestedEventAttributes) {
    this.workflowExecutionCancelRequestedEventAttributes = workflowExecutionCancelRequestedEventAttributes;
    return this;
  }

  public void unsetWorkflowExecutionCancelRequestedEventAttributes() {
    this.workflowExecutionCancelRequestedEventAttributes = null;
  }

  /** Returns true if field workflowExecutionCancelRequestedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetWorkflowExecutionCancelRequestedEventAttributes() {
    return this.workflowExecutionCancelRequestedEventAttributes != null;
  }

  public void setWorkflowExecutionCancelRequestedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.workflowExecutionCancelRequestedEventAttributes = null;
    }
  }

  public WorkflowExecutionCanceledEventAttributes getWorkflowExecutionCanceledEventAttributes() {
    return this.workflowExecutionCanceledEventAttributes;
  }

  public HistoryEvent setWorkflowExecutionCanceledEventAttributes(WorkflowExecutionCanceledEventAttributes workflowExecutionCanceledEventAttributes) {
    this.workflowExecutionCanceledEventAttributes = workflowExecutionCanceledEventAttributes;
    return this;
  }

  public void unsetWorkflowExecutionCanceledEventAttributes() {
    this.workflowExecutionCanceledEventAttributes = null;
  }

  /** Returns true if field workflowExecutionCanceledEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetWorkflowExecutionCanceledEventAttributes() {
    return this.workflowExecutionCanceledEventAttributes != null;
  }

  public void setWorkflowExecutionCanceledEventAttributesIsSet(boolean value) {
    if (!value) {
      this.workflowExecutionCanceledEventAttributes = null;
    }
  }

  public RequestCancelExternalWorkflowExecutionInitiatedEventAttributes getRequestCancelExternalWorkflowExecutionInitiatedEventAttributes() {
    return this.requestCancelExternalWorkflowExecutionInitiatedEventAttributes;
  }

  public HistoryEvent setRequestCancelExternalWorkflowExecutionInitiatedEventAttributes(RequestCancelExternalWorkflowExecutionInitiatedEventAttributes requestCancelExternalWorkflowExecutionInitiatedEventAttributes) {
    this.requestCancelExternalWorkflowExecutionInitiatedEventAttributes = requestCancelExternalWorkflowExecutionInitiatedEventAttributes;
    return this;
  }

  public void unsetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes() {
    this.requestCancelExternalWorkflowExecutionInitiatedEventAttributes = null;
  }

  /** Returns true if field requestCancelExternalWorkflowExecutionInitiatedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes() {
    return this.requestCancelExternalWorkflowExecutionInitiatedEventAttributes != null;
  }

  public void setRequestCancelExternalWorkflowExecutionInitiatedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.requestCancelExternalWorkflowExecutionInitiatedEventAttributes = null;
    }
  }

  public RequestCancelExternalWorkflowExecutionFailedEventAttributes getRequestCancelExternalWorkflowExecutionFailedEventAttributes() {
    return this.requestCancelExternalWorkflowExecutionFailedEventAttributes;
  }

  public HistoryEvent setRequestCancelExternalWorkflowExecutionFailedEventAttributes(RequestCancelExternalWorkflowExecutionFailedEventAttributes requestCancelExternalWorkflowExecutionFailedEventAttributes) {
    this.requestCancelExternalWorkflowExecutionFailedEventAttributes = requestCancelExternalWorkflowExecutionFailedEventAttributes;
    return this;
  }

  public void unsetRequestCancelExternalWorkflowExecutionFailedEventAttributes() {
    this.requestCancelExternalWorkflowExecutionFailedEventAttributes = null;
  }

  /** Returns true if field requestCancelExternalWorkflowExecutionFailedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetRequestCancelExternalWorkflowExecutionFailedEventAttributes() {
    return this.requestCancelExternalWorkflowExecutionFailedEventAttributes != null;
  }

  public void setRequestCancelExternalWorkflowExecutionFailedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.requestCancelExternalWorkflowExecutionFailedEventAttributes = null;
    }
  }

  public ExternalWorkflowExecutionCancelRequestedEventAttributes getExternalWorkflowExecutionCancelRequestedEventAttributes() {
    return this.externalWorkflowExecutionCancelRequestedEventAttributes;
  }

  public HistoryEvent setExternalWorkflowExecutionCancelRequestedEventAttributes(ExternalWorkflowExecutionCancelRequestedEventAttributes externalWorkflowExecutionCancelRequestedEventAttributes) {
    this.externalWorkflowExecutionCancelRequestedEventAttributes = externalWorkflowExecutionCancelRequestedEventAttributes;
    return this;
  }

  public void unsetExternalWorkflowExecutionCancelRequestedEventAttributes() {
    this.externalWorkflowExecutionCancelRequestedEventAttributes = null;
  }

  /** Returns true if field externalWorkflowExecutionCancelRequestedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetExternalWorkflowExecutionCancelRequestedEventAttributes() {
    return this.externalWorkflowExecutionCancelRequestedEventAttributes != null;
  }

  public void setExternalWorkflowExecutionCancelRequestedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.externalWorkflowExecutionCancelRequestedEventAttributes = null;
    }
  }

  public WorkflowExecutionContinuedAsNewEventAttributes getWorkflowExecutionContinuedAsNewEventAttributes() {
    return this.workflowExecutionContinuedAsNewEventAttributes;
  }

  public HistoryEvent setWorkflowExecutionContinuedAsNewEventAttributes(WorkflowExecutionContinuedAsNewEventAttributes workflowExecutionContinuedAsNewEventAttributes) {
    this.workflowExecutionContinuedAsNewEventAttributes = workflowExecutionContinuedAsNewEventAttributes;
    return this;
  }

  public void unsetWorkflowExecutionContinuedAsNewEventAttributes() {
    this.workflowExecutionContinuedAsNewEventAttributes = null;
  }

  /** Returns true if field workflowExecutionContinuedAsNewEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetWorkflowExecutionContinuedAsNewEventAttributes() {
    return this.workflowExecutionContinuedAsNewEventAttributes != null;
  }

  public void setWorkflowExecutionContinuedAsNewEventAttributesIsSet(boolean value) {
    if (!value) {
      this.workflowExecutionContinuedAsNewEventAttributes = null;
    }
  }

  public StartChildWorkflowExecutionInitiatedEventAttributes getStartChildWorkflowExecutionInitiatedEventAttributes() {
    return this.startChildWorkflowExecutionInitiatedEventAttributes;
  }

  public HistoryEvent setStartChildWorkflowExecutionInitiatedEventAttributes(StartChildWorkflowExecutionInitiatedEventAttributes startChildWorkflowExecutionInitiatedEventAttributes) {
    this.startChildWorkflowExecutionInitiatedEventAttributes = startChildWorkflowExecutionInitiatedEventAttributes;
    return this;
  }

  public void unsetStartChildWorkflowExecutionInitiatedEventAttributes() {
    this.startChildWorkflowExecutionInitiatedEventAttributes = null;
  }

  /** Returns true if field startChildWorkflowExecutionInitiatedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetStartChildWorkflowExecutionInitiatedEventAttributes() {
    return this.startChildWorkflowExecutionInitiatedEventAttributes != null;
  }

  public void setStartChildWorkflowExecutionInitiatedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.startChildWorkflowExecutionInitiatedEventAttributes = null;
    }
  }

  public StartChildWorkflowExecutionFailedEventAttributes getStartChildWorkflowExecutionFailedEventAttributes() {
    return this.startChildWorkflowExecutionFailedEventAttributes;
  }

  public HistoryEvent setStartChildWorkflowExecutionFailedEventAttributes(StartChildWorkflowExecutionFailedEventAttributes startChildWorkflowExecutionFailedEventAttributes) {
    this.startChildWorkflowExecutionFailedEventAttributes = startChildWorkflowExecutionFailedEventAttributes;
    return this;
  }

  public void unsetStartChildWorkflowExecutionFailedEventAttributes() {
    this.startChildWorkflowExecutionFailedEventAttributes = null;
  }

  /** Returns true if field startChildWorkflowExecutionFailedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetStartChildWorkflowExecutionFailedEventAttributes() {
    return this.startChildWorkflowExecutionFailedEventAttributes != null;
  }

  public void setStartChildWorkflowExecutionFailedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.startChildWorkflowExecutionFailedEventAttributes = null;
    }
  }

  public ChildWorkflowExecutionStartedEventAttributes getChildWorkflowExecutionStartedEventAttributes() {
    return this.childWorkflowExecutionStartedEventAttributes;
  }

  public HistoryEvent setChildWorkflowExecutionStartedEventAttributes(ChildWorkflowExecutionStartedEventAttributes childWorkflowExecutionStartedEventAttributes) {
    this.childWorkflowExecutionStartedEventAttributes = childWorkflowExecutionStartedEventAttributes;
    return this;
  }

  public void unsetChildWorkflowExecutionStartedEventAttributes() {
    this.childWorkflowExecutionStartedEventAttributes = null;
  }

  /** Returns true if field childWorkflowExecutionStartedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetChildWorkflowExecutionStartedEventAttributes() {
    return this.childWorkflowExecutionStartedEventAttributes != null;
  }

  public void setChildWorkflowExecutionStartedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.childWorkflowExecutionStartedEventAttributes = null;
    }
  }

  public ChildWorkflowExecutionCompletedEventAttributes getChildWorkflowExecutionCompletedEventAttributes() {
    return this.childWorkflowExecutionCompletedEventAttributes;
  }

  public HistoryEvent setChildWorkflowExecutionCompletedEventAttributes(ChildWorkflowExecutionCompletedEventAttributes childWorkflowExecutionCompletedEventAttributes) {
    this.childWorkflowExecutionCompletedEventAttributes = childWorkflowExecutionCompletedEventAttributes;
    return this;
  }

  public void unsetChildWorkflowExecutionCompletedEventAttributes() {
    this.childWorkflowExecutionCompletedEventAttributes = null;
  }

  /** Returns true if field childWorkflowExecutionCompletedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetChildWorkflowExecutionCompletedEventAttributes() {
    return this.childWorkflowExecutionCompletedEventAttributes != null;
  }

  public void setChildWorkflowExecutionCompletedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.childWorkflowExecutionCompletedEventAttributes = null;
    }
  }

  public ChildWorkflowExecutionFailedEventAttributes getChildWorkflowExecutionFailedEventAttributes() {
    return this.childWorkflowExecutionFailedEventAttributes;
  }

  public HistoryEvent setChildWorkflowExecutionFailedEventAttributes(ChildWorkflowExecutionFailedEventAttributes childWorkflowExecutionFailedEventAttributes) {
    this.childWorkflowExecutionFailedEventAttributes = childWorkflowExecutionFailedEventAttributes;
    return this;
  }

  public void unsetChildWorkflowExecutionFailedEventAttributes() {
    this.childWorkflowExecutionFailedEventAttributes = null;
  }

  /** Returns true if field childWorkflowExecutionFailedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetChildWorkflowExecutionFailedEventAttributes() {
    return this.childWorkflowExecutionFailedEventAttributes != null;
  }

  public void setChildWorkflowExecutionFailedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.childWorkflowExecutionFailedEventAttributes = null;
    }
  }

  public ChildWorkflowExecutionCanceledEventAttributes getChildWorkflowExecutionCanceledEventAttributes() {
    return this.childWorkflowExecutionCanceledEventAttributes;
  }

  public HistoryEvent setChildWorkflowExecutionCanceledEventAttributes(ChildWorkflowExecutionCanceledEventAttributes childWorkflowExecutionCanceledEventAttributes) {
    this.childWorkflowExecutionCanceledEventAttributes = childWorkflowExecutionCanceledEventAttributes;
    return this;
  }

  public void unsetChildWorkflowExecutionCanceledEventAttributes() {
    this.childWorkflowExecutionCanceledEventAttributes = null;
  }

  /** Returns true if field childWorkflowExecutionCanceledEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetChildWorkflowExecutionCanceledEventAttributes() {
    return this.childWorkflowExecutionCanceledEventAttributes != null;
  }

  public void setChildWorkflowExecutionCanceledEventAttributesIsSet(boolean value) {
    if (!value) {
      this.childWorkflowExecutionCanceledEventAttributes = null;
    }
  }

  public ChildWorkflowExecutionTimedOutEventAttributes getChildWorkflowExecutionTimedOutEventAttributes() {
    return this.childWorkflowExecutionTimedOutEventAttributes;
  }

  public HistoryEvent setChildWorkflowExecutionTimedOutEventAttributes(ChildWorkflowExecutionTimedOutEventAttributes childWorkflowExecutionTimedOutEventAttributes) {
    this.childWorkflowExecutionTimedOutEventAttributes = childWorkflowExecutionTimedOutEventAttributes;
    return this;
  }

  public void unsetChildWorkflowExecutionTimedOutEventAttributes() {
    this.childWorkflowExecutionTimedOutEventAttributes = null;
  }

  /** Returns true if field childWorkflowExecutionTimedOutEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetChildWorkflowExecutionTimedOutEventAttributes() {
    return this.childWorkflowExecutionTimedOutEventAttributes != null;
  }

  public void setChildWorkflowExecutionTimedOutEventAttributesIsSet(boolean value) {
    if (!value) {
      this.childWorkflowExecutionTimedOutEventAttributes = null;
    }
  }

  public ChildWorkflowExecutionTerminatedEventAttributes getChildWorkflowExecutionTerminatedEventAttributes() {
    return this.childWorkflowExecutionTerminatedEventAttributes;
  }

  public HistoryEvent setChildWorkflowExecutionTerminatedEventAttributes(ChildWorkflowExecutionTerminatedEventAttributes childWorkflowExecutionTerminatedEventAttributes) {
    this.childWorkflowExecutionTerminatedEventAttributes = childWorkflowExecutionTerminatedEventAttributes;
    return this;
  }

  public void unsetChildWorkflowExecutionTerminatedEventAttributes() {
    this.childWorkflowExecutionTerminatedEventAttributes = null;
  }

  /** Returns true if field childWorkflowExecutionTerminatedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetChildWorkflowExecutionTerminatedEventAttributes() {
    return this.childWorkflowExecutionTerminatedEventAttributes != null;
  }

  public void setChildWorkflowExecutionTerminatedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.childWorkflowExecutionTerminatedEventAttributes = null;
    }
  }

  public SignalExternalWorkflowExecutionInitiatedEventAttributes getSignalExternalWorkflowExecutionInitiatedEventAttributes() {
    return this.signalExternalWorkflowExecutionInitiatedEventAttributes;
  }

  public HistoryEvent setSignalExternalWorkflowExecutionInitiatedEventAttributes(SignalExternalWorkflowExecutionInitiatedEventAttributes signalExternalWorkflowExecutionInitiatedEventAttributes) {
    this.signalExternalWorkflowExecutionInitiatedEventAttributes = signalExternalWorkflowExecutionInitiatedEventAttributes;
    return this;
  }

  public void unsetSignalExternalWorkflowExecutionInitiatedEventAttributes() {
    this.signalExternalWorkflowExecutionInitiatedEventAttributes = null;
  }

  /** Returns true if field signalExternalWorkflowExecutionInitiatedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetSignalExternalWorkflowExecutionInitiatedEventAttributes() {
    return this.signalExternalWorkflowExecutionInitiatedEventAttributes != null;
  }

  public void setSignalExternalWorkflowExecutionInitiatedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.signalExternalWorkflowExecutionInitiatedEventAttributes = null;
    }
  }

  public SignalExternalWorkflowExecutionFailedEventAttributes getSignalExternalWorkflowExecutionFailedEventAttributes() {
    return this.signalExternalWorkflowExecutionFailedEventAttributes;
  }

  public HistoryEvent setSignalExternalWorkflowExecutionFailedEventAttributes(SignalExternalWorkflowExecutionFailedEventAttributes signalExternalWorkflowExecutionFailedEventAttributes) {
    this.signalExternalWorkflowExecutionFailedEventAttributes = signalExternalWorkflowExecutionFailedEventAttributes;
    return this;
  }

  public void unsetSignalExternalWorkflowExecutionFailedEventAttributes() {
    this.signalExternalWorkflowExecutionFailedEventAttributes = null;
  }

  /** Returns true if field signalExternalWorkflowExecutionFailedEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetSignalExternalWorkflowExecutionFailedEventAttributes() {
    return this.signalExternalWorkflowExecutionFailedEventAttributes != null;
  }

  public void setSignalExternalWorkflowExecutionFailedEventAttributesIsSet(boolean value) {
    if (!value) {
      this.signalExternalWorkflowExecutionFailedEventAttributes = null;
    }
  }

  public ExternalWorkflowExecutionSignaledEventAttributes getExternalWorkflowExecutionSignaledEventAttributes() {
    return this.externalWorkflowExecutionSignaledEventAttributes;
  }

  public HistoryEvent setExternalWorkflowExecutionSignaledEventAttributes(ExternalWorkflowExecutionSignaledEventAttributes externalWorkflowExecutionSignaledEventAttributes) {
    this.externalWorkflowExecutionSignaledEventAttributes = externalWorkflowExecutionSignaledEventAttributes;
    return this;
  }

  public void unsetExternalWorkflowExecutionSignaledEventAttributes() {
    this.externalWorkflowExecutionSignaledEventAttributes = null;
  }

  /** Returns true if field externalWorkflowExecutionSignaledEventAttributes is set (has been assigned a value) and false otherwise */
  public boolean isSetExternalWorkflowExecutionSignaledEventAttributes() {
    return this.externalWorkflowExecutionSignaledEventAttributes != null;
  }

  public void setExternalWorkflowExecutionSignaledEventAttributesIsSet(boolean value) {
    if (!value) {
      this.externalWorkflowExecutionSignaledEventAttributes = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case EVENT_ID:
      if (value == null) {
        unsetEventId();
      } else {
        setEventId((Long)value);
      }
      break;

    case TIMESTAMP:
      if (value == null) {
        unsetTimestamp();
      } else {
        setTimestamp((Long)value);
      }
      break;

    case EVENT_TYPE:
      if (value == null) {
        unsetEventType();
      } else {
        setEventType((EventType)value);
      }
      break;

    case VERSION:
      if (value == null) {
        unsetVersion();
      } else {
        setVersion((Long)value);
      }
      break;

    case TASK_ID:
      if (value == null) {
        unsetTaskId();
      } else {
        setTaskId((Long)value);
      }
      break;

    case WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetWorkflowExecutionStartedEventAttributes();
      } else {
        setWorkflowExecutionStartedEventAttributes((WorkflowExecutionStartedEventAttributes)value);
      }
      break;

    case WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetWorkflowExecutionCompletedEventAttributes();
      } else {
        setWorkflowExecutionCompletedEventAttributes((WorkflowExecutionCompletedEventAttributes)value);
      }
      break;

    case WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetWorkflowExecutionFailedEventAttributes();
      } else {
        setWorkflowExecutionFailedEventAttributes((WorkflowExecutionFailedEventAttributes)value);
      }
      break;

    case WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetWorkflowExecutionTimedOutEventAttributes();
      } else {
        setWorkflowExecutionTimedOutEventAttributes((WorkflowExecutionTimedOutEventAttributes)value);
      }
      break;

    case DECISION_TASK_SCHEDULED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetDecisionTaskScheduledEventAttributes();
      } else {
        setDecisionTaskScheduledEventAttributes((DecisionTaskScheduledEventAttributes)value);
      }
      break;

    case DECISION_TASK_STARTED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetDecisionTaskStartedEventAttributes();
      } else {
        setDecisionTaskStartedEventAttributes((DecisionTaskStartedEventAttributes)value);
      }
      break;

    case DECISION_TASK_COMPLETED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetDecisionTaskCompletedEventAttributes();
      } else {
        setDecisionTaskCompletedEventAttributes((DecisionTaskCompletedEventAttributes)value);
      }
      break;

    case DECISION_TASK_TIMED_OUT_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetDecisionTaskTimedOutEventAttributes();
      } else {
        setDecisionTaskTimedOutEventAttributes((DecisionTaskTimedOutEventAttributes)value);
      }
      break;

    case DECISION_TASK_FAILED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetDecisionTaskFailedEventAttributes();
      } else {
        setDecisionTaskFailedEventAttributes((DecisionTaskFailedEventAttributes)value);
      }
      break;

    case ACTIVITY_TASK_SCHEDULED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetActivityTaskScheduledEventAttributes();
      } else {
        setActivityTaskScheduledEventAttributes((ActivityTaskScheduledEventAttributes)value);
      }
      break;

    case ACTIVITY_TASK_STARTED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetActivityTaskStartedEventAttributes();
      } else {
        setActivityTaskStartedEventAttributes((ActivityTaskStartedEventAttributes)value);
      }
      break;

    case ACTIVITY_TASK_COMPLETED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetActivityTaskCompletedEventAttributes();
      } else {
        setActivityTaskCompletedEventAttributes((ActivityTaskCompletedEventAttributes)value);
      }
      break;

    case ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetActivityTaskFailedEventAttributes();
      } else {
        setActivityTaskFailedEventAttributes((ActivityTaskFailedEventAttributes)value);
      }
      break;

    case ACTIVITY_TASK_TIMED_OUT_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetActivityTaskTimedOutEventAttributes();
      } else {
        setActivityTaskTimedOutEventAttributes((ActivityTaskTimedOutEventAttributes)value);
      }
      break;

    case TIMER_STARTED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetTimerStartedEventAttributes();
      } else {
        setTimerStartedEventAttributes((TimerStartedEventAttributes)value);
      }
      break;

    case TIMER_FIRED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetTimerFiredEventAttributes();
      } else {
        setTimerFiredEventAttributes((TimerFiredEventAttributes)value);
      }
      break;

    case ACTIVITY_TASK_CANCEL_REQUESTED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetActivityTaskCancelRequestedEventAttributes();
      } else {
        setActivityTaskCancelRequestedEventAttributes((ActivityTaskCancelRequestedEventAttributes)value);
      }
      break;

    case REQUEST_CANCEL_ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetRequestCancelActivityTaskFailedEventAttributes();
      } else {
        setRequestCancelActivityTaskFailedEventAttributes((RequestCancelActivityTaskFailedEventAttributes)value);
      }
      break;

    case ACTIVITY_TASK_CANCELED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetActivityTaskCanceledEventAttributes();
      } else {
        setActivityTaskCanceledEventAttributes((ActivityTaskCanceledEventAttributes)value);
      }
      break;

    case TIMER_CANCELED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetTimerCanceledEventAttributes();
      } else {
        setTimerCanceledEventAttributes((TimerCanceledEventAttributes)value);
      }
      break;

    case CANCEL_TIMER_FAILED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetCancelTimerFailedEventAttributes();
      } else {
        setCancelTimerFailedEventAttributes((CancelTimerFailedEventAttributes)value);
      }
      break;

    case MARKER_RECORDED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetMarkerRecordedEventAttributes();
      } else {
        setMarkerRecordedEventAttributes((MarkerRecordedEventAttributes)value);
      }
      break;

    case WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetWorkflowExecutionSignaledEventAttributes();
      } else {
        setWorkflowExecutionSignaledEventAttributes((WorkflowExecutionSignaledEventAttributes)value);
      }
      break;

    case WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetWorkflowExecutionTerminatedEventAttributes();
      } else {
        setWorkflowExecutionTerminatedEventAttributes((WorkflowExecutionTerminatedEventAttributes)value);
      }
      break;

    case WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetWorkflowExecutionCancelRequestedEventAttributes();
      } else {
        setWorkflowExecutionCancelRequestedEventAttributes((WorkflowExecutionCancelRequestedEventAttributes)value);
      }
      break;

    case WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetWorkflowExecutionCanceledEventAttributes();
      } else {
        setWorkflowExecutionCanceledEventAttributes((WorkflowExecutionCanceledEventAttributes)value);
      }
      break;

    case REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes();
      } else {
        setRequestCancelExternalWorkflowExecutionInitiatedEventAttributes((RequestCancelExternalWorkflowExecutionInitiatedEventAttributes)value);
      }
      break;

    case REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetRequestCancelExternalWorkflowExecutionFailedEventAttributes();
      } else {
        setRequestCancelExternalWorkflowExecutionFailedEventAttributes((RequestCancelExternalWorkflowExecutionFailedEventAttributes)value);
      }
      break;

    case EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetExternalWorkflowExecutionCancelRequestedEventAttributes();
      } else {
        setExternalWorkflowExecutionCancelRequestedEventAttributes((ExternalWorkflowExecutionCancelRequestedEventAttributes)value);
      }
      break;

    case WORKFLOW_EXECUTION_CONTINUED_AS_NEW_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetWorkflowExecutionContinuedAsNewEventAttributes();
      } else {
        setWorkflowExecutionContinuedAsNewEventAttributes((WorkflowExecutionContinuedAsNewEventAttributes)value);
      }
      break;

    case START_CHILD_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetStartChildWorkflowExecutionInitiatedEventAttributes();
      } else {
        setStartChildWorkflowExecutionInitiatedEventAttributes((StartChildWorkflowExecutionInitiatedEventAttributes)value);
      }
      break;

    case START_CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetStartChildWorkflowExecutionFailedEventAttributes();
      } else {
        setStartChildWorkflowExecutionFailedEventAttributes((StartChildWorkflowExecutionFailedEventAttributes)value);
      }
      break;

    case CHILD_WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetChildWorkflowExecutionStartedEventAttributes();
      } else {
        setChildWorkflowExecutionStartedEventAttributes((ChildWorkflowExecutionStartedEventAttributes)value);
      }
      break;

    case CHILD_WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetChildWorkflowExecutionCompletedEventAttributes();
      } else {
        setChildWorkflowExecutionCompletedEventAttributes((ChildWorkflowExecutionCompletedEventAttributes)value);
      }
      break;

    case CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetChildWorkflowExecutionFailedEventAttributes();
      } else {
        setChildWorkflowExecutionFailedEventAttributes((ChildWorkflowExecutionFailedEventAttributes)value);
      }
      break;

    case CHILD_WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetChildWorkflowExecutionCanceledEventAttributes();
      } else {
        setChildWorkflowExecutionCanceledEventAttributes((ChildWorkflowExecutionCanceledEventAttributes)value);
      }
      break;

    case CHILD_WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetChildWorkflowExecutionTimedOutEventAttributes();
      } else {
        setChildWorkflowExecutionTimedOutEventAttributes((ChildWorkflowExecutionTimedOutEventAttributes)value);
      }
      break;

    case CHILD_WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetChildWorkflowExecutionTerminatedEventAttributes();
      } else {
        setChildWorkflowExecutionTerminatedEventAttributes((ChildWorkflowExecutionTerminatedEventAttributes)value);
      }
      break;

    case SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetSignalExternalWorkflowExecutionInitiatedEventAttributes();
      } else {
        setSignalExternalWorkflowExecutionInitiatedEventAttributes((SignalExternalWorkflowExecutionInitiatedEventAttributes)value);
      }
      break;

    case SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetSignalExternalWorkflowExecutionFailedEventAttributes();
      } else {
        setSignalExternalWorkflowExecutionFailedEventAttributes((SignalExternalWorkflowExecutionFailedEventAttributes)value);
      }
      break;

    case EXTERNAL_WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES:
      if (value == null) {
        unsetExternalWorkflowExecutionSignaledEventAttributes();
      } else {
        setExternalWorkflowExecutionSignaledEventAttributes((ExternalWorkflowExecutionSignaledEventAttributes)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case EVENT_ID:
      return getEventId();

    case TIMESTAMP:
      return getTimestamp();

    case EVENT_TYPE:
      return getEventType();

    case VERSION:
      return getVersion();

    case TASK_ID:
      return getTaskId();

    case WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES:
      return getWorkflowExecutionStartedEventAttributes();

    case WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES:
      return getWorkflowExecutionCompletedEventAttributes();

    case WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      return getWorkflowExecutionFailedEventAttributes();

    case WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES:
      return getWorkflowExecutionTimedOutEventAttributes();

    case DECISION_TASK_SCHEDULED_EVENT_ATTRIBUTES:
      return getDecisionTaskScheduledEventAttributes();

    case DECISION_TASK_STARTED_EVENT_ATTRIBUTES:
      return getDecisionTaskStartedEventAttributes();

    case DECISION_TASK_COMPLETED_EVENT_ATTRIBUTES:
      return getDecisionTaskCompletedEventAttributes();

    case DECISION_TASK_TIMED_OUT_EVENT_ATTRIBUTES:
      return getDecisionTaskTimedOutEventAttributes();

    case DECISION_TASK_FAILED_EVENT_ATTRIBUTES:
      return getDecisionTaskFailedEventAttributes();

    case ACTIVITY_TASK_SCHEDULED_EVENT_ATTRIBUTES:
      return getActivityTaskScheduledEventAttributes();

    case ACTIVITY_TASK_STARTED_EVENT_ATTRIBUTES:
      return getActivityTaskStartedEventAttributes();

    case ACTIVITY_TASK_COMPLETED_EVENT_ATTRIBUTES:
      return getActivityTaskCompletedEventAttributes();

    case ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES:
      return getActivityTaskFailedEventAttributes();

    case ACTIVITY_TASK_TIMED_OUT_EVENT_ATTRIBUTES:
      return getActivityTaskTimedOutEventAttributes();

    case TIMER_STARTED_EVENT_ATTRIBUTES:
      return getTimerStartedEventAttributes();

    case TIMER_FIRED_EVENT_ATTRIBUTES:
      return getTimerFiredEventAttributes();

    case ACTIVITY_TASK_CANCEL_REQUESTED_EVENT_ATTRIBUTES:
      return getActivityTaskCancelRequestedEventAttributes();

    case REQUEST_CANCEL_ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES:
      return getRequestCancelActivityTaskFailedEventAttributes();

    case ACTIVITY_TASK_CANCELED_EVENT_ATTRIBUTES:
      return getActivityTaskCanceledEventAttributes();

    case TIMER_CANCELED_EVENT_ATTRIBUTES:
      return getTimerCanceledEventAttributes();

    case CANCEL_TIMER_FAILED_EVENT_ATTRIBUTES:
      return getCancelTimerFailedEventAttributes();

    case MARKER_RECORDED_EVENT_ATTRIBUTES:
      return getMarkerRecordedEventAttributes();

    case WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES:
      return getWorkflowExecutionSignaledEventAttributes();

    case WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES:
      return getWorkflowExecutionTerminatedEventAttributes();

    case WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES:
      return getWorkflowExecutionCancelRequestedEventAttributes();

    case WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES:
      return getWorkflowExecutionCanceledEventAttributes();

    case REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES:
      return getRequestCancelExternalWorkflowExecutionInitiatedEventAttributes();

    case REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      return getRequestCancelExternalWorkflowExecutionFailedEventAttributes();

    case EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES:
      return getExternalWorkflowExecutionCancelRequestedEventAttributes();

    case WORKFLOW_EXECUTION_CONTINUED_AS_NEW_EVENT_ATTRIBUTES:
      return getWorkflowExecutionContinuedAsNewEventAttributes();

    case START_CHILD_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES:
      return getStartChildWorkflowExecutionInitiatedEventAttributes();

    case START_CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      return getStartChildWorkflowExecutionFailedEventAttributes();

    case CHILD_WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES:
      return getChildWorkflowExecutionStartedEventAttributes();

    case CHILD_WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES:
      return getChildWorkflowExecutionCompletedEventAttributes();

    case CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      return getChildWorkflowExecutionFailedEventAttributes();

    case CHILD_WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES:
      return getChildWorkflowExecutionCanceledEventAttributes();

    case CHILD_WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES:
      return getChildWorkflowExecutionTimedOutEventAttributes();

    case CHILD_WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES:
      return getChildWorkflowExecutionTerminatedEventAttributes();

    case SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES:
      return getSignalExternalWorkflowExecutionInitiatedEventAttributes();

    case SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      return getSignalExternalWorkflowExecutionFailedEventAttributes();

    case EXTERNAL_WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES:
      return getExternalWorkflowExecutionSignaledEventAttributes();

    }
    throw new IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case EVENT_ID:
      return isSetEventId();
    case TIMESTAMP:
      return isSetTimestamp();
    case EVENT_TYPE:
      return isSetEventType();
    case VERSION:
      return isSetVersion();
    case TASK_ID:
      return isSetTaskId();
    case WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES:
      return isSetWorkflowExecutionStartedEventAttributes();
    case WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES:
      return isSetWorkflowExecutionCompletedEventAttributes();
    case WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      return isSetWorkflowExecutionFailedEventAttributes();
    case WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES:
      return isSetWorkflowExecutionTimedOutEventAttributes();
    case DECISION_TASK_SCHEDULED_EVENT_ATTRIBUTES:
      return isSetDecisionTaskScheduledEventAttributes();
    case DECISION_TASK_STARTED_EVENT_ATTRIBUTES:
      return isSetDecisionTaskStartedEventAttributes();
    case DECISION_TASK_COMPLETED_EVENT_ATTRIBUTES:
      return isSetDecisionTaskCompletedEventAttributes();
    case DECISION_TASK_TIMED_OUT_EVENT_ATTRIBUTES:
      return isSetDecisionTaskTimedOutEventAttributes();
    case DECISION_TASK_FAILED_EVENT_ATTRIBUTES:
      return isSetDecisionTaskFailedEventAttributes();
    case ACTIVITY_TASK_SCHEDULED_EVENT_ATTRIBUTES:
      return isSetActivityTaskScheduledEventAttributes();
    case ACTIVITY_TASK_STARTED_EVENT_ATTRIBUTES:
      return isSetActivityTaskStartedEventAttributes();
    case ACTIVITY_TASK_COMPLETED_EVENT_ATTRIBUTES:
      return isSetActivityTaskCompletedEventAttributes();
    case ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES:
      return isSetActivityTaskFailedEventAttributes();
    case ACTIVITY_TASK_TIMED_OUT_EVENT_ATTRIBUTES:
      return isSetActivityTaskTimedOutEventAttributes();
    case TIMER_STARTED_EVENT_ATTRIBUTES:
      return isSetTimerStartedEventAttributes();
    case TIMER_FIRED_EVENT_ATTRIBUTES:
      return isSetTimerFiredEventAttributes();
    case ACTIVITY_TASK_CANCEL_REQUESTED_EVENT_ATTRIBUTES:
      return isSetActivityTaskCancelRequestedEventAttributes();
    case REQUEST_CANCEL_ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES:
      return isSetRequestCancelActivityTaskFailedEventAttributes();
    case ACTIVITY_TASK_CANCELED_EVENT_ATTRIBUTES:
      return isSetActivityTaskCanceledEventAttributes();
    case TIMER_CANCELED_EVENT_ATTRIBUTES:
      return isSetTimerCanceledEventAttributes();
    case CANCEL_TIMER_FAILED_EVENT_ATTRIBUTES:
      return isSetCancelTimerFailedEventAttributes();
    case MARKER_RECORDED_EVENT_ATTRIBUTES:
      return isSetMarkerRecordedEventAttributes();
    case WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES:
      return isSetWorkflowExecutionSignaledEventAttributes();
    case WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES:
      return isSetWorkflowExecutionTerminatedEventAttributes();
    case WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES:
      return isSetWorkflowExecutionCancelRequestedEventAttributes();
    case WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES:
      return isSetWorkflowExecutionCanceledEventAttributes();
    case REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES:
      return isSetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes();
    case REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      return isSetRequestCancelExternalWorkflowExecutionFailedEventAttributes();
    case EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES:
      return isSetExternalWorkflowExecutionCancelRequestedEventAttributes();
    case WORKFLOW_EXECUTION_CONTINUED_AS_NEW_EVENT_ATTRIBUTES:
      return isSetWorkflowExecutionContinuedAsNewEventAttributes();
    case START_CHILD_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES:
      return isSetStartChildWorkflowExecutionInitiatedEventAttributes();
    case START_CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      return isSetStartChildWorkflowExecutionFailedEventAttributes();
    case CHILD_WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES:
      return isSetChildWorkflowExecutionStartedEventAttributes();
    case CHILD_WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES:
      return isSetChildWorkflowExecutionCompletedEventAttributes();
    case CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      return isSetChildWorkflowExecutionFailedEventAttributes();
    case CHILD_WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES:
      return isSetChildWorkflowExecutionCanceledEventAttributes();
    case CHILD_WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES:
      return isSetChildWorkflowExecutionTimedOutEventAttributes();
    case CHILD_WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES:
      return isSetChildWorkflowExecutionTerminatedEventAttributes();
    case SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES:
      return isSetSignalExternalWorkflowExecutionInitiatedEventAttributes();
    case SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES:
      return isSetSignalExternalWorkflowExecutionFailedEventAttributes();
    case EXTERNAL_WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES:
      return isSetExternalWorkflowExecutionSignaledEventAttributes();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof HistoryEvent)
      return this.equals((HistoryEvent)that);
    return false;
  }

  public boolean equals(HistoryEvent that) {
    if (that == null)
      return false;

    boolean this_present_eventId = true && this.isSetEventId();
    boolean that_present_eventId = true && that.isSetEventId();
    if (this_present_eventId || that_present_eventId) {
      if (!(this_present_eventId && that_present_eventId))
        return false;
      if (this.eventId != that.eventId)
        return false;
    }

    boolean this_present_timestamp = true && this.isSetTimestamp();
    boolean that_present_timestamp = true && that.isSetTimestamp();
    if (this_present_timestamp || that_present_timestamp) {
      if (!(this_present_timestamp && that_present_timestamp))
        return false;
      if (this.timestamp != that.timestamp)
        return false;
    }

    boolean this_present_eventType = true && this.isSetEventType();
    boolean that_present_eventType = true && that.isSetEventType();
    if (this_present_eventType || that_present_eventType) {
      if (!(this_present_eventType && that_present_eventType))
        return false;
      if (!this.eventType.equals(that.eventType))
        return false;
    }

    boolean this_present_version = true && this.isSetVersion();
    boolean that_present_version = true && that.isSetVersion();
    if (this_present_version || that_present_version) {
      if (!(this_present_version && that_present_version))
        return false;
      if (this.version != that.version)
        return false;
    }

    boolean this_present_taskId = true && this.isSetTaskId();
    boolean that_present_taskId = true && that.isSetTaskId();
    if (this_present_taskId || that_present_taskId) {
      if (!(this_present_taskId && that_present_taskId))
        return false;
      if (this.taskId != that.taskId)
        return false;
    }

    boolean this_present_workflowExecutionStartedEventAttributes = true && this.isSetWorkflowExecutionStartedEventAttributes();
    boolean that_present_workflowExecutionStartedEventAttributes = true && that.isSetWorkflowExecutionStartedEventAttributes();
    if (this_present_workflowExecutionStartedEventAttributes || that_present_workflowExecutionStartedEventAttributes) {
      if (!(this_present_workflowExecutionStartedEventAttributes && that_present_workflowExecutionStartedEventAttributes))
        return false;
      if (!this.workflowExecutionStartedEventAttributes.equals(that.workflowExecutionStartedEventAttributes))
        return false;
    }

    boolean this_present_workflowExecutionCompletedEventAttributes = true && this.isSetWorkflowExecutionCompletedEventAttributes();
    boolean that_present_workflowExecutionCompletedEventAttributes = true && that.isSetWorkflowExecutionCompletedEventAttributes();
    if (this_present_workflowExecutionCompletedEventAttributes || that_present_workflowExecutionCompletedEventAttributes) {
      if (!(this_present_workflowExecutionCompletedEventAttributes && that_present_workflowExecutionCompletedEventAttributes))
        return false;
      if (!this.workflowExecutionCompletedEventAttributes.equals(that.workflowExecutionCompletedEventAttributes))
        return false;
    }

    boolean this_present_workflowExecutionFailedEventAttributes = true && this.isSetWorkflowExecutionFailedEventAttributes();
    boolean that_present_workflowExecutionFailedEventAttributes = true && that.isSetWorkflowExecutionFailedEventAttributes();
    if (this_present_workflowExecutionFailedEventAttributes || that_present_workflowExecutionFailedEventAttributes) {
      if (!(this_present_workflowExecutionFailedEventAttributes && that_present_workflowExecutionFailedEventAttributes))
        return false;
      if (!this.workflowExecutionFailedEventAttributes.equals(that.workflowExecutionFailedEventAttributes))
        return false;
    }

    boolean this_present_workflowExecutionTimedOutEventAttributes = true && this.isSetWorkflowExecutionTimedOutEventAttributes();
    boolean that_present_workflowExecutionTimedOutEventAttributes = true && that.isSetWorkflowExecutionTimedOutEventAttributes();
    if (this_present_workflowExecutionTimedOutEventAttributes || that_present_workflowExecutionTimedOutEventAttributes) {
      if (!(this_present_workflowExecutionTimedOutEventAttributes && that_present_workflowExecutionTimedOutEventAttributes))
        return false;
      if (!this.workflowExecutionTimedOutEventAttributes.equals(that.workflowExecutionTimedOutEventAttributes))
        return false;
    }

    boolean this_present_decisionTaskScheduledEventAttributes = true && this.isSetDecisionTaskScheduledEventAttributes();
    boolean that_present_decisionTaskScheduledEventAttributes = true && that.isSetDecisionTaskScheduledEventAttributes();
    if (this_present_decisionTaskScheduledEventAttributes || that_present_decisionTaskScheduledEventAttributes) {
      if (!(this_present_decisionTaskScheduledEventAttributes && that_present_decisionTaskScheduledEventAttributes))
        return false;
      if (!this.decisionTaskScheduledEventAttributes.equals(that.decisionTaskScheduledEventAttributes))
        return false;
    }

    boolean this_present_decisionTaskStartedEventAttributes = true && this.isSetDecisionTaskStartedEventAttributes();
    boolean that_present_decisionTaskStartedEventAttributes = true && that.isSetDecisionTaskStartedEventAttributes();
    if (this_present_decisionTaskStartedEventAttributes || that_present_decisionTaskStartedEventAttributes) {
      if (!(this_present_decisionTaskStartedEventAttributes && that_present_decisionTaskStartedEventAttributes))
        return false;
      if (!this.decisionTaskStartedEventAttributes.equals(that.decisionTaskStartedEventAttributes))
        return false;
    }

    boolean this_present_decisionTaskCompletedEventAttributes = true && this.isSetDecisionTaskCompletedEventAttributes();
    boolean that_present_decisionTaskCompletedEventAttributes = true && that.isSetDecisionTaskCompletedEventAttributes();
    if (this_present_decisionTaskCompletedEventAttributes || that_present_decisionTaskCompletedEventAttributes) {
      if (!(this_present_decisionTaskCompletedEventAttributes && that_present_decisionTaskCompletedEventAttributes))
        return false;
      if (!this.decisionTaskCompletedEventAttributes.equals(that.decisionTaskCompletedEventAttributes))
        return false;
    }

    boolean this_present_decisionTaskTimedOutEventAttributes = true && this.isSetDecisionTaskTimedOutEventAttributes();
    boolean that_present_decisionTaskTimedOutEventAttributes = true && that.isSetDecisionTaskTimedOutEventAttributes();
    if (this_present_decisionTaskTimedOutEventAttributes || that_present_decisionTaskTimedOutEventAttributes) {
      if (!(this_present_decisionTaskTimedOutEventAttributes && that_present_decisionTaskTimedOutEventAttributes))
        return false;
      if (!this.decisionTaskTimedOutEventAttributes.equals(that.decisionTaskTimedOutEventAttributes))
        return false;
    }

    boolean this_present_decisionTaskFailedEventAttributes = true && this.isSetDecisionTaskFailedEventAttributes();
    boolean that_present_decisionTaskFailedEventAttributes = true && that.isSetDecisionTaskFailedEventAttributes();
    if (this_present_decisionTaskFailedEventAttributes || that_present_decisionTaskFailedEventAttributes) {
      if (!(this_present_decisionTaskFailedEventAttributes && that_present_decisionTaskFailedEventAttributes))
        return false;
      if (!this.decisionTaskFailedEventAttributes.equals(that.decisionTaskFailedEventAttributes))
        return false;
    }

    boolean this_present_activityTaskScheduledEventAttributes = true && this.isSetActivityTaskScheduledEventAttributes();
    boolean that_present_activityTaskScheduledEventAttributes = true && that.isSetActivityTaskScheduledEventAttributes();
    if (this_present_activityTaskScheduledEventAttributes || that_present_activityTaskScheduledEventAttributes) {
      if (!(this_present_activityTaskScheduledEventAttributes && that_present_activityTaskScheduledEventAttributes))
        return false;
      if (!this.activityTaskScheduledEventAttributes.equals(that.activityTaskScheduledEventAttributes))
        return false;
    }

    boolean this_present_activityTaskStartedEventAttributes = true && this.isSetActivityTaskStartedEventAttributes();
    boolean that_present_activityTaskStartedEventAttributes = true && that.isSetActivityTaskStartedEventAttributes();
    if (this_present_activityTaskStartedEventAttributes || that_present_activityTaskStartedEventAttributes) {
      if (!(this_present_activityTaskStartedEventAttributes && that_present_activityTaskStartedEventAttributes))
        return false;
      if (!this.activityTaskStartedEventAttributes.equals(that.activityTaskStartedEventAttributes))
        return false;
    }

    boolean this_present_activityTaskCompletedEventAttributes = true && this.isSetActivityTaskCompletedEventAttributes();
    boolean that_present_activityTaskCompletedEventAttributes = true && that.isSetActivityTaskCompletedEventAttributes();
    if (this_present_activityTaskCompletedEventAttributes || that_present_activityTaskCompletedEventAttributes) {
      if (!(this_present_activityTaskCompletedEventAttributes && that_present_activityTaskCompletedEventAttributes))
        return false;
      if (!this.activityTaskCompletedEventAttributes.equals(that.activityTaskCompletedEventAttributes))
        return false;
    }

    boolean this_present_activityTaskFailedEventAttributes = true && this.isSetActivityTaskFailedEventAttributes();
    boolean that_present_activityTaskFailedEventAttributes = true && that.isSetActivityTaskFailedEventAttributes();
    if (this_present_activityTaskFailedEventAttributes || that_present_activityTaskFailedEventAttributes) {
      if (!(this_present_activityTaskFailedEventAttributes && that_present_activityTaskFailedEventAttributes))
        return false;
      if (!this.activityTaskFailedEventAttributes.equals(that.activityTaskFailedEventAttributes))
        return false;
    }

    boolean this_present_activityTaskTimedOutEventAttributes = true && this.isSetActivityTaskTimedOutEventAttributes();
    boolean that_present_activityTaskTimedOutEventAttributes = true && that.isSetActivityTaskTimedOutEventAttributes();
    if (this_present_activityTaskTimedOutEventAttributes || that_present_activityTaskTimedOutEventAttributes) {
      if (!(this_present_activityTaskTimedOutEventAttributes && that_present_activityTaskTimedOutEventAttributes))
        return false;
      if (!this.activityTaskTimedOutEventAttributes.equals(that.activityTaskTimedOutEventAttributes))
        return false;
    }

    boolean this_present_timerStartedEventAttributes = true && this.isSetTimerStartedEventAttributes();
    boolean that_present_timerStartedEventAttributes = true && that.isSetTimerStartedEventAttributes();
    if (this_present_timerStartedEventAttributes || that_present_timerStartedEventAttributes) {
      if (!(this_present_timerStartedEventAttributes && that_present_timerStartedEventAttributes))
        return false;
      if (!this.timerStartedEventAttributes.equals(that.timerStartedEventAttributes))
        return false;
    }

    boolean this_present_timerFiredEventAttributes = true && this.isSetTimerFiredEventAttributes();
    boolean that_present_timerFiredEventAttributes = true && that.isSetTimerFiredEventAttributes();
    if (this_present_timerFiredEventAttributes || that_present_timerFiredEventAttributes) {
      if (!(this_present_timerFiredEventAttributes && that_present_timerFiredEventAttributes))
        return false;
      if (!this.timerFiredEventAttributes.equals(that.timerFiredEventAttributes))
        return false;
    }

    boolean this_present_activityTaskCancelRequestedEventAttributes = true && this.isSetActivityTaskCancelRequestedEventAttributes();
    boolean that_present_activityTaskCancelRequestedEventAttributes = true && that.isSetActivityTaskCancelRequestedEventAttributes();
    if (this_present_activityTaskCancelRequestedEventAttributes || that_present_activityTaskCancelRequestedEventAttributes) {
      if (!(this_present_activityTaskCancelRequestedEventAttributes && that_present_activityTaskCancelRequestedEventAttributes))
        return false;
      if (!this.activityTaskCancelRequestedEventAttributes.equals(that.activityTaskCancelRequestedEventAttributes))
        return false;
    }

    boolean this_present_requestCancelActivityTaskFailedEventAttributes = true && this.isSetRequestCancelActivityTaskFailedEventAttributes();
    boolean that_present_requestCancelActivityTaskFailedEventAttributes = true && that.isSetRequestCancelActivityTaskFailedEventAttributes();
    if (this_present_requestCancelActivityTaskFailedEventAttributes || that_present_requestCancelActivityTaskFailedEventAttributes) {
      if (!(this_present_requestCancelActivityTaskFailedEventAttributes && that_present_requestCancelActivityTaskFailedEventAttributes))
        return false;
      if (!this.requestCancelActivityTaskFailedEventAttributes.equals(that.requestCancelActivityTaskFailedEventAttributes))
        return false;
    }

    boolean this_present_activityTaskCanceledEventAttributes = true && this.isSetActivityTaskCanceledEventAttributes();
    boolean that_present_activityTaskCanceledEventAttributes = true && that.isSetActivityTaskCanceledEventAttributes();
    if (this_present_activityTaskCanceledEventAttributes || that_present_activityTaskCanceledEventAttributes) {
      if (!(this_present_activityTaskCanceledEventAttributes && that_present_activityTaskCanceledEventAttributes))
        return false;
      if (!this.activityTaskCanceledEventAttributes.equals(that.activityTaskCanceledEventAttributes))
        return false;
    }

    boolean this_present_timerCanceledEventAttributes = true && this.isSetTimerCanceledEventAttributes();
    boolean that_present_timerCanceledEventAttributes = true && that.isSetTimerCanceledEventAttributes();
    if (this_present_timerCanceledEventAttributes || that_present_timerCanceledEventAttributes) {
      if (!(this_present_timerCanceledEventAttributes && that_present_timerCanceledEventAttributes))
        return false;
      if (!this.timerCanceledEventAttributes.equals(that.timerCanceledEventAttributes))
        return false;
    }

    boolean this_present_cancelTimerFailedEventAttributes = true && this.isSetCancelTimerFailedEventAttributes();
    boolean that_present_cancelTimerFailedEventAttributes = true && that.isSetCancelTimerFailedEventAttributes();
    if (this_present_cancelTimerFailedEventAttributes || that_present_cancelTimerFailedEventAttributes) {
      if (!(this_present_cancelTimerFailedEventAttributes && that_present_cancelTimerFailedEventAttributes))
        return false;
      if (!this.cancelTimerFailedEventAttributes.equals(that.cancelTimerFailedEventAttributes))
        return false;
    }

    boolean this_present_markerRecordedEventAttributes = true && this.isSetMarkerRecordedEventAttributes();
    boolean that_present_markerRecordedEventAttributes = true && that.isSetMarkerRecordedEventAttributes();
    if (this_present_markerRecordedEventAttributes || that_present_markerRecordedEventAttributes) {
      if (!(this_present_markerRecordedEventAttributes && that_present_markerRecordedEventAttributes))
        return false;
      if (!this.markerRecordedEventAttributes.equals(that.markerRecordedEventAttributes))
        return false;
    }

    boolean this_present_workflowExecutionSignaledEventAttributes = true && this.isSetWorkflowExecutionSignaledEventAttributes();
    boolean that_present_workflowExecutionSignaledEventAttributes = true && that.isSetWorkflowExecutionSignaledEventAttributes();
    if (this_present_workflowExecutionSignaledEventAttributes || that_present_workflowExecutionSignaledEventAttributes) {
      if (!(this_present_workflowExecutionSignaledEventAttributes && that_present_workflowExecutionSignaledEventAttributes))
        return false;
      if (!this.workflowExecutionSignaledEventAttributes.equals(that.workflowExecutionSignaledEventAttributes))
        return false;
    }

    boolean this_present_workflowExecutionTerminatedEventAttributes = true && this.isSetWorkflowExecutionTerminatedEventAttributes();
    boolean that_present_workflowExecutionTerminatedEventAttributes = true && that.isSetWorkflowExecutionTerminatedEventAttributes();
    if (this_present_workflowExecutionTerminatedEventAttributes || that_present_workflowExecutionTerminatedEventAttributes) {
      if (!(this_present_workflowExecutionTerminatedEventAttributes && that_present_workflowExecutionTerminatedEventAttributes))
        return false;
      if (!this.workflowExecutionTerminatedEventAttributes.equals(that.workflowExecutionTerminatedEventAttributes))
        return false;
    }

    boolean this_present_workflowExecutionCancelRequestedEventAttributes = true && this.isSetWorkflowExecutionCancelRequestedEventAttributes();
    boolean that_present_workflowExecutionCancelRequestedEventAttributes = true && that.isSetWorkflowExecutionCancelRequestedEventAttributes();
    if (this_present_workflowExecutionCancelRequestedEventAttributes || that_present_workflowExecutionCancelRequestedEventAttributes) {
      if (!(this_present_workflowExecutionCancelRequestedEventAttributes && that_present_workflowExecutionCancelRequestedEventAttributes))
        return false;
      if (!this.workflowExecutionCancelRequestedEventAttributes.equals(that.workflowExecutionCancelRequestedEventAttributes))
        return false;
    }

    boolean this_present_workflowExecutionCanceledEventAttributes = true && this.isSetWorkflowExecutionCanceledEventAttributes();
    boolean that_present_workflowExecutionCanceledEventAttributes = true && that.isSetWorkflowExecutionCanceledEventAttributes();
    if (this_present_workflowExecutionCanceledEventAttributes || that_present_workflowExecutionCanceledEventAttributes) {
      if (!(this_present_workflowExecutionCanceledEventAttributes && that_present_workflowExecutionCanceledEventAttributes))
        return false;
      if (!this.workflowExecutionCanceledEventAttributes.equals(that.workflowExecutionCanceledEventAttributes))
        return false;
    }

    boolean this_present_requestCancelExternalWorkflowExecutionInitiatedEventAttributes = true && this.isSetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes();
    boolean that_present_requestCancelExternalWorkflowExecutionInitiatedEventAttributes = true && that.isSetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes();
    if (this_present_requestCancelExternalWorkflowExecutionInitiatedEventAttributes || that_present_requestCancelExternalWorkflowExecutionInitiatedEventAttributes) {
      if (!(this_present_requestCancelExternalWorkflowExecutionInitiatedEventAttributes && that_present_requestCancelExternalWorkflowExecutionInitiatedEventAttributes))
        return false;
      if (!this.requestCancelExternalWorkflowExecutionInitiatedEventAttributes.equals(that.requestCancelExternalWorkflowExecutionInitiatedEventAttributes))
        return false;
    }

    boolean this_present_requestCancelExternalWorkflowExecutionFailedEventAttributes = true && this.isSetRequestCancelExternalWorkflowExecutionFailedEventAttributes();
    boolean that_present_requestCancelExternalWorkflowExecutionFailedEventAttributes = true && that.isSetRequestCancelExternalWorkflowExecutionFailedEventAttributes();
    if (this_present_requestCancelExternalWorkflowExecutionFailedEventAttributes || that_present_requestCancelExternalWorkflowExecutionFailedEventAttributes) {
      if (!(this_present_requestCancelExternalWorkflowExecutionFailedEventAttributes && that_present_requestCancelExternalWorkflowExecutionFailedEventAttributes))
        return false;
      if (!this.requestCancelExternalWorkflowExecutionFailedEventAttributes.equals(that.requestCancelExternalWorkflowExecutionFailedEventAttributes))
        return false;
    }

    boolean this_present_externalWorkflowExecutionCancelRequestedEventAttributes = true && this.isSetExternalWorkflowExecutionCancelRequestedEventAttributes();
    boolean that_present_externalWorkflowExecutionCancelRequestedEventAttributes = true && that.isSetExternalWorkflowExecutionCancelRequestedEventAttributes();
    if (this_present_externalWorkflowExecutionCancelRequestedEventAttributes || that_present_externalWorkflowExecutionCancelRequestedEventAttributes) {
      if (!(this_present_externalWorkflowExecutionCancelRequestedEventAttributes && that_present_externalWorkflowExecutionCancelRequestedEventAttributes))
        return false;
      if (!this.externalWorkflowExecutionCancelRequestedEventAttributes.equals(that.externalWorkflowExecutionCancelRequestedEventAttributes))
        return false;
    }

    boolean this_present_workflowExecutionContinuedAsNewEventAttributes = true && this.isSetWorkflowExecutionContinuedAsNewEventAttributes();
    boolean that_present_workflowExecutionContinuedAsNewEventAttributes = true && that.isSetWorkflowExecutionContinuedAsNewEventAttributes();
    if (this_present_workflowExecutionContinuedAsNewEventAttributes || that_present_workflowExecutionContinuedAsNewEventAttributes) {
      if (!(this_present_workflowExecutionContinuedAsNewEventAttributes && that_present_workflowExecutionContinuedAsNewEventAttributes))
        return false;
      if (!this.workflowExecutionContinuedAsNewEventAttributes.equals(that.workflowExecutionContinuedAsNewEventAttributes))
        return false;
    }

    boolean this_present_startChildWorkflowExecutionInitiatedEventAttributes = true && this.isSetStartChildWorkflowExecutionInitiatedEventAttributes();
    boolean that_present_startChildWorkflowExecutionInitiatedEventAttributes = true && that.isSetStartChildWorkflowExecutionInitiatedEventAttributes();
    if (this_present_startChildWorkflowExecutionInitiatedEventAttributes || that_present_startChildWorkflowExecutionInitiatedEventAttributes) {
      if (!(this_present_startChildWorkflowExecutionInitiatedEventAttributes && that_present_startChildWorkflowExecutionInitiatedEventAttributes))
        return false;
      if (!this.startChildWorkflowExecutionInitiatedEventAttributes.equals(that.startChildWorkflowExecutionInitiatedEventAttributes))
        return false;
    }

    boolean this_present_startChildWorkflowExecutionFailedEventAttributes = true && this.isSetStartChildWorkflowExecutionFailedEventAttributes();
    boolean that_present_startChildWorkflowExecutionFailedEventAttributes = true && that.isSetStartChildWorkflowExecutionFailedEventAttributes();
    if (this_present_startChildWorkflowExecutionFailedEventAttributes || that_present_startChildWorkflowExecutionFailedEventAttributes) {
      if (!(this_present_startChildWorkflowExecutionFailedEventAttributes && that_present_startChildWorkflowExecutionFailedEventAttributes))
        return false;
      if (!this.startChildWorkflowExecutionFailedEventAttributes.equals(that.startChildWorkflowExecutionFailedEventAttributes))
        return false;
    }

    boolean this_present_childWorkflowExecutionStartedEventAttributes = true && this.isSetChildWorkflowExecutionStartedEventAttributes();
    boolean that_present_childWorkflowExecutionStartedEventAttributes = true && that.isSetChildWorkflowExecutionStartedEventAttributes();
    if (this_present_childWorkflowExecutionStartedEventAttributes || that_present_childWorkflowExecutionStartedEventAttributes) {
      if (!(this_present_childWorkflowExecutionStartedEventAttributes && that_present_childWorkflowExecutionStartedEventAttributes))
        return false;
      if (!this.childWorkflowExecutionStartedEventAttributes.equals(that.childWorkflowExecutionStartedEventAttributes))
        return false;
    }

    boolean this_present_childWorkflowExecutionCompletedEventAttributes = true && this.isSetChildWorkflowExecutionCompletedEventAttributes();
    boolean that_present_childWorkflowExecutionCompletedEventAttributes = true && that.isSetChildWorkflowExecutionCompletedEventAttributes();
    if (this_present_childWorkflowExecutionCompletedEventAttributes || that_present_childWorkflowExecutionCompletedEventAttributes) {
      if (!(this_present_childWorkflowExecutionCompletedEventAttributes && that_present_childWorkflowExecutionCompletedEventAttributes))
        return false;
      if (!this.childWorkflowExecutionCompletedEventAttributes.equals(that.childWorkflowExecutionCompletedEventAttributes))
        return false;
    }

    boolean this_present_childWorkflowExecutionFailedEventAttributes = true && this.isSetChildWorkflowExecutionFailedEventAttributes();
    boolean that_present_childWorkflowExecutionFailedEventAttributes = true && that.isSetChildWorkflowExecutionFailedEventAttributes();
    if (this_present_childWorkflowExecutionFailedEventAttributes || that_present_childWorkflowExecutionFailedEventAttributes) {
      if (!(this_present_childWorkflowExecutionFailedEventAttributes && that_present_childWorkflowExecutionFailedEventAttributes))
        return false;
      if (!this.childWorkflowExecutionFailedEventAttributes.equals(that.childWorkflowExecutionFailedEventAttributes))
        return false;
    }

    boolean this_present_childWorkflowExecutionCanceledEventAttributes = true && this.isSetChildWorkflowExecutionCanceledEventAttributes();
    boolean that_present_childWorkflowExecutionCanceledEventAttributes = true && that.isSetChildWorkflowExecutionCanceledEventAttributes();
    if (this_present_childWorkflowExecutionCanceledEventAttributes || that_present_childWorkflowExecutionCanceledEventAttributes) {
      if (!(this_present_childWorkflowExecutionCanceledEventAttributes && that_present_childWorkflowExecutionCanceledEventAttributes))
        return false;
      if (!this.childWorkflowExecutionCanceledEventAttributes.equals(that.childWorkflowExecutionCanceledEventAttributes))
        return false;
    }

    boolean this_present_childWorkflowExecutionTimedOutEventAttributes = true && this.isSetChildWorkflowExecutionTimedOutEventAttributes();
    boolean that_present_childWorkflowExecutionTimedOutEventAttributes = true && that.isSetChildWorkflowExecutionTimedOutEventAttributes();
    if (this_present_childWorkflowExecutionTimedOutEventAttributes || that_present_childWorkflowExecutionTimedOutEventAttributes) {
      if (!(this_present_childWorkflowExecutionTimedOutEventAttributes && that_present_childWorkflowExecutionTimedOutEventAttributes))
        return false;
      if (!this.childWorkflowExecutionTimedOutEventAttributes.equals(that.childWorkflowExecutionTimedOutEventAttributes))
        return false;
    }

    boolean this_present_childWorkflowExecutionTerminatedEventAttributes = true && this.isSetChildWorkflowExecutionTerminatedEventAttributes();
    boolean that_present_childWorkflowExecutionTerminatedEventAttributes = true && that.isSetChildWorkflowExecutionTerminatedEventAttributes();
    if (this_present_childWorkflowExecutionTerminatedEventAttributes || that_present_childWorkflowExecutionTerminatedEventAttributes) {
      if (!(this_present_childWorkflowExecutionTerminatedEventAttributes && that_present_childWorkflowExecutionTerminatedEventAttributes))
        return false;
      if (!this.childWorkflowExecutionTerminatedEventAttributes.equals(that.childWorkflowExecutionTerminatedEventAttributes))
        return false;
    }

    boolean this_present_signalExternalWorkflowExecutionInitiatedEventAttributes = true && this.isSetSignalExternalWorkflowExecutionInitiatedEventAttributes();
    boolean that_present_signalExternalWorkflowExecutionInitiatedEventAttributes = true && that.isSetSignalExternalWorkflowExecutionInitiatedEventAttributes();
    if (this_present_signalExternalWorkflowExecutionInitiatedEventAttributes || that_present_signalExternalWorkflowExecutionInitiatedEventAttributes) {
      if (!(this_present_signalExternalWorkflowExecutionInitiatedEventAttributes && that_present_signalExternalWorkflowExecutionInitiatedEventAttributes))
        return false;
      if (!this.signalExternalWorkflowExecutionInitiatedEventAttributes.equals(that.signalExternalWorkflowExecutionInitiatedEventAttributes))
        return false;
    }

    boolean this_present_signalExternalWorkflowExecutionFailedEventAttributes = true && this.isSetSignalExternalWorkflowExecutionFailedEventAttributes();
    boolean that_present_signalExternalWorkflowExecutionFailedEventAttributes = true && that.isSetSignalExternalWorkflowExecutionFailedEventAttributes();
    if (this_present_signalExternalWorkflowExecutionFailedEventAttributes || that_present_signalExternalWorkflowExecutionFailedEventAttributes) {
      if (!(this_present_signalExternalWorkflowExecutionFailedEventAttributes && that_present_signalExternalWorkflowExecutionFailedEventAttributes))
        return false;
      if (!this.signalExternalWorkflowExecutionFailedEventAttributes.equals(that.signalExternalWorkflowExecutionFailedEventAttributes))
        return false;
    }

    boolean this_present_externalWorkflowExecutionSignaledEventAttributes = true && this.isSetExternalWorkflowExecutionSignaledEventAttributes();
    boolean that_present_externalWorkflowExecutionSignaledEventAttributes = true && that.isSetExternalWorkflowExecutionSignaledEventAttributes();
    if (this_present_externalWorkflowExecutionSignaledEventAttributes || that_present_externalWorkflowExecutionSignaledEventAttributes) {
      if (!(this_present_externalWorkflowExecutionSignaledEventAttributes && that_present_externalWorkflowExecutionSignaledEventAttributes))
        return false;
      if (!this.externalWorkflowExecutionSignaledEventAttributes.equals(that.externalWorkflowExecutionSignaledEventAttributes))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    List list = new ArrayList();

    boolean present_eventId = true && (isSetEventId());
    list.add(present_eventId);
    if (present_eventId)
      list.add(eventId);

    boolean present_timestamp = true && (isSetTimestamp());
    list.add(present_timestamp);
    if (present_timestamp)
      list.add(timestamp);

    boolean present_eventType = true && (isSetEventType());
    list.add(present_eventType);
    if (present_eventType)
      list.add(eventType.getValue());

    boolean present_version = true && (isSetVersion());
    list.add(present_version);
    if (present_version)
      list.add(version);

    boolean present_taskId = true && (isSetTaskId());
    list.add(present_taskId);
    if (present_taskId)
      list.add(taskId);

    boolean present_workflowExecutionStartedEventAttributes = true && (isSetWorkflowExecutionStartedEventAttributes());
    list.add(present_workflowExecutionStartedEventAttributes);
    if (present_workflowExecutionStartedEventAttributes)
      list.add(workflowExecutionStartedEventAttributes);

    boolean present_workflowExecutionCompletedEventAttributes = true && (isSetWorkflowExecutionCompletedEventAttributes());
    list.add(present_workflowExecutionCompletedEventAttributes);
    if (present_workflowExecutionCompletedEventAttributes)
      list.add(workflowExecutionCompletedEventAttributes);

    boolean present_workflowExecutionFailedEventAttributes = true && (isSetWorkflowExecutionFailedEventAttributes());
    list.add(present_workflowExecutionFailedEventAttributes);
    if (present_workflowExecutionFailedEventAttributes)
      list.add(workflowExecutionFailedEventAttributes);

    boolean present_workflowExecutionTimedOutEventAttributes = true && (isSetWorkflowExecutionTimedOutEventAttributes());
    list.add(present_workflowExecutionTimedOutEventAttributes);
    if (present_workflowExecutionTimedOutEventAttributes)
      list.add(workflowExecutionTimedOutEventAttributes);

    boolean present_decisionTaskScheduledEventAttributes = true && (isSetDecisionTaskScheduledEventAttributes());
    list.add(present_decisionTaskScheduledEventAttributes);
    if (present_decisionTaskScheduledEventAttributes)
      list.add(decisionTaskScheduledEventAttributes);

    boolean present_decisionTaskStartedEventAttributes = true && (isSetDecisionTaskStartedEventAttributes());
    list.add(present_decisionTaskStartedEventAttributes);
    if (present_decisionTaskStartedEventAttributes)
      list.add(decisionTaskStartedEventAttributes);

    boolean present_decisionTaskCompletedEventAttributes = true && (isSetDecisionTaskCompletedEventAttributes());
    list.add(present_decisionTaskCompletedEventAttributes);
    if (present_decisionTaskCompletedEventAttributes)
      list.add(decisionTaskCompletedEventAttributes);

    boolean present_decisionTaskTimedOutEventAttributes = true && (isSetDecisionTaskTimedOutEventAttributes());
    list.add(present_decisionTaskTimedOutEventAttributes);
    if (present_decisionTaskTimedOutEventAttributes)
      list.add(decisionTaskTimedOutEventAttributes);

    boolean present_decisionTaskFailedEventAttributes = true && (isSetDecisionTaskFailedEventAttributes());
    list.add(present_decisionTaskFailedEventAttributes);
    if (present_decisionTaskFailedEventAttributes)
      list.add(decisionTaskFailedEventAttributes);

    boolean present_activityTaskScheduledEventAttributes = true && (isSetActivityTaskScheduledEventAttributes());
    list.add(present_activityTaskScheduledEventAttributes);
    if (present_activityTaskScheduledEventAttributes)
      list.add(activityTaskScheduledEventAttributes);

    boolean present_activityTaskStartedEventAttributes = true && (isSetActivityTaskStartedEventAttributes());
    list.add(present_activityTaskStartedEventAttributes);
    if (present_activityTaskStartedEventAttributes)
      list.add(activityTaskStartedEventAttributes);

    boolean present_activityTaskCompletedEventAttributes = true && (isSetActivityTaskCompletedEventAttributes());
    list.add(present_activityTaskCompletedEventAttributes);
    if (present_activityTaskCompletedEventAttributes)
      list.add(activityTaskCompletedEventAttributes);

    boolean present_activityTaskFailedEventAttributes = true && (isSetActivityTaskFailedEventAttributes());
    list.add(present_activityTaskFailedEventAttributes);
    if (present_activityTaskFailedEventAttributes)
      list.add(activityTaskFailedEventAttributes);

    boolean present_activityTaskTimedOutEventAttributes = true && (isSetActivityTaskTimedOutEventAttributes());
    list.add(present_activityTaskTimedOutEventAttributes);
    if (present_activityTaskTimedOutEventAttributes)
      list.add(activityTaskTimedOutEventAttributes);

    boolean present_timerStartedEventAttributes = true && (isSetTimerStartedEventAttributes());
    list.add(present_timerStartedEventAttributes);
    if (present_timerStartedEventAttributes)
      list.add(timerStartedEventAttributes);

    boolean present_timerFiredEventAttributes = true && (isSetTimerFiredEventAttributes());
    list.add(present_timerFiredEventAttributes);
    if (present_timerFiredEventAttributes)
      list.add(timerFiredEventAttributes);

    boolean present_activityTaskCancelRequestedEventAttributes = true && (isSetActivityTaskCancelRequestedEventAttributes());
    list.add(present_activityTaskCancelRequestedEventAttributes);
    if (present_activityTaskCancelRequestedEventAttributes)
      list.add(activityTaskCancelRequestedEventAttributes);

    boolean present_requestCancelActivityTaskFailedEventAttributes = true && (isSetRequestCancelActivityTaskFailedEventAttributes());
    list.add(present_requestCancelActivityTaskFailedEventAttributes);
    if (present_requestCancelActivityTaskFailedEventAttributes)
      list.add(requestCancelActivityTaskFailedEventAttributes);

    boolean present_activityTaskCanceledEventAttributes = true && (isSetActivityTaskCanceledEventAttributes());
    list.add(present_activityTaskCanceledEventAttributes);
    if (present_activityTaskCanceledEventAttributes)
      list.add(activityTaskCanceledEventAttributes);

    boolean present_timerCanceledEventAttributes = true && (isSetTimerCanceledEventAttributes());
    list.add(present_timerCanceledEventAttributes);
    if (present_timerCanceledEventAttributes)
      list.add(timerCanceledEventAttributes);

    boolean present_cancelTimerFailedEventAttributes = true && (isSetCancelTimerFailedEventAttributes());
    list.add(present_cancelTimerFailedEventAttributes);
    if (present_cancelTimerFailedEventAttributes)
      list.add(cancelTimerFailedEventAttributes);

    boolean present_markerRecordedEventAttributes = true && (isSetMarkerRecordedEventAttributes());
    list.add(present_markerRecordedEventAttributes);
    if (present_markerRecordedEventAttributes)
      list.add(markerRecordedEventAttributes);

    boolean present_workflowExecutionSignaledEventAttributes = true && (isSetWorkflowExecutionSignaledEventAttributes());
    list.add(present_workflowExecutionSignaledEventAttributes);
    if (present_workflowExecutionSignaledEventAttributes)
      list.add(workflowExecutionSignaledEventAttributes);

    boolean present_workflowExecutionTerminatedEventAttributes = true && (isSetWorkflowExecutionTerminatedEventAttributes());
    list.add(present_workflowExecutionTerminatedEventAttributes);
    if (present_workflowExecutionTerminatedEventAttributes)
      list.add(workflowExecutionTerminatedEventAttributes);

    boolean present_workflowExecutionCancelRequestedEventAttributes = true && (isSetWorkflowExecutionCancelRequestedEventAttributes());
    list.add(present_workflowExecutionCancelRequestedEventAttributes);
    if (present_workflowExecutionCancelRequestedEventAttributes)
      list.add(workflowExecutionCancelRequestedEventAttributes);

    boolean present_workflowExecutionCanceledEventAttributes = true && (isSetWorkflowExecutionCanceledEventAttributes());
    list.add(present_workflowExecutionCanceledEventAttributes);
    if (present_workflowExecutionCanceledEventAttributes)
      list.add(workflowExecutionCanceledEventAttributes);

    boolean present_requestCancelExternalWorkflowExecutionInitiatedEventAttributes = true && (isSetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes());
    list.add(present_requestCancelExternalWorkflowExecutionInitiatedEventAttributes);
    if (present_requestCancelExternalWorkflowExecutionInitiatedEventAttributes)
      list.add(requestCancelExternalWorkflowExecutionInitiatedEventAttributes);

    boolean present_requestCancelExternalWorkflowExecutionFailedEventAttributes = true && (isSetRequestCancelExternalWorkflowExecutionFailedEventAttributes());
    list.add(present_requestCancelExternalWorkflowExecutionFailedEventAttributes);
    if (present_requestCancelExternalWorkflowExecutionFailedEventAttributes)
      list.add(requestCancelExternalWorkflowExecutionFailedEventAttributes);

    boolean present_externalWorkflowExecutionCancelRequestedEventAttributes = true && (isSetExternalWorkflowExecutionCancelRequestedEventAttributes());
    list.add(present_externalWorkflowExecutionCancelRequestedEventAttributes);
    if (present_externalWorkflowExecutionCancelRequestedEventAttributes)
      list.add(externalWorkflowExecutionCancelRequestedEventAttributes);

    boolean present_workflowExecutionContinuedAsNewEventAttributes = true && (isSetWorkflowExecutionContinuedAsNewEventAttributes());
    list.add(present_workflowExecutionContinuedAsNewEventAttributes);
    if (present_workflowExecutionContinuedAsNewEventAttributes)
      list.add(workflowExecutionContinuedAsNewEventAttributes);

    boolean present_startChildWorkflowExecutionInitiatedEventAttributes = true && (isSetStartChildWorkflowExecutionInitiatedEventAttributes());
    list.add(present_startChildWorkflowExecutionInitiatedEventAttributes);
    if (present_startChildWorkflowExecutionInitiatedEventAttributes)
      list.add(startChildWorkflowExecutionInitiatedEventAttributes);

    boolean present_startChildWorkflowExecutionFailedEventAttributes = true && (isSetStartChildWorkflowExecutionFailedEventAttributes());
    list.add(present_startChildWorkflowExecutionFailedEventAttributes);
    if (present_startChildWorkflowExecutionFailedEventAttributes)
      list.add(startChildWorkflowExecutionFailedEventAttributes);

    boolean present_childWorkflowExecutionStartedEventAttributes = true && (isSetChildWorkflowExecutionStartedEventAttributes());
    list.add(present_childWorkflowExecutionStartedEventAttributes);
    if (present_childWorkflowExecutionStartedEventAttributes)
      list.add(childWorkflowExecutionStartedEventAttributes);

    boolean present_childWorkflowExecutionCompletedEventAttributes = true && (isSetChildWorkflowExecutionCompletedEventAttributes());
    list.add(present_childWorkflowExecutionCompletedEventAttributes);
    if (present_childWorkflowExecutionCompletedEventAttributes)
      list.add(childWorkflowExecutionCompletedEventAttributes);

    boolean present_childWorkflowExecutionFailedEventAttributes = true && (isSetChildWorkflowExecutionFailedEventAttributes());
    list.add(present_childWorkflowExecutionFailedEventAttributes);
    if (present_childWorkflowExecutionFailedEventAttributes)
      list.add(childWorkflowExecutionFailedEventAttributes);

    boolean present_childWorkflowExecutionCanceledEventAttributes = true && (isSetChildWorkflowExecutionCanceledEventAttributes());
    list.add(present_childWorkflowExecutionCanceledEventAttributes);
    if (present_childWorkflowExecutionCanceledEventAttributes)
      list.add(childWorkflowExecutionCanceledEventAttributes);

    boolean present_childWorkflowExecutionTimedOutEventAttributes = true && (isSetChildWorkflowExecutionTimedOutEventAttributes());
    list.add(present_childWorkflowExecutionTimedOutEventAttributes);
    if (present_childWorkflowExecutionTimedOutEventAttributes)
      list.add(childWorkflowExecutionTimedOutEventAttributes);

    boolean present_childWorkflowExecutionTerminatedEventAttributes = true && (isSetChildWorkflowExecutionTerminatedEventAttributes());
    list.add(present_childWorkflowExecutionTerminatedEventAttributes);
    if (present_childWorkflowExecutionTerminatedEventAttributes)
      list.add(childWorkflowExecutionTerminatedEventAttributes);

    boolean present_signalExternalWorkflowExecutionInitiatedEventAttributes = true && (isSetSignalExternalWorkflowExecutionInitiatedEventAttributes());
    list.add(present_signalExternalWorkflowExecutionInitiatedEventAttributes);
    if (present_signalExternalWorkflowExecutionInitiatedEventAttributes)
      list.add(signalExternalWorkflowExecutionInitiatedEventAttributes);

    boolean present_signalExternalWorkflowExecutionFailedEventAttributes = true && (isSetSignalExternalWorkflowExecutionFailedEventAttributes());
    list.add(present_signalExternalWorkflowExecutionFailedEventAttributes);
    if (present_signalExternalWorkflowExecutionFailedEventAttributes)
      list.add(signalExternalWorkflowExecutionFailedEventAttributes);

    boolean present_externalWorkflowExecutionSignaledEventAttributes = true && (isSetExternalWorkflowExecutionSignaledEventAttributes());
    list.add(present_externalWorkflowExecutionSignaledEventAttributes);
    if (present_externalWorkflowExecutionSignaledEventAttributes)
      list.add(externalWorkflowExecutionSignaledEventAttributes);

    return list.hashCode();
  }

  @Override
  public int compareTo(HistoryEvent other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetEventId()).compareTo(other.isSetEventId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEventId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventId, other.eventId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimestamp()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetEventType()).compareTo(other.isSetEventType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEventType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, other.eventType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVersion()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTaskId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetWorkflowExecutionStartedEventAttributes()).compareTo(other.isSetWorkflowExecutionStartedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWorkflowExecutionStartedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowExecutionStartedEventAttributes, other.workflowExecutionStartedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetWorkflowExecutionCompletedEventAttributes()).compareTo(other.isSetWorkflowExecutionCompletedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWorkflowExecutionCompletedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowExecutionCompletedEventAttributes, other.workflowExecutionCompletedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetWorkflowExecutionFailedEventAttributes()).compareTo(other.isSetWorkflowExecutionFailedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWorkflowExecutionFailedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowExecutionFailedEventAttributes, other.workflowExecutionFailedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetWorkflowExecutionTimedOutEventAttributes()).compareTo(other.isSetWorkflowExecutionTimedOutEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWorkflowExecutionTimedOutEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowExecutionTimedOutEventAttributes, other.workflowExecutionTimedOutEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDecisionTaskScheduledEventAttributes()).compareTo(other.isSetDecisionTaskScheduledEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDecisionTaskScheduledEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.decisionTaskScheduledEventAttributes, other.decisionTaskScheduledEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDecisionTaskStartedEventAttributes()).compareTo(other.isSetDecisionTaskStartedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDecisionTaskStartedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.decisionTaskStartedEventAttributes, other.decisionTaskStartedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDecisionTaskCompletedEventAttributes()).compareTo(other.isSetDecisionTaskCompletedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDecisionTaskCompletedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.decisionTaskCompletedEventAttributes, other.decisionTaskCompletedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDecisionTaskTimedOutEventAttributes()).compareTo(other.isSetDecisionTaskTimedOutEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDecisionTaskTimedOutEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.decisionTaskTimedOutEventAttributes, other.decisionTaskTimedOutEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDecisionTaskFailedEventAttributes()).compareTo(other.isSetDecisionTaskFailedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDecisionTaskFailedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.decisionTaskFailedEventAttributes, other.decisionTaskFailedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetActivityTaskScheduledEventAttributes()).compareTo(other.isSetActivityTaskScheduledEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetActivityTaskScheduledEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activityTaskScheduledEventAttributes, other.activityTaskScheduledEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetActivityTaskStartedEventAttributes()).compareTo(other.isSetActivityTaskStartedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetActivityTaskStartedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activityTaskStartedEventAttributes, other.activityTaskStartedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetActivityTaskCompletedEventAttributes()).compareTo(other.isSetActivityTaskCompletedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetActivityTaskCompletedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activityTaskCompletedEventAttributes, other.activityTaskCompletedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetActivityTaskFailedEventAttributes()).compareTo(other.isSetActivityTaskFailedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetActivityTaskFailedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activityTaskFailedEventAttributes, other.activityTaskFailedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetActivityTaskTimedOutEventAttributes()).compareTo(other.isSetActivityTaskTimedOutEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetActivityTaskTimedOutEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activityTaskTimedOutEventAttributes, other.activityTaskTimedOutEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTimerStartedEventAttributes()).compareTo(other.isSetTimerStartedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimerStartedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timerStartedEventAttributes, other.timerStartedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTimerFiredEventAttributes()).compareTo(other.isSetTimerFiredEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimerFiredEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timerFiredEventAttributes, other.timerFiredEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetActivityTaskCancelRequestedEventAttributes()).compareTo(other.isSetActivityTaskCancelRequestedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetActivityTaskCancelRequestedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activityTaskCancelRequestedEventAttributes, other.activityTaskCancelRequestedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRequestCancelActivityTaskFailedEventAttributes()).compareTo(other.isSetRequestCancelActivityTaskFailedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRequestCancelActivityTaskFailedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestCancelActivityTaskFailedEventAttributes, other.requestCancelActivityTaskFailedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetActivityTaskCanceledEventAttributes()).compareTo(other.isSetActivityTaskCanceledEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetActivityTaskCanceledEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activityTaskCanceledEventAttributes, other.activityTaskCanceledEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTimerCanceledEventAttributes()).compareTo(other.isSetTimerCanceledEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimerCanceledEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timerCanceledEventAttributes, other.timerCanceledEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCancelTimerFailedEventAttributes()).compareTo(other.isSetCancelTimerFailedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCancelTimerFailedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cancelTimerFailedEventAttributes, other.cancelTimerFailedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMarkerRecordedEventAttributes()).compareTo(other.isSetMarkerRecordedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMarkerRecordedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.markerRecordedEventAttributes, other.markerRecordedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetWorkflowExecutionSignaledEventAttributes()).compareTo(other.isSetWorkflowExecutionSignaledEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWorkflowExecutionSignaledEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowExecutionSignaledEventAttributes, other.workflowExecutionSignaledEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetWorkflowExecutionTerminatedEventAttributes()).compareTo(other.isSetWorkflowExecutionTerminatedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWorkflowExecutionTerminatedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowExecutionTerminatedEventAttributes, other.workflowExecutionTerminatedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetWorkflowExecutionCancelRequestedEventAttributes()).compareTo(other.isSetWorkflowExecutionCancelRequestedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWorkflowExecutionCancelRequestedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowExecutionCancelRequestedEventAttributes, other.workflowExecutionCancelRequestedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetWorkflowExecutionCanceledEventAttributes()).compareTo(other.isSetWorkflowExecutionCanceledEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWorkflowExecutionCanceledEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowExecutionCanceledEventAttributes, other.workflowExecutionCanceledEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes()).compareTo(other.isSetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestCancelExternalWorkflowExecutionInitiatedEventAttributes, other.requestCancelExternalWorkflowExecutionInitiatedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRequestCancelExternalWorkflowExecutionFailedEventAttributes()).compareTo(other.isSetRequestCancelExternalWorkflowExecutionFailedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRequestCancelExternalWorkflowExecutionFailedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestCancelExternalWorkflowExecutionFailedEventAttributes, other.requestCancelExternalWorkflowExecutionFailedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetExternalWorkflowExecutionCancelRequestedEventAttributes()).compareTo(other.isSetExternalWorkflowExecutionCancelRequestedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetExternalWorkflowExecutionCancelRequestedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.externalWorkflowExecutionCancelRequestedEventAttributes, other.externalWorkflowExecutionCancelRequestedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetWorkflowExecutionContinuedAsNewEventAttributes()).compareTo(other.isSetWorkflowExecutionContinuedAsNewEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWorkflowExecutionContinuedAsNewEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowExecutionContinuedAsNewEventAttributes, other.workflowExecutionContinuedAsNewEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStartChildWorkflowExecutionInitiatedEventAttributes()).compareTo(other.isSetStartChildWorkflowExecutionInitiatedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStartChildWorkflowExecutionInitiatedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startChildWorkflowExecutionInitiatedEventAttributes, other.startChildWorkflowExecutionInitiatedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStartChildWorkflowExecutionFailedEventAttributes()).compareTo(other.isSetStartChildWorkflowExecutionFailedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStartChildWorkflowExecutionFailedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startChildWorkflowExecutionFailedEventAttributes, other.startChildWorkflowExecutionFailedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetChildWorkflowExecutionStartedEventAttributes()).compareTo(other.isSetChildWorkflowExecutionStartedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetChildWorkflowExecutionStartedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.childWorkflowExecutionStartedEventAttributes, other.childWorkflowExecutionStartedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetChildWorkflowExecutionCompletedEventAttributes()).compareTo(other.isSetChildWorkflowExecutionCompletedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetChildWorkflowExecutionCompletedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.childWorkflowExecutionCompletedEventAttributes, other.childWorkflowExecutionCompletedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetChildWorkflowExecutionFailedEventAttributes()).compareTo(other.isSetChildWorkflowExecutionFailedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetChildWorkflowExecutionFailedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.childWorkflowExecutionFailedEventAttributes, other.childWorkflowExecutionFailedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetChildWorkflowExecutionCanceledEventAttributes()).compareTo(other.isSetChildWorkflowExecutionCanceledEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetChildWorkflowExecutionCanceledEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.childWorkflowExecutionCanceledEventAttributes, other.childWorkflowExecutionCanceledEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetChildWorkflowExecutionTimedOutEventAttributes()).compareTo(other.isSetChildWorkflowExecutionTimedOutEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetChildWorkflowExecutionTimedOutEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.childWorkflowExecutionTimedOutEventAttributes, other.childWorkflowExecutionTimedOutEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetChildWorkflowExecutionTerminatedEventAttributes()).compareTo(other.isSetChildWorkflowExecutionTerminatedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetChildWorkflowExecutionTerminatedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.childWorkflowExecutionTerminatedEventAttributes, other.childWorkflowExecutionTerminatedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSignalExternalWorkflowExecutionInitiatedEventAttributes()).compareTo(other.isSetSignalExternalWorkflowExecutionInitiatedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSignalExternalWorkflowExecutionInitiatedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.signalExternalWorkflowExecutionInitiatedEventAttributes, other.signalExternalWorkflowExecutionInitiatedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSignalExternalWorkflowExecutionFailedEventAttributes()).compareTo(other.isSetSignalExternalWorkflowExecutionFailedEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSignalExternalWorkflowExecutionFailedEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.signalExternalWorkflowExecutionFailedEventAttributes, other.signalExternalWorkflowExecutionFailedEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetExternalWorkflowExecutionSignaledEventAttributes()).compareTo(other.isSetExternalWorkflowExecutionSignaledEventAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetExternalWorkflowExecutionSignaledEventAttributes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.externalWorkflowExecutionSignaledEventAttributes, other.externalWorkflowExecutionSignaledEventAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("HistoryEvent(");
    boolean first = true;

    if (isSetEventId()) {
      sb.append("eventId:");
      sb.append(this.eventId);
      first = false;
    }
    if (isSetTimestamp()) {
      if (!first) sb.append(", ");
      sb.append("timestamp:");
      sb.append(this.timestamp);
      first = false;
    }
    if (isSetEventType()) {
      if (!first) sb.append(", ");
      sb.append("eventType:");
      if (this.eventType == null) {
        sb.append("null");
      } else {
        sb.append(this.eventType);
      }
      first = false;
    }
    if (isSetVersion()) {
      if (!first) sb.append(", ");
      sb.append("version:");
      sb.append(this.version);
      first = false;
    }
    if (isSetTaskId()) {
      if (!first) sb.append(", ");
      sb.append("taskId:");
      sb.append(this.taskId);
      first = false;
    }
    if (isSetWorkflowExecutionStartedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("workflowExecutionStartedEventAttributes:");
      if (this.workflowExecutionStartedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.workflowExecutionStartedEventAttributes);
      }
      first = false;
    }
    if (isSetWorkflowExecutionCompletedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("workflowExecutionCompletedEventAttributes:");
      if (this.workflowExecutionCompletedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.workflowExecutionCompletedEventAttributes);
      }
      first = false;
    }
    if (isSetWorkflowExecutionFailedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("workflowExecutionFailedEventAttributes:");
      if (this.workflowExecutionFailedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.workflowExecutionFailedEventAttributes);
      }
      first = false;
    }
    if (isSetWorkflowExecutionTimedOutEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("workflowExecutionTimedOutEventAttributes:");
      if (this.workflowExecutionTimedOutEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.workflowExecutionTimedOutEventAttributes);
      }
      first = false;
    }
    if (isSetDecisionTaskScheduledEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("decisionTaskScheduledEventAttributes:");
      if (this.decisionTaskScheduledEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.decisionTaskScheduledEventAttributes);
      }
      first = false;
    }
    if (isSetDecisionTaskStartedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("decisionTaskStartedEventAttributes:");
      if (this.decisionTaskStartedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.decisionTaskStartedEventAttributes);
      }
      first = false;
    }
    if (isSetDecisionTaskCompletedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("decisionTaskCompletedEventAttributes:");
      if (this.decisionTaskCompletedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.decisionTaskCompletedEventAttributes);
      }
      first = false;
    }
    if (isSetDecisionTaskTimedOutEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("decisionTaskTimedOutEventAttributes:");
      if (this.decisionTaskTimedOutEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.decisionTaskTimedOutEventAttributes);
      }
      first = false;
    }
    if (isSetDecisionTaskFailedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("decisionTaskFailedEventAttributes:");
      if (this.decisionTaskFailedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.decisionTaskFailedEventAttributes);
      }
      first = false;
    }
    if (isSetActivityTaskScheduledEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("activityTaskScheduledEventAttributes:");
      if (this.activityTaskScheduledEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.activityTaskScheduledEventAttributes);
      }
      first = false;
    }
    if (isSetActivityTaskStartedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("activityTaskStartedEventAttributes:");
      if (this.activityTaskStartedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.activityTaskStartedEventAttributes);
      }
      first = false;
    }
    if (isSetActivityTaskCompletedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("activityTaskCompletedEventAttributes:");
      if (this.activityTaskCompletedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.activityTaskCompletedEventAttributes);
      }
      first = false;
    }
    if (isSetActivityTaskFailedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("activityTaskFailedEventAttributes:");
      if (this.activityTaskFailedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.activityTaskFailedEventAttributes);
      }
      first = false;
    }
    if (isSetActivityTaskTimedOutEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("activityTaskTimedOutEventAttributes:");
      if (this.activityTaskTimedOutEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.activityTaskTimedOutEventAttributes);
      }
      first = false;
    }
    if (isSetTimerStartedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("timerStartedEventAttributes:");
      if (this.timerStartedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.timerStartedEventAttributes);
      }
      first = false;
    }
    if (isSetTimerFiredEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("timerFiredEventAttributes:");
      if (this.timerFiredEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.timerFiredEventAttributes);
      }
      first = false;
    }
    if (isSetActivityTaskCancelRequestedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("activityTaskCancelRequestedEventAttributes:");
      if (this.activityTaskCancelRequestedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.activityTaskCancelRequestedEventAttributes);
      }
      first = false;
    }
    if (isSetRequestCancelActivityTaskFailedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("requestCancelActivityTaskFailedEventAttributes:");
      if (this.requestCancelActivityTaskFailedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.requestCancelActivityTaskFailedEventAttributes);
      }
      first = false;
    }
    if (isSetActivityTaskCanceledEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("activityTaskCanceledEventAttributes:");
      if (this.activityTaskCanceledEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.activityTaskCanceledEventAttributes);
      }
      first = false;
    }
    if (isSetTimerCanceledEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("timerCanceledEventAttributes:");
      if (this.timerCanceledEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.timerCanceledEventAttributes);
      }
      first = false;
    }
    if (isSetCancelTimerFailedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("cancelTimerFailedEventAttributes:");
      if (this.cancelTimerFailedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.cancelTimerFailedEventAttributes);
      }
      first = false;
    }
    if (isSetMarkerRecordedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("markerRecordedEventAttributes:");
      if (this.markerRecordedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.markerRecordedEventAttributes);
      }
      first = false;
    }
    if (isSetWorkflowExecutionSignaledEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("workflowExecutionSignaledEventAttributes:");
      if (this.workflowExecutionSignaledEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.workflowExecutionSignaledEventAttributes);
      }
      first = false;
    }
    if (isSetWorkflowExecutionTerminatedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("workflowExecutionTerminatedEventAttributes:");
      if (this.workflowExecutionTerminatedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.workflowExecutionTerminatedEventAttributes);
      }
      first = false;
    }
    if (isSetWorkflowExecutionCancelRequestedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("workflowExecutionCancelRequestedEventAttributes:");
      if (this.workflowExecutionCancelRequestedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.workflowExecutionCancelRequestedEventAttributes);
      }
      first = false;
    }
    if (isSetWorkflowExecutionCanceledEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("workflowExecutionCanceledEventAttributes:");
      if (this.workflowExecutionCanceledEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.workflowExecutionCanceledEventAttributes);
      }
      first = false;
    }
    if (isSetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("requestCancelExternalWorkflowExecutionInitiatedEventAttributes:");
      if (this.requestCancelExternalWorkflowExecutionInitiatedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.requestCancelExternalWorkflowExecutionInitiatedEventAttributes);
      }
      first = false;
    }
    if (isSetRequestCancelExternalWorkflowExecutionFailedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("requestCancelExternalWorkflowExecutionFailedEventAttributes:");
      if (this.requestCancelExternalWorkflowExecutionFailedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.requestCancelExternalWorkflowExecutionFailedEventAttributes);
      }
      first = false;
    }
    if (isSetExternalWorkflowExecutionCancelRequestedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("externalWorkflowExecutionCancelRequestedEventAttributes:");
      if (this.externalWorkflowExecutionCancelRequestedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.externalWorkflowExecutionCancelRequestedEventAttributes);
      }
      first = false;
    }
    if (isSetWorkflowExecutionContinuedAsNewEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("workflowExecutionContinuedAsNewEventAttributes:");
      if (this.workflowExecutionContinuedAsNewEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.workflowExecutionContinuedAsNewEventAttributes);
      }
      first = false;
    }
    if (isSetStartChildWorkflowExecutionInitiatedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("startChildWorkflowExecutionInitiatedEventAttributes:");
      if (this.startChildWorkflowExecutionInitiatedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.startChildWorkflowExecutionInitiatedEventAttributes);
      }
      first = false;
    }
    if (isSetStartChildWorkflowExecutionFailedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("startChildWorkflowExecutionFailedEventAttributes:");
      if (this.startChildWorkflowExecutionFailedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.startChildWorkflowExecutionFailedEventAttributes);
      }
      first = false;
    }
    if (isSetChildWorkflowExecutionStartedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("childWorkflowExecutionStartedEventAttributes:");
      if (this.childWorkflowExecutionStartedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.childWorkflowExecutionStartedEventAttributes);
      }
      first = false;
    }
    if (isSetChildWorkflowExecutionCompletedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("childWorkflowExecutionCompletedEventAttributes:");
      if (this.childWorkflowExecutionCompletedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.childWorkflowExecutionCompletedEventAttributes);
      }
      first = false;
    }
    if (isSetChildWorkflowExecutionFailedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("childWorkflowExecutionFailedEventAttributes:");
      if (this.childWorkflowExecutionFailedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.childWorkflowExecutionFailedEventAttributes);
      }
      first = false;
    }
    if (isSetChildWorkflowExecutionCanceledEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("childWorkflowExecutionCanceledEventAttributes:");
      if (this.childWorkflowExecutionCanceledEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.childWorkflowExecutionCanceledEventAttributes);
      }
      first = false;
    }
    if (isSetChildWorkflowExecutionTimedOutEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("childWorkflowExecutionTimedOutEventAttributes:");
      if (this.childWorkflowExecutionTimedOutEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.childWorkflowExecutionTimedOutEventAttributes);
      }
      first = false;
    }
    if (isSetChildWorkflowExecutionTerminatedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("childWorkflowExecutionTerminatedEventAttributes:");
      if (this.childWorkflowExecutionTerminatedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.childWorkflowExecutionTerminatedEventAttributes);
      }
      first = false;
    }
    if (isSetSignalExternalWorkflowExecutionInitiatedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("signalExternalWorkflowExecutionInitiatedEventAttributes:");
      if (this.signalExternalWorkflowExecutionInitiatedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.signalExternalWorkflowExecutionInitiatedEventAttributes);
      }
      first = false;
    }
    if (isSetSignalExternalWorkflowExecutionFailedEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("signalExternalWorkflowExecutionFailedEventAttributes:");
      if (this.signalExternalWorkflowExecutionFailedEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.signalExternalWorkflowExecutionFailedEventAttributes);
      }
      first = false;
    }
    if (isSetExternalWorkflowExecutionSignaledEventAttributes()) {
      if (!first) sb.append(", ");
      sb.append("externalWorkflowExecutionSignaledEventAttributes:");
      if (this.externalWorkflowExecutionSignaledEventAttributes == null) {
        sb.append("null");
      } else {
        sb.append(this.externalWorkflowExecutionSignaledEventAttributes);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
    if (workflowExecutionStartedEventAttributes != null) {
      workflowExecutionStartedEventAttributes.validate();
    }
    if (workflowExecutionCompletedEventAttributes != null) {
      workflowExecutionCompletedEventAttributes.validate();
    }
    if (workflowExecutionFailedEventAttributes != null) {
      workflowExecutionFailedEventAttributes.validate();
    }
    if (workflowExecutionTimedOutEventAttributes != null) {
      workflowExecutionTimedOutEventAttributes.validate();
    }
    if (decisionTaskScheduledEventAttributes != null) {
      decisionTaskScheduledEventAttributes.validate();
    }
    if (decisionTaskStartedEventAttributes != null) {
      decisionTaskStartedEventAttributes.validate();
    }
    if (decisionTaskCompletedEventAttributes != null) {
      decisionTaskCompletedEventAttributes.validate();
    }
    if (decisionTaskTimedOutEventAttributes != null) {
      decisionTaskTimedOutEventAttributes.validate();
    }
    if (decisionTaskFailedEventAttributes != null) {
      decisionTaskFailedEventAttributes.validate();
    }
    if (activityTaskScheduledEventAttributes != null) {
      activityTaskScheduledEventAttributes.validate();
    }
    if (activityTaskStartedEventAttributes != null) {
      activityTaskStartedEventAttributes.validate();
    }
    if (activityTaskCompletedEventAttributes != null) {
      activityTaskCompletedEventAttributes.validate();
    }
    if (activityTaskFailedEventAttributes != null) {
      activityTaskFailedEventAttributes.validate();
    }
    if (activityTaskTimedOutEventAttributes != null) {
      activityTaskTimedOutEventAttributes.validate();
    }
    if (timerStartedEventAttributes != null) {
      timerStartedEventAttributes.validate();
    }
    if (timerFiredEventAttributes != null) {
      timerFiredEventAttributes.validate();
    }
    if (activityTaskCancelRequestedEventAttributes != null) {
      activityTaskCancelRequestedEventAttributes.validate();
    }
    if (requestCancelActivityTaskFailedEventAttributes != null) {
      requestCancelActivityTaskFailedEventAttributes.validate();
    }
    if (activityTaskCanceledEventAttributes != null) {
      activityTaskCanceledEventAttributes.validate();
    }
    if (timerCanceledEventAttributes != null) {
      timerCanceledEventAttributes.validate();
    }
    if (cancelTimerFailedEventAttributes != null) {
      cancelTimerFailedEventAttributes.validate();
    }
    if (markerRecordedEventAttributes != null) {
      markerRecordedEventAttributes.validate();
    }
    if (workflowExecutionSignaledEventAttributes != null) {
      workflowExecutionSignaledEventAttributes.validate();
    }
    if (workflowExecutionTerminatedEventAttributes != null) {
      workflowExecutionTerminatedEventAttributes.validate();
    }
    if (workflowExecutionCancelRequestedEventAttributes != null) {
      workflowExecutionCancelRequestedEventAttributes.validate();
    }
    if (workflowExecutionCanceledEventAttributes != null) {
      workflowExecutionCanceledEventAttributes.validate();
    }
    if (requestCancelExternalWorkflowExecutionInitiatedEventAttributes != null) {
      requestCancelExternalWorkflowExecutionInitiatedEventAttributes.validate();
    }
    if (requestCancelExternalWorkflowExecutionFailedEventAttributes != null) {
      requestCancelExternalWorkflowExecutionFailedEventAttributes.validate();
    }
    if (externalWorkflowExecutionCancelRequestedEventAttributes != null) {
      externalWorkflowExecutionCancelRequestedEventAttributes.validate();
    }
    if (workflowExecutionContinuedAsNewEventAttributes != null) {
      workflowExecutionContinuedAsNewEventAttributes.validate();
    }
    if (startChildWorkflowExecutionInitiatedEventAttributes != null) {
      startChildWorkflowExecutionInitiatedEventAttributes.validate();
    }
    if (startChildWorkflowExecutionFailedEventAttributes != null) {
      startChildWorkflowExecutionFailedEventAttributes.validate();
    }
    if (childWorkflowExecutionStartedEventAttributes != null) {
      childWorkflowExecutionStartedEventAttributes.validate();
    }
    if (childWorkflowExecutionCompletedEventAttributes != null) {
      childWorkflowExecutionCompletedEventAttributes.validate();
    }
    if (childWorkflowExecutionFailedEventAttributes != null) {
      childWorkflowExecutionFailedEventAttributes.validate();
    }
    if (childWorkflowExecutionCanceledEventAttributes != null) {
      childWorkflowExecutionCanceledEventAttributes.validate();
    }
    if (childWorkflowExecutionTimedOutEventAttributes != null) {
      childWorkflowExecutionTimedOutEventAttributes.validate();
    }
    if (childWorkflowExecutionTerminatedEventAttributes != null) {
      childWorkflowExecutionTerminatedEventAttributes.validate();
    }
    if (signalExternalWorkflowExecutionInitiatedEventAttributes != null) {
      signalExternalWorkflowExecutionInitiatedEventAttributes.validate();
    }
    if (signalExternalWorkflowExecutionFailedEventAttributes != null) {
      signalExternalWorkflowExecutionFailedEventAttributes.validate();
    }
    if (externalWorkflowExecutionSignaledEventAttributes != null) {
      externalWorkflowExecutionSignaledEventAttributes.validate();
    }
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class HistoryEventStandardSchemeFactory implements SchemeFactory {
    public HistoryEventStandardScheme getScheme() {
      return new HistoryEventStandardScheme();
    }
  }

  private static class HistoryEventStandardScheme extends StandardScheme {

    public void read(org.apache.thrift.protocol.TProtocol iprot, HistoryEvent struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (schemeField.id) {
          case 10: // EVENT_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.eventId = iprot.readI64();
              struct.setEventIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 20: // TIMESTAMP
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.timestamp = iprot.readI64();
              struct.setTimestampIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 30: // EVENT_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.eventType = com.uber.cadence.EventType.findByValue(iprot.readI32());
              struct.setEventTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 35: // VERSION
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.version = iprot.readI64();
              struct.setVersionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 36: // TASK_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.taskId = iprot.readI64();
              struct.setTaskIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 40: // WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.workflowExecutionStartedEventAttributes = new WorkflowExecutionStartedEventAttributes();
              struct.workflowExecutionStartedEventAttributes.read(iprot);
              struct.setWorkflowExecutionStartedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 50: // WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.workflowExecutionCompletedEventAttributes = new WorkflowExecutionCompletedEventAttributes();
              struct.workflowExecutionCompletedEventAttributes.read(iprot);
              struct.setWorkflowExecutionCompletedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 60: // WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.workflowExecutionFailedEventAttributes = new WorkflowExecutionFailedEventAttributes();
              struct.workflowExecutionFailedEventAttributes.read(iprot);
              struct.setWorkflowExecutionFailedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 70: // WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.workflowExecutionTimedOutEventAttributes = new WorkflowExecutionTimedOutEventAttributes();
              struct.workflowExecutionTimedOutEventAttributes.read(iprot);
              struct.setWorkflowExecutionTimedOutEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 80: // DECISION_TASK_SCHEDULED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.decisionTaskScheduledEventAttributes = new DecisionTaskScheduledEventAttributes();
              struct.decisionTaskScheduledEventAttributes.read(iprot);
              struct.setDecisionTaskScheduledEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 90: // DECISION_TASK_STARTED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.decisionTaskStartedEventAttributes = new DecisionTaskStartedEventAttributes();
              struct.decisionTaskStartedEventAttributes.read(iprot);
              struct.setDecisionTaskStartedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 100: // DECISION_TASK_COMPLETED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.decisionTaskCompletedEventAttributes = new DecisionTaskCompletedEventAttributes();
              struct.decisionTaskCompletedEventAttributes.read(iprot);
              struct.setDecisionTaskCompletedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 110: // DECISION_TASK_TIMED_OUT_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.decisionTaskTimedOutEventAttributes = new DecisionTaskTimedOutEventAttributes();
              struct.decisionTaskTimedOutEventAttributes.read(iprot);
              struct.setDecisionTaskTimedOutEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 120: // DECISION_TASK_FAILED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.decisionTaskFailedEventAttributes = new DecisionTaskFailedEventAttributes();
              struct.decisionTaskFailedEventAttributes.read(iprot);
              struct.setDecisionTaskFailedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 130: // ACTIVITY_TASK_SCHEDULED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.activityTaskScheduledEventAttributes = new ActivityTaskScheduledEventAttributes();
              struct.activityTaskScheduledEventAttributes.read(iprot);
              struct.setActivityTaskScheduledEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 140: // ACTIVITY_TASK_STARTED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.activityTaskStartedEventAttributes = new ActivityTaskStartedEventAttributes();
              struct.activityTaskStartedEventAttributes.read(iprot);
              struct.setActivityTaskStartedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 150: // ACTIVITY_TASK_COMPLETED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.activityTaskCompletedEventAttributes = new ActivityTaskCompletedEventAttributes();
              struct.activityTaskCompletedEventAttributes.read(iprot);
              struct.setActivityTaskCompletedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 160: // ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.activityTaskFailedEventAttributes = new ActivityTaskFailedEventAttributes();
              struct.activityTaskFailedEventAttributes.read(iprot);
              struct.setActivityTaskFailedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 170: // ACTIVITY_TASK_TIMED_OUT_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.activityTaskTimedOutEventAttributes = new ActivityTaskTimedOutEventAttributes();
              struct.activityTaskTimedOutEventAttributes.read(iprot);
              struct.setActivityTaskTimedOutEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 180: // TIMER_STARTED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.timerStartedEventAttributes = new TimerStartedEventAttributes();
              struct.timerStartedEventAttributes.read(iprot);
              struct.setTimerStartedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 190: // TIMER_FIRED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.timerFiredEventAttributes = new TimerFiredEventAttributes();
              struct.timerFiredEventAttributes.read(iprot);
              struct.setTimerFiredEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 200: // ACTIVITY_TASK_CANCEL_REQUESTED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.activityTaskCancelRequestedEventAttributes = new ActivityTaskCancelRequestedEventAttributes();
              struct.activityTaskCancelRequestedEventAttributes.read(iprot);
              struct.setActivityTaskCancelRequestedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 210: // REQUEST_CANCEL_ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.requestCancelActivityTaskFailedEventAttributes = new RequestCancelActivityTaskFailedEventAttributes();
              struct.requestCancelActivityTaskFailedEventAttributes.read(iprot);
              struct.setRequestCancelActivityTaskFailedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 220: // ACTIVITY_TASK_CANCELED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.activityTaskCanceledEventAttributes = new ActivityTaskCanceledEventAttributes();
              struct.activityTaskCanceledEventAttributes.read(iprot);
              struct.setActivityTaskCanceledEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 230: // TIMER_CANCELED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.timerCanceledEventAttributes = new TimerCanceledEventAttributes();
              struct.timerCanceledEventAttributes.read(iprot);
              struct.setTimerCanceledEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 240: // CANCEL_TIMER_FAILED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.cancelTimerFailedEventAttributes = new CancelTimerFailedEventAttributes();
              struct.cancelTimerFailedEventAttributes.read(iprot);
              struct.setCancelTimerFailedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 250: // MARKER_RECORDED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.markerRecordedEventAttributes = new MarkerRecordedEventAttributes();
              struct.markerRecordedEventAttributes.read(iprot);
              struct.setMarkerRecordedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 260: // WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.workflowExecutionSignaledEventAttributes = new WorkflowExecutionSignaledEventAttributes();
              struct.workflowExecutionSignaledEventAttributes.read(iprot);
              struct.setWorkflowExecutionSignaledEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 270: // WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.workflowExecutionTerminatedEventAttributes = new WorkflowExecutionTerminatedEventAttributes();
              struct.workflowExecutionTerminatedEventAttributes.read(iprot);
              struct.setWorkflowExecutionTerminatedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 280: // WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.workflowExecutionCancelRequestedEventAttributes = new WorkflowExecutionCancelRequestedEventAttributes();
              struct.workflowExecutionCancelRequestedEventAttributes.read(iprot);
              struct.setWorkflowExecutionCancelRequestedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 290: // WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.workflowExecutionCanceledEventAttributes = new WorkflowExecutionCanceledEventAttributes();
              struct.workflowExecutionCanceledEventAttributes.read(iprot);
              struct.setWorkflowExecutionCanceledEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 300: // REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.requestCancelExternalWorkflowExecutionInitiatedEventAttributes = new RequestCancelExternalWorkflowExecutionInitiatedEventAttributes();
              struct.requestCancelExternalWorkflowExecutionInitiatedEventAttributes.read(iprot);
              struct.setRequestCancelExternalWorkflowExecutionInitiatedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 310: // REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.requestCancelExternalWorkflowExecutionFailedEventAttributes = new RequestCancelExternalWorkflowExecutionFailedEventAttributes();
              struct.requestCancelExternalWorkflowExecutionFailedEventAttributes.read(iprot);
              struct.setRequestCancelExternalWorkflowExecutionFailedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 320: // EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.externalWorkflowExecutionCancelRequestedEventAttributes = new ExternalWorkflowExecutionCancelRequestedEventAttributes();
              struct.externalWorkflowExecutionCancelRequestedEventAttributes.read(iprot);
              struct.setExternalWorkflowExecutionCancelRequestedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 330: // WORKFLOW_EXECUTION_CONTINUED_AS_NEW_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.workflowExecutionContinuedAsNewEventAttributes = new WorkflowExecutionContinuedAsNewEventAttributes();
              struct.workflowExecutionContinuedAsNewEventAttributes.read(iprot);
              struct.setWorkflowExecutionContinuedAsNewEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 340: // START_CHILD_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.startChildWorkflowExecutionInitiatedEventAttributes = new StartChildWorkflowExecutionInitiatedEventAttributes();
              struct.startChildWorkflowExecutionInitiatedEventAttributes.read(iprot);
              struct.setStartChildWorkflowExecutionInitiatedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 350: // START_CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.startChildWorkflowExecutionFailedEventAttributes = new StartChildWorkflowExecutionFailedEventAttributes();
              struct.startChildWorkflowExecutionFailedEventAttributes.read(iprot);
              struct.setStartChildWorkflowExecutionFailedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 360: // CHILD_WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.childWorkflowExecutionStartedEventAttributes = new ChildWorkflowExecutionStartedEventAttributes();
              struct.childWorkflowExecutionStartedEventAttributes.read(iprot);
              struct.setChildWorkflowExecutionStartedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 370: // CHILD_WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.childWorkflowExecutionCompletedEventAttributes = new ChildWorkflowExecutionCompletedEventAttributes();
              struct.childWorkflowExecutionCompletedEventAttributes.read(iprot);
              struct.setChildWorkflowExecutionCompletedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 380: // CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.childWorkflowExecutionFailedEventAttributes = new ChildWorkflowExecutionFailedEventAttributes();
              struct.childWorkflowExecutionFailedEventAttributes.read(iprot);
              struct.setChildWorkflowExecutionFailedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 390: // CHILD_WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.childWorkflowExecutionCanceledEventAttributes = new ChildWorkflowExecutionCanceledEventAttributes();
              struct.childWorkflowExecutionCanceledEventAttributes.read(iprot);
              struct.setChildWorkflowExecutionCanceledEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 400: // CHILD_WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.childWorkflowExecutionTimedOutEventAttributes = new ChildWorkflowExecutionTimedOutEventAttributes();
              struct.childWorkflowExecutionTimedOutEventAttributes.read(iprot);
              struct.setChildWorkflowExecutionTimedOutEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 410: // CHILD_WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.childWorkflowExecutionTerminatedEventAttributes = new ChildWorkflowExecutionTerminatedEventAttributes();
              struct.childWorkflowExecutionTerminatedEventAttributes.read(iprot);
              struct.setChildWorkflowExecutionTerminatedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 420: // SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.signalExternalWorkflowExecutionInitiatedEventAttributes = new SignalExternalWorkflowExecutionInitiatedEventAttributes();
              struct.signalExternalWorkflowExecutionInitiatedEventAttributes.read(iprot);
              struct.setSignalExternalWorkflowExecutionInitiatedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 430: // SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.signalExternalWorkflowExecutionFailedEventAttributes = new SignalExternalWorkflowExecutionFailedEventAttributes();
              struct.signalExternalWorkflowExecutionFailedEventAttributes.read(iprot);
              struct.setSignalExternalWorkflowExecutionFailedEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 440: // EXTERNAL_WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.externalWorkflowExecutionSignaledEventAttributes = new ExternalWorkflowExecutionSignaledEventAttributes();
              struct.externalWorkflowExecutionSignaledEventAttributes.read(iprot);
              struct.setExternalWorkflowExecutionSignaledEventAttributesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, HistoryEvent struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.isSetEventId()) {
        oprot.writeFieldBegin(EVENT_ID_FIELD_DESC);
        oprot.writeI64(struct.eventId);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTimestamp()) {
        oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
        oprot.writeI64(struct.timestamp);
        oprot.writeFieldEnd();
      }
      if (struct.eventType != null) {
        if (struct.isSetEventType()) {
          oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC);
          oprot.writeI32(struct.eventType.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetVersion()) {
        oprot.writeFieldBegin(VERSION_FIELD_DESC);
        oprot.writeI64(struct.version);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTaskId()) {
        oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
        oprot.writeI64(struct.taskId);
        oprot.writeFieldEnd();
      }
      if (struct.workflowExecutionStartedEventAttributes != null) {
        if (struct.isSetWorkflowExecutionStartedEventAttributes()) {
          oprot.writeFieldBegin(WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.workflowExecutionStartedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.workflowExecutionCompletedEventAttributes != null) {
        if (struct.isSetWorkflowExecutionCompletedEventAttributes()) {
          oprot.writeFieldBegin(WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.workflowExecutionCompletedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.workflowExecutionFailedEventAttributes != null) {
        if (struct.isSetWorkflowExecutionFailedEventAttributes()) {
          oprot.writeFieldBegin(WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.workflowExecutionFailedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.workflowExecutionTimedOutEventAttributes != null) {
        if (struct.isSetWorkflowExecutionTimedOutEventAttributes()) {
          oprot.writeFieldBegin(WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.workflowExecutionTimedOutEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.decisionTaskScheduledEventAttributes != null) {
        if (struct.isSetDecisionTaskScheduledEventAttributes()) {
          oprot.writeFieldBegin(DECISION_TASK_SCHEDULED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.decisionTaskScheduledEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.decisionTaskStartedEventAttributes != null) {
        if (struct.isSetDecisionTaskStartedEventAttributes()) {
          oprot.writeFieldBegin(DECISION_TASK_STARTED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.decisionTaskStartedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.decisionTaskCompletedEventAttributes != null) {
        if (struct.isSetDecisionTaskCompletedEventAttributes()) {
          oprot.writeFieldBegin(DECISION_TASK_COMPLETED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.decisionTaskCompletedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.decisionTaskTimedOutEventAttributes != null) {
        if (struct.isSetDecisionTaskTimedOutEventAttributes()) {
          oprot.writeFieldBegin(DECISION_TASK_TIMED_OUT_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.decisionTaskTimedOutEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.decisionTaskFailedEventAttributes != null) {
        if (struct.isSetDecisionTaskFailedEventAttributes()) {
          oprot.writeFieldBegin(DECISION_TASK_FAILED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.decisionTaskFailedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.activityTaskScheduledEventAttributes != null) {
        if (struct.isSetActivityTaskScheduledEventAttributes()) {
          oprot.writeFieldBegin(ACTIVITY_TASK_SCHEDULED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.activityTaskScheduledEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.activityTaskStartedEventAttributes != null) {
        if (struct.isSetActivityTaskStartedEventAttributes()) {
          oprot.writeFieldBegin(ACTIVITY_TASK_STARTED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.activityTaskStartedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.activityTaskCompletedEventAttributes != null) {
        if (struct.isSetActivityTaskCompletedEventAttributes()) {
          oprot.writeFieldBegin(ACTIVITY_TASK_COMPLETED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.activityTaskCompletedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.activityTaskFailedEventAttributes != null) {
        if (struct.isSetActivityTaskFailedEventAttributes()) {
          oprot.writeFieldBegin(ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.activityTaskFailedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.activityTaskTimedOutEventAttributes != null) {
        if (struct.isSetActivityTaskTimedOutEventAttributes()) {
          oprot.writeFieldBegin(ACTIVITY_TASK_TIMED_OUT_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.activityTaskTimedOutEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.timerStartedEventAttributes != null) {
        if (struct.isSetTimerStartedEventAttributes()) {
          oprot.writeFieldBegin(TIMER_STARTED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.timerStartedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.timerFiredEventAttributes != null) {
        if (struct.isSetTimerFiredEventAttributes()) {
          oprot.writeFieldBegin(TIMER_FIRED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.timerFiredEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.activityTaskCancelRequestedEventAttributes != null) {
        if (struct.isSetActivityTaskCancelRequestedEventAttributes()) {
          oprot.writeFieldBegin(ACTIVITY_TASK_CANCEL_REQUESTED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.activityTaskCancelRequestedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.requestCancelActivityTaskFailedEventAttributes != null) {
        if (struct.isSetRequestCancelActivityTaskFailedEventAttributes()) {
          oprot.writeFieldBegin(REQUEST_CANCEL_ACTIVITY_TASK_FAILED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.requestCancelActivityTaskFailedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.activityTaskCanceledEventAttributes != null) {
        if (struct.isSetActivityTaskCanceledEventAttributes()) {
          oprot.writeFieldBegin(ACTIVITY_TASK_CANCELED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.activityTaskCanceledEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.timerCanceledEventAttributes != null) {
        if (struct.isSetTimerCanceledEventAttributes()) {
          oprot.writeFieldBegin(TIMER_CANCELED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.timerCanceledEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.cancelTimerFailedEventAttributes != null) {
        if (struct.isSetCancelTimerFailedEventAttributes()) {
          oprot.writeFieldBegin(CANCEL_TIMER_FAILED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.cancelTimerFailedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.markerRecordedEventAttributes != null) {
        if (struct.isSetMarkerRecordedEventAttributes()) {
          oprot.writeFieldBegin(MARKER_RECORDED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.markerRecordedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.workflowExecutionSignaledEventAttributes != null) {
        if (struct.isSetWorkflowExecutionSignaledEventAttributes()) {
          oprot.writeFieldBegin(WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.workflowExecutionSignaledEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.workflowExecutionTerminatedEventAttributes != null) {
        if (struct.isSetWorkflowExecutionTerminatedEventAttributes()) {
          oprot.writeFieldBegin(WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.workflowExecutionTerminatedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.workflowExecutionCancelRequestedEventAttributes != null) {
        if (struct.isSetWorkflowExecutionCancelRequestedEventAttributes()) {
          oprot.writeFieldBegin(WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.workflowExecutionCancelRequestedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.workflowExecutionCanceledEventAttributes != null) {
        if (struct.isSetWorkflowExecutionCanceledEventAttributes()) {
          oprot.writeFieldBegin(WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.workflowExecutionCanceledEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.requestCancelExternalWorkflowExecutionInitiatedEventAttributes != null) {
        if (struct.isSetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes()) {
          oprot.writeFieldBegin(REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.requestCancelExternalWorkflowExecutionInitiatedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.requestCancelExternalWorkflowExecutionFailedEventAttributes != null) {
        if (struct.isSetRequestCancelExternalWorkflowExecutionFailedEventAttributes()) {
          oprot.writeFieldBegin(REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.requestCancelExternalWorkflowExecutionFailedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.externalWorkflowExecutionCancelRequestedEventAttributes != null) {
        if (struct.isSetExternalWorkflowExecutionCancelRequestedEventAttributes()) {
          oprot.writeFieldBegin(EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.externalWorkflowExecutionCancelRequestedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.workflowExecutionContinuedAsNewEventAttributes != null) {
        if (struct.isSetWorkflowExecutionContinuedAsNewEventAttributes()) {
          oprot.writeFieldBegin(WORKFLOW_EXECUTION_CONTINUED_AS_NEW_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.workflowExecutionContinuedAsNewEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.startChildWorkflowExecutionInitiatedEventAttributes != null) {
        if (struct.isSetStartChildWorkflowExecutionInitiatedEventAttributes()) {
          oprot.writeFieldBegin(START_CHILD_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.startChildWorkflowExecutionInitiatedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.startChildWorkflowExecutionFailedEventAttributes != null) {
        if (struct.isSetStartChildWorkflowExecutionFailedEventAttributes()) {
          oprot.writeFieldBegin(START_CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.startChildWorkflowExecutionFailedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.childWorkflowExecutionStartedEventAttributes != null) {
        if (struct.isSetChildWorkflowExecutionStartedEventAttributes()) {
          oprot.writeFieldBegin(CHILD_WORKFLOW_EXECUTION_STARTED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.childWorkflowExecutionStartedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.childWorkflowExecutionCompletedEventAttributes != null) {
        if (struct.isSetChildWorkflowExecutionCompletedEventAttributes()) {
          oprot.writeFieldBegin(CHILD_WORKFLOW_EXECUTION_COMPLETED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.childWorkflowExecutionCompletedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.childWorkflowExecutionFailedEventAttributes != null) {
        if (struct.isSetChildWorkflowExecutionFailedEventAttributes()) {
          oprot.writeFieldBegin(CHILD_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.childWorkflowExecutionFailedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.childWorkflowExecutionCanceledEventAttributes != null) {
        if (struct.isSetChildWorkflowExecutionCanceledEventAttributes()) {
          oprot.writeFieldBegin(CHILD_WORKFLOW_EXECUTION_CANCELED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.childWorkflowExecutionCanceledEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.childWorkflowExecutionTimedOutEventAttributes != null) {
        if (struct.isSetChildWorkflowExecutionTimedOutEventAttributes()) {
          oprot.writeFieldBegin(CHILD_WORKFLOW_EXECUTION_TIMED_OUT_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.childWorkflowExecutionTimedOutEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.childWorkflowExecutionTerminatedEventAttributes != null) {
        if (struct.isSetChildWorkflowExecutionTerminatedEventAttributes()) {
          oprot.writeFieldBegin(CHILD_WORKFLOW_EXECUTION_TERMINATED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.childWorkflowExecutionTerminatedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.signalExternalWorkflowExecutionInitiatedEventAttributes != null) {
        if (struct.isSetSignalExternalWorkflowExecutionInitiatedEventAttributes()) {
          oprot.writeFieldBegin(SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.signalExternalWorkflowExecutionInitiatedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.signalExternalWorkflowExecutionFailedEventAttributes != null) {
        if (struct.isSetSignalExternalWorkflowExecutionFailedEventAttributes()) {
          oprot.writeFieldBegin(SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.signalExternalWorkflowExecutionFailedEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.externalWorkflowExecutionSignaledEventAttributes != null) {
        if (struct.isSetExternalWorkflowExecutionSignaledEventAttributes()) {
          oprot.writeFieldBegin(EXTERNAL_WORKFLOW_EXECUTION_SIGNALED_EVENT_ATTRIBUTES_FIELD_DESC);
          struct.externalWorkflowExecutionSignaledEventAttributes.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class HistoryEventTupleSchemeFactory implements SchemeFactory {
    public HistoryEventTupleScheme getScheme() {
      return new HistoryEventTupleScheme();
    }
  }

  private static class HistoryEventTupleScheme extends TupleScheme {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, HistoryEvent struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetEventId()) {
        optionals.set(0);
      }
      if (struct.isSetTimestamp()) {
        optionals.set(1);
      }
      if (struct.isSetEventType()) {
        optionals.set(2);
      }
      if (struct.isSetVersion()) {
        optionals.set(3);
      }
      if (struct.isSetTaskId()) {
        optionals.set(4);
      }
      if (struct.isSetWorkflowExecutionStartedEventAttributes()) {
        optionals.set(5);
      }
      if (struct.isSetWorkflowExecutionCompletedEventAttributes()) {
        optionals.set(6);
      }
      if (struct.isSetWorkflowExecutionFailedEventAttributes()) {
        optionals.set(7);
      }
      if (struct.isSetWorkflowExecutionTimedOutEventAttributes()) {
        optionals.set(8);
      }
      if (struct.isSetDecisionTaskScheduledEventAttributes()) {
        optionals.set(9);
      }
      if (struct.isSetDecisionTaskStartedEventAttributes()) {
        optionals.set(10);
      }
      if (struct.isSetDecisionTaskCompletedEventAttributes()) {
        optionals.set(11);
      }
      if (struct.isSetDecisionTaskTimedOutEventAttributes()) {
        optionals.set(12);
      }
      if (struct.isSetDecisionTaskFailedEventAttributes()) {
        optionals.set(13);
      }
      if (struct.isSetActivityTaskScheduledEventAttributes()) {
        optionals.set(14);
      }
      if (struct.isSetActivityTaskStartedEventAttributes()) {
        optionals.set(15);
      }
      if (struct.isSetActivityTaskCompletedEventAttributes()) {
        optionals.set(16);
      }
      if (struct.isSetActivityTaskFailedEventAttributes()) {
        optionals.set(17);
      }
      if (struct.isSetActivityTaskTimedOutEventAttributes()) {
        optionals.set(18);
      }
      if (struct.isSetTimerStartedEventAttributes()) {
        optionals.set(19);
      }
      if (struct.isSetTimerFiredEventAttributes()) {
        optionals.set(20);
      }
      if (struct.isSetActivityTaskCancelRequestedEventAttributes()) {
        optionals.set(21);
      }
      if (struct.isSetRequestCancelActivityTaskFailedEventAttributes()) {
        optionals.set(22);
      }
      if (struct.isSetActivityTaskCanceledEventAttributes()) {
        optionals.set(23);
      }
      if (struct.isSetTimerCanceledEventAttributes()) {
        optionals.set(24);
      }
      if (struct.isSetCancelTimerFailedEventAttributes()) {
        optionals.set(25);
      }
      if (struct.isSetMarkerRecordedEventAttributes()) {
        optionals.set(26);
      }
      if (struct.isSetWorkflowExecutionSignaledEventAttributes()) {
        optionals.set(27);
      }
      if (struct.isSetWorkflowExecutionTerminatedEventAttributes()) {
        optionals.set(28);
      }
      if (struct.isSetWorkflowExecutionCancelRequestedEventAttributes()) {
        optionals.set(29);
      }
      if (struct.isSetWorkflowExecutionCanceledEventAttributes()) {
        optionals.set(30);
      }
      if (struct.isSetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes()) {
        optionals.set(31);
      }
      if (struct.isSetRequestCancelExternalWorkflowExecutionFailedEventAttributes()) {
        optionals.set(32);
      }
      if (struct.isSetExternalWorkflowExecutionCancelRequestedEventAttributes()) {
        optionals.set(33);
      }
      if (struct.isSetWorkflowExecutionContinuedAsNewEventAttributes()) {
        optionals.set(34);
      }
      if (struct.isSetStartChildWorkflowExecutionInitiatedEventAttributes()) {
        optionals.set(35);
      }
      if (struct.isSetStartChildWorkflowExecutionFailedEventAttributes()) {
        optionals.set(36);
      }
      if (struct.isSetChildWorkflowExecutionStartedEventAttributes()) {
        optionals.set(37);
      }
      if (struct.isSetChildWorkflowExecutionCompletedEventAttributes()) {
        optionals.set(38);
      }
      if (struct.isSetChildWorkflowExecutionFailedEventAttributes()) {
        optionals.set(39);
      }
      if (struct.isSetChildWorkflowExecutionCanceledEventAttributes()) {
        optionals.set(40);
      }
      if (struct.isSetChildWorkflowExecutionTimedOutEventAttributes()) {
        optionals.set(41);
      }
      if (struct.isSetChildWorkflowExecutionTerminatedEventAttributes()) {
        optionals.set(42);
      }
      if (struct.isSetSignalExternalWorkflowExecutionInitiatedEventAttributes()) {
        optionals.set(43);
      }
      if (struct.isSetSignalExternalWorkflowExecutionFailedEventAttributes()) {
        optionals.set(44);
      }
      if (struct.isSetExternalWorkflowExecutionSignaledEventAttributes()) {
        optionals.set(45);
      }
      oprot.writeBitSet(optionals, 46);
      if (struct.isSetEventId()) {
        oprot.writeI64(struct.eventId);
      }
      if (struct.isSetTimestamp()) {
        oprot.writeI64(struct.timestamp);
      }
      if (struct.isSetEventType()) {
        oprot.writeI32(struct.eventType.getValue());
      }
      if (struct.isSetVersion()) {
        oprot.writeI64(struct.version);
      }
      if (struct.isSetTaskId()) {
        oprot.writeI64(struct.taskId);
      }
      if (struct.isSetWorkflowExecutionStartedEventAttributes()) {
        struct.workflowExecutionStartedEventAttributes.write(oprot);
      }
      if (struct.isSetWorkflowExecutionCompletedEventAttributes()) {
        struct.workflowExecutionCompletedEventAttributes.write(oprot);
      }
      if (struct.isSetWorkflowExecutionFailedEventAttributes()) {
        struct.workflowExecutionFailedEventAttributes.write(oprot);
      }
      if (struct.isSetWorkflowExecutionTimedOutEventAttributes()) {
        struct.workflowExecutionTimedOutEventAttributes.write(oprot);
      }
      if (struct.isSetDecisionTaskScheduledEventAttributes()) {
        struct.decisionTaskScheduledEventAttributes.write(oprot);
      }
      if (struct.isSetDecisionTaskStartedEventAttributes()) {
        struct.decisionTaskStartedEventAttributes.write(oprot);
      }
      if (struct.isSetDecisionTaskCompletedEventAttributes()) {
        struct.decisionTaskCompletedEventAttributes.write(oprot);
      }
      if (struct.isSetDecisionTaskTimedOutEventAttributes()) {
        struct.decisionTaskTimedOutEventAttributes.write(oprot);
      }
      if (struct.isSetDecisionTaskFailedEventAttributes()) {
        struct.decisionTaskFailedEventAttributes.write(oprot);
      }
      if (struct.isSetActivityTaskScheduledEventAttributes()) {
        struct.activityTaskScheduledEventAttributes.write(oprot);
      }
      if (struct.isSetActivityTaskStartedEventAttributes()) {
        struct.activityTaskStartedEventAttributes.write(oprot);
      }
      if (struct.isSetActivityTaskCompletedEventAttributes()) {
        struct.activityTaskCompletedEventAttributes.write(oprot);
      }
      if (struct.isSetActivityTaskFailedEventAttributes()) {
        struct.activityTaskFailedEventAttributes.write(oprot);
      }
      if (struct.isSetActivityTaskTimedOutEventAttributes()) {
        struct.activityTaskTimedOutEventAttributes.write(oprot);
      }
      if (struct.isSetTimerStartedEventAttributes()) {
        struct.timerStartedEventAttributes.write(oprot);
      }
      if (struct.isSetTimerFiredEventAttributes()) {
        struct.timerFiredEventAttributes.write(oprot);
      }
      if (struct.isSetActivityTaskCancelRequestedEventAttributes()) {
        struct.activityTaskCancelRequestedEventAttributes.write(oprot);
      }
      if (struct.isSetRequestCancelActivityTaskFailedEventAttributes()) {
        struct.requestCancelActivityTaskFailedEventAttributes.write(oprot);
      }
      if (struct.isSetActivityTaskCanceledEventAttributes()) {
        struct.activityTaskCanceledEventAttributes.write(oprot);
      }
      if (struct.isSetTimerCanceledEventAttributes()) {
        struct.timerCanceledEventAttributes.write(oprot);
      }
      if (struct.isSetCancelTimerFailedEventAttributes()) {
        struct.cancelTimerFailedEventAttributes.write(oprot);
      }
      if (struct.isSetMarkerRecordedEventAttributes()) {
        struct.markerRecordedEventAttributes.write(oprot);
      }
      if (struct.isSetWorkflowExecutionSignaledEventAttributes()) {
        struct.workflowExecutionSignaledEventAttributes.write(oprot);
      }
      if (struct.isSetWorkflowExecutionTerminatedEventAttributes()) {
        struct.workflowExecutionTerminatedEventAttributes.write(oprot);
      }
      if (struct.isSetWorkflowExecutionCancelRequestedEventAttributes()) {
        struct.workflowExecutionCancelRequestedEventAttributes.write(oprot);
      }
      if (struct.isSetWorkflowExecutionCanceledEventAttributes()) {
        struct.workflowExecutionCanceledEventAttributes.write(oprot);
      }
      if (struct.isSetRequestCancelExternalWorkflowExecutionInitiatedEventAttributes()) {
        struct.requestCancelExternalWorkflowExecutionInitiatedEventAttributes.write(oprot);
      }
      if (struct.isSetRequestCancelExternalWorkflowExecutionFailedEventAttributes()) {
        struct.requestCancelExternalWorkflowExecutionFailedEventAttributes.write(oprot);
      }
      if (struct.isSetExternalWorkflowExecutionCancelRequestedEventAttributes()) {
        struct.externalWorkflowExecutionCancelRequestedEventAttributes.write(oprot);
      }
      if (struct.isSetWorkflowExecutionContinuedAsNewEventAttributes()) {
        struct.workflowExecutionContinuedAsNewEventAttributes.write(oprot);
      }
      if (struct.isSetStartChildWorkflowExecutionInitiatedEventAttributes()) {
        struct.startChildWorkflowExecutionInitiatedEventAttributes.write(oprot);
      }
      if (struct.isSetStartChildWorkflowExecutionFailedEventAttributes()) {
        struct.startChildWorkflowExecutionFailedEventAttributes.write(oprot);
      }
      if (struct.isSetChildWorkflowExecutionStartedEventAttributes()) {
        struct.childWorkflowExecutionStartedEventAttributes.write(oprot);
      }
      if (struct.isSetChildWorkflowExecutionCompletedEventAttributes()) {
        struct.childWorkflowExecutionCompletedEventAttributes.write(oprot);
      }
      if (struct.isSetChildWorkflowExecutionFailedEventAttributes()) {
        struct.childWorkflowExecutionFailedEventAttributes.write(oprot);
      }
      if (struct.isSetChildWorkflowExecutionCanceledEventAttributes()) {
        struct.childWorkflowExecutionCanceledEventAttributes.write(oprot);
      }
      if (struct.isSetChildWorkflowExecutionTimedOutEventAttributes()) {
        struct.childWorkflowExecutionTimedOutEventAttributes.write(oprot);
      }
      if (struct.isSetChildWorkflowExecutionTerminatedEventAttributes()) {
        struct.childWorkflowExecutionTerminatedEventAttributes.write(oprot);
      }
      if (struct.isSetSignalExternalWorkflowExecutionInitiatedEventAttributes()) {
        struct.signalExternalWorkflowExecutionInitiatedEventAttributes.write(oprot);
      }
      if (struct.isSetSignalExternalWorkflowExecutionFailedEventAttributes()) {
        struct.signalExternalWorkflowExecutionFailedEventAttributes.write(oprot);
      }
      if (struct.isSetExternalWorkflowExecutionSignaledEventAttributes()) {
        struct.externalWorkflowExecutionSignaledEventAttributes.write(oprot);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, HistoryEvent struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(46);
      if (incoming.get(0)) {
        struct.eventId = iprot.readI64();
        struct.setEventIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.timestamp = iprot.readI64();
        struct.setTimestampIsSet(true);
      }
      if (incoming.get(2)) {
        struct.eventType = com.uber.cadence.EventType.findByValue(iprot.readI32());
        struct.setEventTypeIsSet(true);
      }
      if (incoming.get(3)) {
        struct.version = iprot.readI64();
        struct.setVersionIsSet(true);
      }
      if (incoming.get(4)) {
        struct.taskId = iprot.readI64();
        struct.setTaskIdIsSet(true);
      }
      if (incoming.get(5)) {
        struct.workflowExecutionStartedEventAttributes = new WorkflowExecutionStartedEventAttributes();
        struct.workflowExecutionStartedEventAttributes.read(iprot);
        struct.setWorkflowExecutionStartedEventAttributesIsSet(true);
      }
      if (incoming.get(6)) {
        struct.workflowExecutionCompletedEventAttributes = new WorkflowExecutionCompletedEventAttributes();
        struct.workflowExecutionCompletedEventAttributes.read(iprot);
        struct.setWorkflowExecutionCompletedEventAttributesIsSet(true);
      }
      if (incoming.get(7)) {
        struct.workflowExecutionFailedEventAttributes = new WorkflowExecutionFailedEventAttributes();
        struct.workflowExecutionFailedEventAttributes.read(iprot);
        struct.setWorkflowExecutionFailedEventAttributesIsSet(true);
      }
      if (incoming.get(8)) {
        struct.workflowExecutionTimedOutEventAttributes = new WorkflowExecutionTimedOutEventAttributes();
        struct.workflowExecutionTimedOutEventAttributes.read(iprot);
        struct.setWorkflowExecutionTimedOutEventAttributesIsSet(true);
      }
      if (incoming.get(9)) {
        struct.decisionTaskScheduledEventAttributes = new DecisionTaskScheduledEventAttributes();
        struct.decisionTaskScheduledEventAttributes.read(iprot);
        struct.setDecisionTaskScheduledEventAttributesIsSet(true);
      }
      if (incoming.get(10)) {
        struct.decisionTaskStartedEventAttributes = new DecisionTaskStartedEventAttributes();
        struct.decisionTaskStartedEventAttributes.read(iprot);
        struct.setDecisionTaskStartedEventAttributesIsSet(true);
      }
      if (incoming.get(11)) {
        struct.decisionTaskCompletedEventAttributes = new DecisionTaskCompletedEventAttributes();
        struct.decisionTaskCompletedEventAttributes.read(iprot);
        struct.setDecisionTaskCompletedEventAttributesIsSet(true);
      }
      if (incoming.get(12)) {
        struct.decisionTaskTimedOutEventAttributes = new DecisionTaskTimedOutEventAttributes();
        struct.decisionTaskTimedOutEventAttributes.read(iprot);
        struct.setDecisionTaskTimedOutEventAttributesIsSet(true);
      }
      if (incoming.get(13)) {
        struct.decisionTaskFailedEventAttributes = new DecisionTaskFailedEventAttributes();
        struct.decisionTaskFailedEventAttributes.read(iprot);
        struct.setDecisionTaskFailedEventAttributesIsSet(true);
      }
      if (incoming.get(14)) {
        struct.activityTaskScheduledEventAttributes = new ActivityTaskScheduledEventAttributes();
        struct.activityTaskScheduledEventAttributes.read(iprot);
        struct.setActivityTaskScheduledEventAttributesIsSet(true);
      }
      if (incoming.get(15)) {
        struct.activityTaskStartedEventAttributes = new ActivityTaskStartedEventAttributes();
        struct.activityTaskStartedEventAttributes.read(iprot);
        struct.setActivityTaskStartedEventAttributesIsSet(true);
      }
      if (incoming.get(16)) {
        struct.activityTaskCompletedEventAttributes = new ActivityTaskCompletedEventAttributes();
        struct.activityTaskCompletedEventAttributes.read(iprot);
        struct.setActivityTaskCompletedEventAttributesIsSet(true);
      }
      if (incoming.get(17)) {
        struct.activityTaskFailedEventAttributes = new ActivityTaskFailedEventAttributes();
        struct.activityTaskFailedEventAttributes.read(iprot);
        struct.setActivityTaskFailedEventAttributesIsSet(true);
      }
      if (incoming.get(18)) {
        struct.activityTaskTimedOutEventAttributes = new ActivityTaskTimedOutEventAttributes();
        struct.activityTaskTimedOutEventAttributes.read(iprot);
        struct.setActivityTaskTimedOutEventAttributesIsSet(true);
      }
      if (incoming.get(19)) {
        struct.timerStartedEventAttributes = new TimerStartedEventAttributes();
        struct.timerStartedEventAttributes.read(iprot);
        struct.setTimerStartedEventAttributesIsSet(true);
      }
      if (incoming.get(20)) {
        struct.timerFiredEventAttributes = new TimerFiredEventAttributes();
        struct.timerFiredEventAttributes.read(iprot);
        struct.setTimerFiredEventAttributesIsSet(true);
      }
      if (incoming.get(21)) {
        struct.activityTaskCancelRequestedEventAttributes = new ActivityTaskCancelRequestedEventAttributes();
        struct.activityTaskCancelRequestedEventAttributes.read(iprot);
        struct.setActivityTaskCancelRequestedEventAttributesIsSet(true);
      }
      if (incoming.get(22)) {
        struct.requestCancelActivityTaskFailedEventAttributes = new RequestCancelActivityTaskFailedEventAttributes();
        struct.requestCancelActivityTaskFailedEventAttributes.read(iprot);
        struct.setRequestCancelActivityTaskFailedEventAttributesIsSet(true);
      }
      if (incoming.get(23)) {
        struct.activityTaskCanceledEventAttributes = new ActivityTaskCanceledEventAttributes();
        struct.activityTaskCanceledEventAttributes.read(iprot);
        struct.setActivityTaskCanceledEventAttributesIsSet(true);
      }
      if (incoming.get(24)) {
        struct.timerCanceledEventAttributes = new TimerCanceledEventAttributes();
        struct.timerCanceledEventAttributes.read(iprot);
        struct.setTimerCanceledEventAttributesIsSet(true);
      }
      if (incoming.get(25)) {
        struct.cancelTimerFailedEventAttributes = new CancelTimerFailedEventAttributes();
        struct.cancelTimerFailedEventAttributes.read(iprot);
        struct.setCancelTimerFailedEventAttributesIsSet(true);
      }
      if (incoming.get(26)) {
        struct.markerRecordedEventAttributes = new MarkerRecordedEventAttributes();
        struct.markerRecordedEventAttributes.read(iprot);
        struct.setMarkerRecordedEventAttributesIsSet(true);
      }
      if (incoming.get(27)) {
        struct.workflowExecutionSignaledEventAttributes = new WorkflowExecutionSignaledEventAttributes();
        struct.workflowExecutionSignaledEventAttributes.read(iprot);
        struct.setWorkflowExecutionSignaledEventAttributesIsSet(true);
      }
      if (incoming.get(28)) {
        struct.workflowExecutionTerminatedEventAttributes = new WorkflowExecutionTerminatedEventAttributes();
        struct.workflowExecutionTerminatedEventAttributes.read(iprot);
        struct.setWorkflowExecutionTerminatedEventAttributesIsSet(true);
      }
      if (incoming.get(29)) {
        struct.workflowExecutionCancelRequestedEventAttributes = new WorkflowExecutionCancelRequestedEventAttributes();
        struct.workflowExecutionCancelRequestedEventAttributes.read(iprot);
        struct.setWorkflowExecutionCancelRequestedEventAttributesIsSet(true);
      }
      if (incoming.get(30)) {
        struct.workflowExecutionCanceledEventAttributes = new WorkflowExecutionCanceledEventAttributes();
        struct.workflowExecutionCanceledEventAttributes.read(iprot);
        struct.setWorkflowExecutionCanceledEventAttributesIsSet(true);
      }
      if (incoming.get(31)) {
        struct.requestCancelExternalWorkflowExecutionInitiatedEventAttributes = new RequestCancelExternalWorkflowExecutionInitiatedEventAttributes();
        struct.requestCancelExternalWorkflowExecutionInitiatedEventAttributes.read(iprot);
        struct.setRequestCancelExternalWorkflowExecutionInitiatedEventAttributesIsSet(true);
      }
      if (incoming.get(32)) {
        struct.requestCancelExternalWorkflowExecutionFailedEventAttributes = new RequestCancelExternalWorkflowExecutionFailedEventAttributes();
        struct.requestCancelExternalWorkflowExecutionFailedEventAttributes.read(iprot);
        struct.setRequestCancelExternalWorkflowExecutionFailedEventAttributesIsSet(true);
      }
      if (incoming.get(33)) {
        struct.externalWorkflowExecutionCancelRequestedEventAttributes = new ExternalWorkflowExecutionCancelRequestedEventAttributes();
        struct.externalWorkflowExecutionCancelRequestedEventAttributes.read(iprot);
        struct.setExternalWorkflowExecutionCancelRequestedEventAttributesIsSet(true);
      }
      if (incoming.get(34)) {
        struct.workflowExecutionContinuedAsNewEventAttributes = new WorkflowExecutionContinuedAsNewEventAttributes();
        struct.workflowExecutionContinuedAsNewEventAttributes.read(iprot);
        struct.setWorkflowExecutionContinuedAsNewEventAttributesIsSet(true);
      }
      if (incoming.get(35)) {
        struct.startChildWorkflowExecutionInitiatedEventAttributes = new StartChildWorkflowExecutionInitiatedEventAttributes();
        struct.startChildWorkflowExecutionInitiatedEventAttributes.read(iprot);
        struct.setStartChildWorkflowExecutionInitiatedEventAttributesIsSet(true);
      }
      if (incoming.get(36)) {
        struct.startChildWorkflowExecutionFailedEventAttributes = new StartChildWorkflowExecutionFailedEventAttributes();
        struct.startChildWorkflowExecutionFailedEventAttributes.read(iprot);
        struct.setStartChildWorkflowExecutionFailedEventAttributesIsSet(true);
      }
      if (incoming.get(37)) {
        struct.childWorkflowExecutionStartedEventAttributes = new ChildWorkflowExecutionStartedEventAttributes();
        struct.childWorkflowExecutionStartedEventAttributes.read(iprot);
        struct.setChildWorkflowExecutionStartedEventAttributesIsSet(true);
      }
      if (incoming.get(38)) {
        struct.childWorkflowExecutionCompletedEventAttributes = new ChildWorkflowExecutionCompletedEventAttributes();
        struct.childWorkflowExecutionCompletedEventAttributes.read(iprot);
        struct.setChildWorkflowExecutionCompletedEventAttributesIsSet(true);
      }
      if (incoming.get(39)) {
        struct.childWorkflowExecutionFailedEventAttributes = new ChildWorkflowExecutionFailedEventAttributes();
        struct.childWorkflowExecutionFailedEventAttributes.read(iprot);
        struct.setChildWorkflowExecutionFailedEventAttributesIsSet(true);
      }
      if (incoming.get(40)) {
        struct.childWorkflowExecutionCanceledEventAttributes = new ChildWorkflowExecutionCanceledEventAttributes();
        struct.childWorkflowExecutionCanceledEventAttributes.read(iprot);
        struct.setChildWorkflowExecutionCanceledEventAttributesIsSet(true);
      }
      if (incoming.get(41)) {
        struct.childWorkflowExecutionTimedOutEventAttributes = new ChildWorkflowExecutionTimedOutEventAttributes();
        struct.childWorkflowExecutionTimedOutEventAttributes.read(iprot);
        struct.setChildWorkflowExecutionTimedOutEventAttributesIsSet(true);
      }
      if (incoming.get(42)) {
        struct.childWorkflowExecutionTerminatedEventAttributes = new ChildWorkflowExecutionTerminatedEventAttributes();
        struct.childWorkflowExecutionTerminatedEventAttributes.read(iprot);
        struct.setChildWorkflowExecutionTerminatedEventAttributesIsSet(true);
      }
      if (incoming.get(43)) {
        struct.signalExternalWorkflowExecutionInitiatedEventAttributes = new SignalExternalWorkflowExecutionInitiatedEventAttributes();
        struct.signalExternalWorkflowExecutionInitiatedEventAttributes.read(iprot);
        struct.setSignalExternalWorkflowExecutionInitiatedEventAttributesIsSet(true);
      }
      if (incoming.get(44)) {
        struct.signalExternalWorkflowExecutionFailedEventAttributes = new SignalExternalWorkflowExecutionFailedEventAttributes();
        struct.signalExternalWorkflowExecutionFailedEventAttributes.read(iprot);
        struct.setSignalExternalWorkflowExecutionFailedEventAttributesIsSet(true);
      }
      if (incoming.get(45)) {
        struct.externalWorkflowExecutionSignaledEventAttributes = new ExternalWorkflowExecutionSignaledEventAttributes();
        struct.externalWorkflowExecutionSignaledEventAttributes.read(iprot);
        struct.setExternalWorkflowExecutionSignaledEventAttributesIsSet(true);
      }
    }
  }

}