@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInstances() == null) ? 0 : getInstances().hashCode()); return hashCode; }
/** * <p> * The remaining instances registered with the load balancer. * </p> * * @param instances * The remaining instances registered with the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public DeregisterInstancesFromLoadBalancerResult withInstances(java.util.Collection<Instance> instances) { setInstances(instances); return this; }
public DeregisterInstancesFromLoadBalancerResult unmarshall(StaxUnmarshallerContext context) throws Exception { DeregisterInstancesFromLoadBalancerResult deregisterInstancesFromLoadBalancerResult = new DeregisterInstancesFromLoadBalancerResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return deregisterInstancesFromLoadBalancerResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Instances", targetDepth)) { deregisterInstancesFromLoadBalancerResult.withInstances(new ArrayList<Instance>()); continue; } if (context.testExpression("Instances/member", targetDepth)) { deregisterInstancesFromLoadBalancerResult.withInstances(InstanceStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return deregisterInstancesFromLoadBalancerResult; } } } }
public DeregisterInstancesFromLoadBalancerResult unmarshall(StaxUnmarshallerContext context) throws Exception { DeregisterInstancesFromLoadBalancerResult deregisterInstancesFromLoadBalancerResult = new DeregisterInstancesFromLoadBalancerResult(); 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("Instances/member", targetDepth)) { deregisterInstancesFromLoadBalancerResult .withInstances(InstanceStaxUnmarshaller.getInstance().unmarshall( context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return deregisterInstancesFromLoadBalancerResult; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeregisterInstancesFromLoadBalancerResult == false) return false; DeregisterInstancesFromLoadBalancerResult other = (DeregisterInstancesFromLoadBalancerResult) obj; if (other.getInstances() == null ^ this.getInstances() == null) return false; if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == false) return false; return true; }
public DeregisterInstancesFromLoadBalancerResult unmarshall(StaxUnmarshallerContext context) throws Exception { DeregisterInstancesFromLoadBalancerResult deregisterInstancesFromLoadBalancerResult = new DeregisterInstancesFromLoadBalancerResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return deregisterInstancesFromLoadBalancerResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Instances", targetDepth)) { deregisterInstancesFromLoadBalancerResult.withInstances(new ArrayList<Instance>()); continue; } if (context.testExpression("Instances/member", targetDepth)) { deregisterInstancesFromLoadBalancerResult.withInstances(InstanceStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return deregisterInstancesFromLoadBalancerResult; } } } }
/** * <p> * The remaining instances registered with the load balancer. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setInstances(java.util.Collection)} or {@link #withInstances(java.util.Collection)} if you want to * override the existing values. * </p> * * @param instances * The remaining instances registered with the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public DeregisterInstancesFromLoadBalancerResult withInstances(Instance... instances) { if (this.instances == null) { setInstances(new com.amazonaws.internal.SdkInternalList<Instance>(instances.length)); } for (Instance ele : instances) { this.instances.add(ele); } 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 (getInstances() != null) sb.append("Instances: ").append(getInstances()); sb.append("}"); return sb.toString(); }
/** * <p> * The remaining instances registered with the load balancer. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param instances <p> * The remaining instances registered with the load balancer. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DeregisterInstancesFromLoadBalancerResult withInstances( java.util.Collection<Instance> instances) { setInstances(instances); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInstances() == null) ? 0 : getInstances().hashCode()); return hashCode; }
/** * <p> * The remaining instances registered with the load balancer. * </p> * * @param instances * The remaining instances registered with the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public DeregisterInstancesFromLoadBalancerResult withInstances(java.util.Collection<Instance> instances) { setInstances(instances); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeregisterInstancesFromLoadBalancerResult == false) return false; DeregisterInstancesFromLoadBalancerResult other = (DeregisterInstancesFromLoadBalancerResult) obj; if (other.getInstances() == null ^ this.getInstances() == null) return false; if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == false) return false; return true; } }
/** * <p> * The remaining instances registered with the load balancer. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setInstances(java.util.Collection)} or {@link #withInstances(java.util.Collection)} if you want to * override the existing values. * </p> * * @param instances * The remaining instances registered with the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public DeregisterInstancesFromLoadBalancerResult withInstances(Instance... instances) { if (this.instances == null) { setInstances(new com.amazonaws.internal.SdkInternalList<Instance>(instances.length)); } for (Instance ele : instances) { this.instances.add(ele); } return this; }
/** * 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 (getInstances() != null) sb.append("Instances: " + getInstances()); sb.append("}"); return sb.toString(); }
/** * <p> * The remaining instances registered with the load balancer. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param instances <p> * The remaining instances registered with the load balancer. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DeregisterInstancesFromLoadBalancerResult withInstances(Instance... instances) { if (getInstances() == null) { this.instances = new java.util.ArrayList<Instance>(instances.length); } for (Instance value : instances) { this.instances.add(value); } return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeregisterInstancesFromLoadBalancerResult == false) return false; DeregisterInstancesFromLoadBalancerResult other = (DeregisterInstancesFromLoadBalancerResult) obj; if (other.getInstances() == null ^ this.getInstances() == null) return false; if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInstances() == null) ? 0 : getInstances().hashCode()); return hashCode; }
/** * 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 (getInstances() != null) sb.append("Instances: ").append(getInstances()); sb.append("}"); return sb.toString(); }
/** * * @param loadBalancerName * @param instances * @param lbClient * @return */ public List<com.amazonaws.services.elasticloadbalancing.model.Instance> deregisterInstancesLB(String loadBalancerName, List<com.amazonaws.services.elasticloadbalancing.model.Instance> instances, AmazonElasticLoadBalancing lbClient) { DeregisterInstancesFromLoadBalancerRequest request = new DeregisterInstancesFromLoadBalancerRequest() .withInstances(instances) .withLoadBalancerName(loadBalancerName); DeregisterInstancesFromLoadBalancerResult result = lbClient.deregisterInstancesFromLoadBalancer(request); return result.getInstances(); }