public CrossZoneLoadBalancing unmarshall(StaxUnmarshallerContext context) throws Exception { CrossZoneLoadBalancing crossZoneLoadBalancing = new CrossZoneLoadBalancing(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return crossZoneLoadBalancing; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Enabled", targetDepth)) { crossZoneLoadBalancing.setEnabled(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return crossZoneLoadBalancing; } } } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); return hashCode; }
public LoadBalancerAttributes getLoadBalancerAttributes(LoadBalancerDescription sourceLoadBalancer, AmazonElasticLoadBalancing sourceClient) { LoadBalancerAttributes sourceAttributes = sourceClient.describeLoadBalancerAttributes( new DescribeLoadBalancerAttributesRequest().withLoadBalancerName(sourceLoadBalancer.getLoadBalancerName())).getLoadBalancerAttributes(); if (sourceLoadBalancer.getListenerDescriptions().stream().anyMatch(l -> l.getListener().getInstancePort() == 0)) { sourceAttributes.setCrossZoneLoadBalancing(new CrossZoneLoadBalancing().withEnabled(true)); } return sourceAttributes; }
@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.getCrossZoneLoadBalancing() == null ^ this.getCrossZoneLoadBalancing() == null) return false; if (other.getCrossZoneLoadBalancing() != null && other.getCrossZoneLoadBalancing().equals(this.getCrossZoneLoadBalancing()) == false) return false; if (other.getAccessLog() == null ^ this.getAccessLog() == null)
/** * <p> * Specifies whether cross-zone load balancing is enabled for the load balancer. * </p> * * @param enabled * Specifies whether cross-zone load balancing is enabled for the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public CrossZoneLoadBalancing withEnabled(Boolean enabled) { setEnabled(enabled); return this; }
@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.getCrossZoneLoadBalancing() != null && other.getCrossZoneLoadBalancing().equals(this.getCrossZoneLoadBalancing()) == false) return false; if (other.getAccessLog() == null ^ this.getAccessLog() == null)
/** * <p> * Specifies whether cross-zone load balancing is enabled for the load balancer. * </p> * * @param enabled * Specifies whether cross-zone load balancing is enabled for the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public CrossZoneLoadBalancing withEnabled(Boolean enabled) { setEnabled(enabled); return this; }
public CrossZoneLoadBalancing unmarshall(StaxUnmarshallerContext context) throws Exception { CrossZoneLoadBalancing crossZoneLoadBalancing = new CrossZoneLoadBalancing(); 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)) { crossZoneLoadBalancing.setEnabled(BooleanStaxUnmarshaller.getInstance() .unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return crossZoneLoadBalancing; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CrossZoneLoadBalancing == false) return false; CrossZoneLoadBalancing other = (CrossZoneLoadBalancing) obj; if (other.getEnabled() == null ^ this.getEnabled() == null) return false; if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false) return false; return true; }
@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.getCrossZoneLoadBalancing() == null ^ this.getCrossZoneLoadBalancing() == null) return false; if (other.getCrossZoneLoadBalancing() != null && other.getCrossZoneLoadBalancing().equals(this.getCrossZoneLoadBalancing()) == false) return false; if (other.getAccessLog() == null ^ this.getAccessLog() == null)
public CrossZoneLoadBalancing unmarshall(StaxUnmarshallerContext context) throws Exception { CrossZoneLoadBalancing crossZoneLoadBalancing = new CrossZoneLoadBalancing(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return crossZoneLoadBalancing; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Enabled", targetDepth)) { crossZoneLoadBalancing.setEnabled(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return crossZoneLoadBalancing; } } } }
/** * 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()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CrossZoneLoadBalancing == false) return false; CrossZoneLoadBalancing other = (CrossZoneLoadBalancing) obj; if (other.getEnabled() == null ^ this.getEnabled() == null) return false; if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == 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()); sb.append("}"); return sb.toString(); }
public void marshall(CrossZoneLoadBalancing _crossZoneLoadBalancing, Request<?> request, String _prefix) { String prefix; if (_crossZoneLoadBalancing.getEnabled() != null) { prefix = _prefix + "Enabled"; Boolean enabled = _crossZoneLoadBalancing.getEnabled(); request.addParameter(prefix, StringUtils.fromBoolean(enabled)); } }
if (crossZoneLoadBalancing != null) { if (crossZoneLoadBalancing.getEnabled() != null) { request.addParameter("LoadBalancerAttributes.CrossZoneLoadBalancing.Enabled", StringUtils.fromBoolean(crossZoneLoadBalancing.getEnabled()));