@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; }
@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.getNextToken() != null) { prefix = "NextToken"; String nextToken = describeAutoScalingGroupsRequest.getNextToken(); request.addParameter(prefix, StringUtils.fromString(nextToken));