@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAccountId() == null) ? 0 : getAccountId().hashCode()); hashCode = prime * hashCode + ((getAccountAlias() == null) ? 0 : getAccountAlias().hashCode()); return hashCode; }
/** * <p> * The identifier of an AWS support account authorized to restore a snapshot. For AWS support, the identifier is * <code>amazon-redshift-support</code>. * </p> * * @param accountAlias * The identifier of an AWS support account authorized to restore a snapshot. For AWS support, the identifier * is <code>amazon-redshift-support</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public AccountWithRestoreAccess withAccountAlias(String accountAlias) { setAccountAlias(accountAlias); return this; }
/** * <p> * The identifier of an AWS customer account authorized to restore a snapshot. * </p> * * @param accountId * The identifier of an AWS customer account authorized to restore a snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public AccountWithRestoreAccess withAccountId(String accountId) { setAccountId(accountId); return this; }
public AccountWithRestoreAccess unmarshall(StaxUnmarshallerContext context) throws Exception { AccountWithRestoreAccess accountWithRestoreAccess = new AccountWithRestoreAccess(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return accountWithRestoreAccess; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("AccountId", targetDepth)) { accountWithRestoreAccess.setAccountId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("AccountAlias", targetDepth)) { accountWithRestoreAccess.setAccountAlias(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return accountWithRestoreAccess; } } } }
public AccountWithRestoreAccess unmarshall(StaxUnmarshallerContext context) throws Exception { AccountWithRestoreAccess accountWithRestoreAccess = new AccountWithRestoreAccess(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return accountWithRestoreAccess; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("AccountId", targetDepth)) { accountWithRestoreAccess.setAccountId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("AccountAlias", targetDepth)) { accountWithRestoreAccess.setAccountAlias(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return accountWithRestoreAccess; } } } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AccountWithRestoreAccess == false) return false; AccountWithRestoreAccess other = (AccountWithRestoreAccess) obj; if (other.getAccountId() == null ^ this.getAccountId() == null) return false; if (other.getAccountId() != null && other.getAccountId().equals(this.getAccountId()) == false) return false; if (other.getAccountAlias() == null ^ this.getAccountAlias() == null) return false; if (other.getAccountAlias() != null && other.getAccountAlias().equals(this.getAccountAlias()) == false) return false; return true; }
/** * <p> * The identifier of an AWS customer account authorized to restore a snapshot. * </p> * * @param accountId * The identifier of an AWS customer account authorized to restore a snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public AccountWithRestoreAccess withAccountId(String accountId) { setAccountId(accountId); return this; }
/** * <p> * The identifier of an AWS support account authorized to restore a snapshot. For AWS support, the identifier is * <code>amazon-redshift-support</code>. * </p> * * @param accountAlias * The identifier of an AWS support account authorized to restore a snapshot. For AWS support, the identifier * is <code>amazon-redshift-support</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public AccountWithRestoreAccess withAccountAlias(String accountAlias) { setAccountAlias(accountAlias); 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 (getAccountId() != null) sb.append("AccountId: ").append(getAccountId()).append(","); if (getAccountAlias() != null) sb.append("AccountAlias: ").append(getAccountAlias()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAccountId() == null) ? 0 : getAccountId().hashCode()); hashCode = prime * hashCode + ((getAccountAlias() == null) ? 0 : getAccountAlias().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AccountWithRestoreAccess == false) return false; AccountWithRestoreAccess other = (AccountWithRestoreAccess) obj; if (other.getAccountId() == null ^ this.getAccountId() == null) return false; if (other.getAccountId() != null && other.getAccountId().equals(this.getAccountId()) == false) return false; if (other.getAccountAlias() == null ^ this.getAccountAlias() == null) return false; if (other.getAccountAlias() != null && other.getAccountAlias().equals(this.getAccountAlias()) == 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 (getAccountId() != null) sb.append("AccountId: ").append(getAccountId()).append(","); if (getAccountAlias() != null) sb.append("AccountAlias: ").append(getAccountAlias()); sb.append("}"); return sb.toString(); }