/** Marshall the given parameter object, and output to a SdkJsonGenerator */
  public void marshall(
      FailWorkflowExecutionFailedEventAttributes failWorkflowExecutionFailedEventAttributes,
      StructuredJsonGenerator jsonGenerator) {

    if (failWorkflowExecutionFailedEventAttributes == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    try {
      jsonGenerator.writeStartObject();

      if (failWorkflowExecutionFailedEventAttributes.getCause() != null) {
        jsonGenerator
            .writeFieldName("cause")
            .writeValue(failWorkflowExecutionFailedEventAttributes.getCause());
      }
      if (failWorkflowExecutionFailedEventAttributes.getDecisionTaskCompletedEventId() != null) {
        jsonGenerator
            .writeFieldName("decisionTaskCompletedEventId")
            .writeValue(
                failWorkflowExecutionFailedEventAttributes.getDecisionTaskCompletedEventId());
      }

      jsonGenerator.writeEndObject();
    } catch (Throwable t) {
      throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);
    }
  }
  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;

    if (obj instanceof FailWorkflowExecutionFailedEventAttributes == false) return false;
    FailWorkflowExecutionFailedEventAttributes other =
        (FailWorkflowExecutionFailedEventAttributes) obj;

    if (other.getCause() == null ^ this.getCause() == null) return false;
    if (other.getCause() != null && other.getCause().equals(this.getCause()) == false) return false;
    if (other.getDecisionTaskCompletedEventId() == null
        ^ this.getDecisionTaskCompletedEventId() == null) return false;
    if (other.getDecisionTaskCompletedEventId() != null
        && other.getDecisionTaskCompletedEventId().equals(this.getDecisionTaskCompletedEventId())
            == false) return false;
    return true;
  }