/** * <p> * True if <a>AddCommunicationToCase</a> succeeds. Otherwise, returns an error. * </p> * * @param result * True if <a>AddCommunicationToCase</a> succeeds. Otherwise, returns an error. * @return Returns a reference to this object so that method calls can be chained together. */ public AddCommunicationToCaseResult withResult(Boolean result) { setResult(result); return this; }
public AddCommunicationToCaseResult unmarshall(JsonUnmarshallerContext context) throws Exception { AddCommunicationToCaseResult addCommunicationToCaseResult = new AddCommunicationToCaseResult(); 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 addCommunicationToCaseResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("result", targetDepth)) { context.nextToken(); addCommunicationToCaseResult.setResult(context.getUnmarshaller(Boolean.class).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 addCommunicationToCaseResult; }
public AddCommunicationToCaseResult unmarshall(JsonUnmarshallerContext context) throws Exception { AddCommunicationToCaseResult addCommunicationToCaseResult = new AddCommunicationToCaseResult(); 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 addCommunicationToCaseResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("result", targetDepth)) { context.nextToken(); addCommunicationToCaseResult.setResult(context.getUnmarshaller(Boolean.class).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 addCommunicationToCaseResult; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AddCommunicationToCaseResult == false) return false; AddCommunicationToCaseResult other = (AddCommunicationToCaseResult) obj; if (other.getResult() == null ^ this.getResult() == null) return false; if (other.getResult() != null && other.getResult().equals(this.getResult()) == false) return false; return true; }
/** * <p> * True if <a>AddCommunicationToCase</a> succeeds. Otherwise, returns an error. * </p> * * @param result * True if <a>AddCommunicationToCase</a> succeeds. Otherwise, returns an error. * @return Returns a reference to this object so that method calls can be chained together. */ public AddCommunicationToCaseResult withResult(Boolean result) { setResult(result); return this; }
/** * 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 (getResult() != null) sb.append("Result: ").append(getResult()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AddCommunicationToCaseResult == false) return false; AddCommunicationToCaseResult other = (AddCommunicationToCaseResult) obj; if (other.getResult() == null ^ this.getResult() == null) return false; if (other.getResult() != null && other.getResult().equals(this.getResult()) == false) return false; return true; }
/** * 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 (getResult() != null) sb.append("Result: ").append(getResult()); sb.append("}"); return sb.toString(); }