@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDBInstanceIdentifier() == null) ? 0 : getDBInstanceIdentifier().hashCode()); hashCode = prime * hashCode + ((getForceFailover() == null) ? 0 : getForceFailover().hashCode()); return hashCode; }
/** * Constructs a new RebootDBInstanceRequest object. Callers should use the setter or fluent setter (with...) methods * to initialize any additional object members. * * @param dBInstanceIdentifier * The DB instance identifier. This parameter is stored as a lowercase string.</p> * <p> * Constraints: * </p> * <ul> * <li> * <p> * Must match the identifier of an existing DBInstance. * </p> * </li> */ public RebootDBInstanceRequest(String dBInstanceIdentifier) { setDBInstanceIdentifier(dBInstanceIdentifier); }
/** * <p> * When <code>true</code>, the reboot is conducted through a MultiAZ failover. * </p> * <p> * Constraint: You can't specify <code>true</code> if the instance is not configured for MultiAZ. * </p> * * @param forceFailover * When <code>true</code>, the reboot is conducted through a MultiAZ failover. </p> * <p> * Constraint: You can't specify <code>true</code> if the instance is not configured for MultiAZ. * @return Returns a reference to this object so that method calls can be chained together. */ public RebootDBInstanceRequest withForceFailover(Boolean forceFailover) { setForceFailover(forceFailover); return this; }
@TaskAction public void rebootDBInstance() { // to enable conventionMappings feature String dbInstanceIdentifier = getDbInstanceIdentifier(); if (dbInstanceIdentifier == null) { throw new GradleException("dbInstanceIdentifier is required"); } AmazonRDSPluginExtension ext = getProject().getExtensions().getByType(AmazonRDSPluginExtension.class); AmazonRDS rds = ext.getClient(); RebootDBInstanceRequest request = new RebootDBInstanceRequest() .withDBInstanceIdentifier(dbInstanceIdentifier) .withForceFailover(getForceFailover()); dbInstance = rds.rebootDBInstance(request); getLogger().info("Reboot RDS instance requested: {}", dbInstance.getDBInstanceIdentifier()); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RebootDBInstanceRequest == false) return false; RebootDBInstanceRequest other = (RebootDBInstanceRequest) obj; if (other.getDBInstanceIdentifier() == null ^ this.getDBInstanceIdentifier() == null) return false; if (other.getDBInstanceIdentifier() != null && other.getDBInstanceIdentifier().equals(this.getDBInstanceIdentifier()) == false) return false; if (other.getForceFailover() == null ^ this.getForceFailover() == null) return false; if (other.getForceFailover() != null && other.getForceFailover().equals(this.getForceFailover()) == false) return false; return true; }
setDBInstanceIdentifier(dBInstanceIdentifier); return this;
/** * <p> * When <code>true</code>, the reboot is conducted through a MultiAZ failover. * </p> * <p> * Constraint: You can't specify <code>true</code> if the instance is not configured for MultiAZ. * </p> * * @param forceFailover * When <code>true</code>, the reboot is conducted through a MultiAZ failover. </p> * <p> * Constraint: You can't specify <code>true</code> if the instance is not configured for MultiAZ. * @return Returns a reference to this object so that method calls can be chained together. */ public RebootDBInstanceRequest withForceFailover(Boolean forceFailover) { setForceFailover(forceFailover); 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 (getDBInstanceIdentifier() != null) sb.append("DBInstanceIdentifier: ").append(getDBInstanceIdentifier()).append(","); if (getForceFailover() != null) sb.append("ForceFailover: ").append(getForceFailover()); sb.append("}"); return sb.toString(); }
/** * Constructs a new RebootDBInstanceRequest object. Callers should use the setter or fluent setter (with...) methods * to initialize any additional object members. * * @param dBInstanceIdentifier * The DB instance identifier. This parameter is stored as a lowercase string.</p> * <p> * Constraints: * </p> * <ul> * <li> * <p> * Must match the identifier of an existing DBInstance. * </p> * </li> */ public RebootDBInstanceRequest(String dBInstanceIdentifier) { setDBInstanceIdentifier(dBInstanceIdentifier); }
public Request<RebootDBInstanceRequest> marshall(RebootDBInstanceRequest rebootDBInstanceRequest) { if (rebootDBInstanceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<RebootDBInstanceRequest> request = new DefaultRequest<RebootDBInstanceRequest>(rebootDBInstanceRequest, "AmazonRDS"); request.addParameter("Action", "RebootDBInstance"); request.addParameter("Version", "2014-10-31"); request.setHttpMethod(HttpMethodName.POST); if (rebootDBInstanceRequest.getDBInstanceIdentifier() != null) { request.addParameter("DBInstanceIdentifier", StringUtils.fromString(rebootDBInstanceRequest.getDBInstanceIdentifier())); } if (rebootDBInstanceRequest.getForceFailover() != null) { request.addParameter("ForceFailover", StringUtils.fromBoolean(rebootDBInstanceRequest.getForceFailover())); } return request; }
setDBInstanceIdentifier(dBInstanceIdentifier); return this;
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDBInstanceIdentifier() == null) ? 0 : getDBInstanceIdentifier().hashCode()); hashCode = prime * hashCode + ((getForceFailover() == null) ? 0 : getForceFailover().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RebootDBInstanceRequest == false) return false; RebootDBInstanceRequest other = (RebootDBInstanceRequest) obj; if (other.getDBInstanceIdentifier() == null ^ this.getDBInstanceIdentifier() == null) return false; if (other.getDBInstanceIdentifier() != null && other.getDBInstanceIdentifier().equals(this.getDBInstanceIdentifier()) == false) return false; if (other.getForceFailover() == null ^ this.getForceFailover() == null) return false; if (other.getForceFailover() != null && other.getForceFailover().equals(this.getForceFailover()) == 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 (getDBInstanceIdentifier() != null) sb.append("DBInstanceIdentifier: ").append(getDBInstanceIdentifier()).append(","); if (getForceFailover() != null) sb.append("ForceFailover: ").append(getForceFailover()); sb.append("}"); return sb.toString(); }
public Request<RebootDBInstanceRequest> marshall(RebootDBInstanceRequest rebootDBInstanceRequest) { if (rebootDBInstanceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<RebootDBInstanceRequest> request = new DefaultRequest<RebootDBInstanceRequest>(rebootDBInstanceRequest, "AmazonRDS"); request.addParameter("Action", "RebootDBInstance"); request.addParameter("Version", "2014-10-31"); request.setHttpMethod(HttpMethodName.POST); if (rebootDBInstanceRequest.getDBInstanceIdentifier() != null) { request.addParameter("DBInstanceIdentifier", StringUtils.fromString(rebootDBInstanceRequest.getDBInstanceIdentifier())); } if (rebootDBInstanceRequest.getForceFailover() != null) { request.addParameter("ForceFailover", StringUtils.fromBoolean(rebootDBInstanceRequest.getForceFailover())); } return request; }