@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerName() == null) ? 0 : getLoadBalancerName().hashCode()); 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 (getLoadBalancerName() != null) sb.append("LoadBalancerName: ").append(getLoadBalancerName()).append(","); if (getInstances() != null) sb.append("Instances: ").append(getInstances()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeInstanceHealthRequest == false) return false; DescribeInstanceHealthRequest other = (DescribeInstanceHealthRequest) obj; if (other.getLoadBalancerName() == null ^ this.getLoadBalancerName() == null) return false; if (other.getLoadBalancerName() != null && other.getLoadBalancerName().equals(this.getLoadBalancerName()) == false) return false; if (other.getInstances() == null ^ this.getInstances() == null) return false; if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == false) return false; return true; }
public Request<DescribeInstanceHealthRequest> marshall(DescribeInstanceHealthRequest describeInstanceHealthRequest) { if (describeInstanceHealthRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<DescribeInstanceHealthRequest> request = new DefaultRequest<DescribeInstanceHealthRequest>(describeInstanceHealthRequest, "AmazonElasticLoadBalancing"); request.addParameter("Action", "DescribeInstanceHealth"); request.addParameter("Version", "2012-06-01"); request.setHttpMethod(HttpMethodName.POST); if (describeInstanceHealthRequest.getLoadBalancerName() != null) { request.addParameter("LoadBalancerName", StringUtils.fromString(describeInstanceHealthRequest.getLoadBalancerName())); } if (!describeInstanceHealthRequest.getInstances().isEmpty() || !((com.amazonaws.internal.SdkInternalList<Instance>) describeInstanceHealthRequest.getInstances()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<Instance> instancesList = (com.amazonaws.internal.SdkInternalList<Instance>) describeInstanceHealthRequest .getInstances(); int instancesListIndex = 1; for (Instance instancesListValue : instancesList) { if (instancesListValue.getInstanceId() != null) { request.addParameter("Instances.member." + instancesListIndex + ".InstanceId", StringUtils.fromString(instancesListValue.getInstanceId())); } instancesListIndex++; } } return request; }
/** * <p> * The IDs of the instances. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param instances <p> * The IDs of the instances. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribeInstanceHealthRequest 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 int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerName() == null) ? 0 : getLoadBalancerName().hashCode()); hashCode = prime * hashCode + ((getInstances() == null) ? 0 : getInstances().hashCode()); return hashCode; }
/** * 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 (getLoadBalancerName() != null) sb.append("LoadBalancerName: " + getLoadBalancerName() + ","); if (getInstances() != null) sb.append("Instances: " + getInstances()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeInstanceHealthRequest == false) return false; DescribeInstanceHealthRequest other = (DescribeInstanceHealthRequest) obj; if (other.getLoadBalancerName() == null ^ this.getLoadBalancerName() == null) return false; if (other.getLoadBalancerName() != null && other.getLoadBalancerName().equals(this.getLoadBalancerName()) == false) return false; if (other.getInstances() == null ^ this.getInstances() == null) return false; if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == false) return false; return true; } }
request.addParameter(prefix, StringUtils.fromString(loadBalancerName)); if (describeInstanceHealthRequest.getInstances() != null) { prefix = "Instances"; java.util.List<Instance> instances = describeInstanceHealthRequest.getInstances(); int instancesIndex = 1; String instancesPrefix = prefix;
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerName() == null) ? 0 : getLoadBalancerName().hashCode()); 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 (getLoadBalancerName() != null) sb.append("LoadBalancerName: ").append(getLoadBalancerName()).append(","); if (getInstances() != null) sb.append("Instances: ").append(getInstances()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeInstanceHealthRequest == false) return false; DescribeInstanceHealthRequest other = (DescribeInstanceHealthRequest) obj; if (other.getLoadBalancerName() == null ^ this.getLoadBalancerName() == null) return false; if (other.getLoadBalancerName() != null && other.getLoadBalancerName().equals(this.getLoadBalancerName()) == false) return false; if (other.getInstances() == null ^ this.getInstances() == null) return false; if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == false) return false; return true; }
public Request<DescribeInstanceHealthRequest> marshall(DescribeInstanceHealthRequest describeInstanceHealthRequest) { if (describeInstanceHealthRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<DescribeInstanceHealthRequest> request = new DefaultRequest<DescribeInstanceHealthRequest>(describeInstanceHealthRequest, "AmazonElasticLoadBalancing"); request.addParameter("Action", "DescribeInstanceHealth"); request.addParameter("Version", "2012-06-01"); request.setHttpMethod(HttpMethodName.POST); if (describeInstanceHealthRequest.getLoadBalancerName() != null) { request.addParameter("LoadBalancerName", StringUtils.fromString(describeInstanceHealthRequest.getLoadBalancerName())); } if (!describeInstanceHealthRequest.getInstances().isEmpty() || !((com.amazonaws.internal.SdkInternalList<Instance>) describeInstanceHealthRequest.getInstances()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<Instance> instancesList = (com.amazonaws.internal.SdkInternalList<Instance>) describeInstanceHealthRequest .getInstances(); int instancesListIndex = 1; for (Instance instancesListValue : instancesList) { if (instancesListValue.getInstanceId() != null) { request.addParameter("Instances.member." + instancesListIndex + ".InstanceId", StringUtils.fromString(instancesListValue.getInstanceId())); } instancesListIndex++; } } return request; }