@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateBackupResult == false) return false; CreateBackupResult other = (CreateBackupResult) obj; if (other.getBackup() == null ^ this.getBackup() == null) return false; if (other.getBackup() != null && other.getBackup().equals(this.getBackup()) == false) return false; return true; }
/** * <p> * Backup created by request. * </p> * * @param backup * Backup created by request. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBackupResult withBackup(Backup backup) { setBackup(backup); return this; }
public CreateBackupResult unmarshall(JsonUnmarshallerContext context) throws Exception { CreateBackupResult createBackupResult = new CreateBackupResult(); 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 createBackupResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Backup", targetDepth)) { context.nextToken(); createBackupResult.setBackup(BackupJsonUnmarshaller.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 createBackupResult; }
/** * 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 (getBackup() != null) sb.append("Backup: ").append(getBackup()); sb.append("}"); return sb.toString(); }