public ChildWorkflowExecutionFailedEventAttributes unmarshall(JsonUnmarshallerContext context)
      throws Exception {
    ChildWorkflowExecutionFailedEventAttributes childWorkflowExecutionFailedEventAttributes =
        new ChildWorkflowExecutionFailedEventAttributes();

    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("workflowExecution", targetDepth)) {
          context.nextToken();
          childWorkflowExecutionFailedEventAttributes.setWorkflowExecution(
              WorkflowExecutionJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("workflowType", targetDepth)) {
          context.nextToken();
          childWorkflowExecutionFailedEventAttributes.setWorkflowType(
              WorkflowTypeJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("reason", targetDepth)) {
          context.nextToken();
          childWorkflowExecutionFailedEventAttributes.setReason(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("details", targetDepth)) {
          context.nextToken();
          childWorkflowExecutionFailedEventAttributes.setDetails(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("initiatedEventId", targetDepth)) {
          context.nextToken();
          childWorkflowExecutionFailedEventAttributes.setInitiatedEventId(
              LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("startedEventId", targetDepth)) {
          context.nextToken();
          childWorkflowExecutionFailedEventAttributes.setStartedEventId(
              LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getCurrentDepth() <= originalDepth) break;
      }
      token = context.nextToken();
    }

    return childWorkflowExecutionFailedEventAttributes;
  }
  public WorkflowExecutionCancelRequestedEventAttributes unmarshall(JsonUnmarshallerContext context)
      throws Exception {
    WorkflowExecutionCancelRequestedEventAttributes
        workflowExecutionCancelRequestedEventAttributes =
            new WorkflowExecutionCancelRequestedEventAttributes();

    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("externalWorkflowExecution", targetDepth)) {
          context.nextToken();
          workflowExecutionCancelRequestedEventAttributes.setExternalWorkflowExecution(
              WorkflowExecutionJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("externalInitiatedEventId", targetDepth)) {
          context.nextToken();
          workflowExecutionCancelRequestedEventAttributes.setExternalInitiatedEventId(
              LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("cause", targetDepth)) {
          context.nextToken();
          workflowExecutionCancelRequestedEventAttributes.setCause(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getCurrentDepth() <= originalDepth) break;
      }

      token = context.nextToken();
    }

    return workflowExecutionCancelRequestedEventAttributes;
  }