@Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null || getClass() != obj.getClass()) {
      return false;
    }

    AddServiceRequest other = (AddServiceRequest) obj;

    return Objects.equals(operationType, other.operationType) &&
      Objects.equals(validationType, other.validationType) &&
      Objects.equals(recommendationStrategy, other.recommendationStrategy) &&
      Objects.equals(provisionAction, other.provisionAction) &&
      Objects.equals(stackName, other.stackName) &&
      Objects.equals(stackVersion, other.stackVersion) &&
      Objects.equals(services, other.services) &&
      Objects.equals(components, other.components) &&
      Objects.equals(security, other.security) &&
      Objects.equals(configuration, other.configuration);
    // credentials is ignored for equality, since it's not serialized
  }
Data object representing an add service request.
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/AddServiceRequest.java