@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoScalingGroupNames() == null) ? 0 : getAutoScalingGroupNames().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getMaxRecords() == null) ? 0 : getMaxRecords().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 (getAutoScalingGroupNames() != null) sb.append("AutoScalingGroupNames: ").append(getAutoScalingGroupNames()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getMaxRecords() != null) sb.append("MaxRecords: ").append(getMaxRecords()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeAutoScalingGroupsRequest == false) return false; DescribeAutoScalingGroupsRequest other = (DescribeAutoScalingGroupsRequest) obj; if (other.getAutoScalingGroupNames() == null ^ this.getAutoScalingGroupNames() == null) return false; if (other.getAutoScalingGroupNames() != null && other.getAutoScalingGroupNames().equals(this.getAutoScalingGroupNames()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getMaxRecords() == null ^ this.getMaxRecords() == null) return false; if (other.getMaxRecords() != null && other.getMaxRecords().equals(this.getMaxRecords()) == false) return false; return true; }
public Request<DescribeAutoScalingGroupsRequest> marshall(DescribeAutoScalingGroupsRequest describeAutoScalingGroupsRequest) { if (describeAutoScalingGroupsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<DescribeAutoScalingGroupsRequest> request = new DefaultRequest<DescribeAutoScalingGroupsRequest>(describeAutoScalingGroupsRequest, "AmazonAutoScaling"); request.addParameter("Action", "DescribeAutoScalingGroups"); request.addParameter("Version", "2011-01-01"); request.setHttpMethod(HttpMethodName.POST); if (!describeAutoScalingGroupsRequest.getAutoScalingGroupNames().isEmpty() || !((com.amazonaws.internal.SdkInternalList<String>) describeAutoScalingGroupsRequest.getAutoScalingGroupNames()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<String> autoScalingGroupNamesList = (com.amazonaws.internal.SdkInternalList<String>) describeAutoScalingGroupsRequest .getAutoScalingGroupNames(); int autoScalingGroupNamesListIndex = 1; for (String autoScalingGroupNamesListValue : autoScalingGroupNamesList) { if (autoScalingGroupNamesListValue != null) { request.addParameter("AutoScalingGroupNames.member." + autoScalingGroupNamesListIndex, StringUtils.fromString(autoScalingGroupNamesListValue)); } autoScalingGroupNamesListIndex++; } } if (describeAutoScalingGroupsRequest.getNextToken() != null) { request.addParameter("NextToken", StringUtils.fromString(describeAutoScalingGroupsRequest.getNextToken())); } if (describeAutoScalingGroupsRequest.getMaxRecords() != null) { request.addParameter("MaxRecords", StringUtils.fromInteger(describeAutoScalingGroupsRequest.getMaxRecords())); } return request; }
/** * <p> * The names of the Auto Scaling groups. You can specify up to * <code>MaxRecords</code> names. If you omit this parameter, all Auto * Scaling groups are described. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param autoScalingGroupNames <p> * The names of the Auto Scaling groups. You can specify up to * <code>MaxRecords</code> names. If you omit this parameter, all * Auto Scaling groups are described. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribeAutoScalingGroupsRequest withAutoScalingGroupNames( String... autoScalingGroupNames) { if (getAutoScalingGroupNames() == null) { this.autoScalingGroupNames = new java.util.ArrayList<String>( autoScalingGroupNames.length); } for (String value : autoScalingGroupNames) { this.autoScalingGroupNames.add(value); } return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoScalingGroupNames() == null) ? 0 : getAutoScalingGroupNames().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getMaxRecords() == null) ? 0 : getMaxRecords().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 (getAutoScalingGroupNames() != null) sb.append("AutoScalingGroupNames: " + getAutoScalingGroupNames() + ","); if (getNextToken() != null) sb.append("NextToken: " + getNextToken() + ","); if (getMaxRecords() != null) sb.append("MaxRecords: " + getMaxRecords()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeAutoScalingGroupsRequest == false) return false; DescribeAutoScalingGroupsRequest other = (DescribeAutoScalingGroupsRequest) obj; if (other.getAutoScalingGroupNames() == null ^ this.getAutoScalingGroupNames() == null) return false; if (other.getAutoScalingGroupNames() != null && other.getAutoScalingGroupNames().equals(this.getAutoScalingGroupNames()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getMaxRecords() == null ^ this.getMaxRecords() == null) return false; if (other.getMaxRecords() != null && other.getMaxRecords().equals(this.getMaxRecords()) == false) return false; return true; } }
if (describeAutoScalingGroupsRequest.getAutoScalingGroupNames() != null) { prefix = "AutoScalingGroupNames"; java.util.List<String> autoScalingGroupNames = describeAutoScalingGroupsRequest .getAutoScalingGroupNames(); int autoScalingGroupNamesIndex = 1; String autoScalingGroupNamesPrefix = prefix;