@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); hashCode = prime * hashCode + ((getTimeout() == null) ? 0 : getTimeout().hashCode()); return hashCode; }
/** * <p> * Specifies whether connection draining is enabled for the load balancer. * </p> * * @param enabled * Specifies whether connection draining is enabled for the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionDraining withEnabled(Boolean enabled) { setEnabled(enabled); return this; }
/** * <p> * The maximum time, in seconds, to keep the existing connections open before deregistering the instances. * </p> * * @param timeout * The maximum time, in seconds, to keep the existing connections open before deregistering the instances. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionDraining withTimeout(Integer timeout) { setTimeout(timeout); return this; }
public ConnectionDraining unmarshall(StaxUnmarshallerContext context) throws Exception { ConnectionDraining connectionDraining = new ConnectionDraining(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return connectionDraining; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Enabled", targetDepth)) { connectionDraining.setEnabled(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Timeout", targetDepth)) { connectionDraining.setTimeout(IntegerStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return connectionDraining; } } } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCrossZoneLoadBalancing() == null) ? 0 : getCrossZoneLoadBalancing().hashCode()); hashCode = prime * hashCode + ((getAccessLog() == null) ? 0 : getAccessLog().hashCode()); hashCode = prime * hashCode + ((getConnectionDraining() == null) ? 0 : getConnectionDraining().hashCode()); hashCode = prime * hashCode + ((getConnectionSettings() == null) ? 0 : getConnectionSettings().hashCode()); hashCode = prime * hashCode + ((getAdditionalAttributes() == null) ? 0 : getAdditionalAttributes().hashCode()); return hashCode; }
if (other.getConnectionDraining() == null ^ this.getConnectionDraining() == null) return false; if (other.getConnectionDraining() != null && other.getConnectionDraining().equals(this.getConnectionDraining()) == false) return false; if (other.getConnectionSettings() == null ^ this.getConnectionSettings() == null)
public ConnectionDraining unmarshall(StaxUnmarshallerContext context) throws Exception { ConnectionDraining connectionDraining = new ConnectionDraining(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("Enabled", targetDepth)) { connectionDraining.setEnabled(BooleanStaxUnmarshaller.getInstance().unmarshall( context)); continue; } if (context.testExpression("Timeout", targetDepth)) { connectionDraining.setTimeout(IntegerStaxUnmarshaller.getInstance().unmarshall( context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return connectionDraining; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCrossZoneLoadBalancing() == null) ? 0 : getCrossZoneLoadBalancing() .hashCode()); hashCode = prime * hashCode + ((getAccessLog() == null) ? 0 : getAccessLog().hashCode()); hashCode = prime * hashCode + ((getConnectionDraining() == null) ? 0 : getConnectionDraining().hashCode()); hashCode = prime * hashCode + ((getConnectionSettings() == null) ? 0 : getConnectionSettings().hashCode()); hashCode = prime * hashCode + ((getAdditionalAttributes() == null) ? 0 : getAdditionalAttributes().hashCode()); return hashCode; }
return false; if (other.getConnectionDraining() != null && other.getConnectionDraining().equals(this.getConnectionDraining()) == false) return false; if (other.getConnectionSettings() == null ^ this.getConnectionSettings() == null)
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ConnectionDraining == false) return false; ConnectionDraining other = (ConnectionDraining) obj; if (other.getEnabled() == null ^ this.getEnabled() == null) return false; if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false) return false; if (other.getTimeout() == null ^ this.getTimeout() == null) return false; if (other.getTimeout() != null && other.getTimeout().equals(this.getTimeout()) == false) return false; return true; }
public ConnectionDraining unmarshall(StaxUnmarshallerContext context) throws Exception { ConnectionDraining connectionDraining = new ConnectionDraining(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return connectionDraining; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Enabled", targetDepth)) { connectionDraining.setEnabled(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Timeout", targetDepth)) { connectionDraining.setTimeout(IntegerStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return connectionDraining; } } } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCrossZoneLoadBalancing() == null) ? 0 : getCrossZoneLoadBalancing().hashCode()); hashCode = prime * hashCode + ((getAccessLog() == null) ? 0 : getAccessLog().hashCode()); hashCode = prime * hashCode + ((getConnectionDraining() == null) ? 0 : getConnectionDraining().hashCode()); hashCode = prime * hashCode + ((getConnectionSettings() == null) ? 0 : getConnectionSettings().hashCode()); hashCode = prime * hashCode + ((getAdditionalAttributes() == null) ? 0 : getAdditionalAttributes().hashCode()); return hashCode; }
if (other.getConnectionDraining() == null ^ this.getConnectionDraining() == null) return false; if (other.getConnectionDraining() != null && other.getConnectionDraining().equals(this.getConnectionDraining()) == false) return false; if (other.getConnectionSettings() == null ^ this.getConnectionSettings() == null)
/** * <p> * Specifies whether connection draining is enabled for the load balancer. * </p> * * @param enabled * Specifies whether connection draining is enabled for the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionDraining withEnabled(Boolean enabled) { setEnabled(enabled); return this; }
/** * <p> * The maximum time, in seconds, to keep the existing connections open before deregistering the instances. * </p> * * @param timeout * The maximum time, in seconds, to keep the existing connections open before deregistering the instances. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionDraining withTimeout(Integer timeout) { setTimeout(timeout); 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 (getEnabled() != null) sb.append("Enabled: ").append(getEnabled()).append(","); if (getTimeout() != null) sb.append("Timeout: ").append(getTimeout()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); hashCode = prime * hashCode + ((getTimeout() == null) ? 0 : getTimeout().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ConnectionDraining == false) return false; ConnectionDraining other = (ConnectionDraining) obj; if (other.getEnabled() == null ^ this.getEnabled() == null) return false; if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false) return false; if (other.getTimeout() == null ^ this.getTimeout() == null) return false; if (other.getTimeout() != null && other.getTimeout().equals(this.getTimeout()) == false) return false; return true; } }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getEnabled() != null) sb.append("Enabled: " + getEnabled() + ","); if (getTimeout() != null) sb.append("Timeout: " + getTimeout()); sb.append("}"); return sb.toString(); }
if (connectionDraining != null) { if (connectionDraining.getEnabled() != null) { request.addParameter("LoadBalancerAttributes.ConnectionDraining.Enabled", StringUtils.fromBoolean(connectionDraining.getEnabled())); if (connectionDraining.getTimeout() != null) { request.addParameter("LoadBalancerAttributes.ConnectionDraining.Timeout", StringUtils.fromInteger(connectionDraining.getTimeout()));