@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateHITResult == false) return false; CreateHITResult other = (CreateHITResult) obj; if (other.getHIT() == null ^ this.getHIT() == null) return false; if (other.getHIT() != null && other.getHIT().equals(this.getHIT()) == false) return false; return true; }
/** * <p> * Contains the newly created HIT data. For a description of the HIT data structure as it appears in responses, see * the HIT Data Structure documentation. * </p> * * @param hIT * Contains the newly created HIT data. For a description of the HIT data structure as it appears in * responses, see the HIT Data Structure documentation. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHITResult withHIT(HIT hIT) { setHIT(hIT); return this; }
public CreateHITResult unmarshall(JsonUnmarshallerContext context) throws Exception { CreateHITResult createHITResult = new CreateHITResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return createHITResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("HIT", targetDepth)) { context.nextToken(); createHITResult.setHIT(HITJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return createHITResult; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getHIT() != null) sb.append("HIT: ").append(getHIT()); sb.append("}"); return sb.toString(); }