@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUsers() == null) ? 0 : getUsers().hashCode()); hashCode = prime * hashCode + ((getIsTruncated() == null) ? 0 : getIsTruncated().hashCode()); hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode()); return hashCode; }
/** * <p> * A flag that indicates whether there are more items to return. If your results were truncated, you can make a * subsequent pagination request using the <code>Marker</code> request parameter to retrieve more items. Note that * IAM might return fewer than the <code>MaxItems</code> number of results even when there are more results * available. We recommend that you check <code>IsTruncated</code> after every call to ensure that you receive all * your results. * </p> * * @param isTruncated * A flag that indicates whether there are more items to return. If your results were truncated, you can make * a subsequent pagination request using the <code>Marker</code> request parameter to retrieve more items. * Note that IAM might return fewer than the <code>MaxItems</code> number of results even when there are more * results available. We recommend that you check <code>IsTruncated</code> after every call to ensure that * you receive all your results. * @return Returns a reference to this object so that method calls can be chained together. */ public ListUsersResult withIsTruncated(Boolean isTruncated) { setIsTruncated(isTruncated); return this; }
log.debug("Performing IAM request: {}", listUsersRequest); listUsersResult = iamClient.listUsers(listUsersRequest); final List<User> users = listUsersResult.getUsers(); log.debug("Found {} users", users.size()); for (User user : users) { listUsersRequest.setMarker(listUsersResult.getMarker()); } while (listUsersResult.isTruncated()); this.iamUsers = usersBuilder.build();
List<User> getUsers(final String accountId) { return getIAMClient(accountId).listUsers().getUsers(); }
public ListUsersResult unmarshall(StaxUnmarshallerContext context) throws Exception { ListUsersResult listUsersResult = new ListUsersResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; listUsersResult.withUsers(new ArrayList<User>()); continue; listUsersResult.withUsers(UserStaxUnmarshaller.getInstance().unmarshall(context)); continue; listUsersResult.setIsTruncated(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue; listUsersResult.setMarker(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
while (true) { for (User user : result.getUsers()) { try { ObjectNode n = convertAwsObject(user, null); if (result.isTruncated()) { result = iam.listUsers(new ListUsersRequest().withMarker(result.getMarker())); } else { break;
public ListUsersResult unmarshall(StaxUnmarshallerContext context) throws Exception { ListUsersResult listUsersResult = new ListUsersResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; listUsersResult.withUsers(new ArrayList<User>()); continue; listUsersResult.withUsers(UserStaxUnmarshaller.getInstance().unmarshall(context)); continue; listUsersResult.setIsTruncated(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue; listUsersResult.setMarker(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListUsersResult == false) return false; ListUsersResult other = (ListUsersResult) obj; if (other.getUsers() == null ^ this.getUsers() == null) return false; if (other.getUsers() != null && other.getUsers().equals(this.getUsers()) == false) return false; if (other.getIsTruncated() == null ^ this.getIsTruncated() == null) return false; if (other.getIsTruncated() != null && other.getIsTruncated().equals(this.getIsTruncated()) == false) return false; if (other.getMarker() == null ^ this.getMarker() == null) return false; if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false) return false; return true; }
/** * <p> * A flag that indicates whether there are more items to return. If your results were truncated, you can make a * subsequent pagination request using the <code>Marker</code> request parameter to retrieve more items. Note that * IAM might return fewer than the <code>MaxItems</code> number of results even when there are more results * available. We recommend that you check <code>IsTruncated</code> after every call to ensure that you receive all * your results. * </p> * * @param isTruncated * A flag that indicates whether there are more items to return. If your results were truncated, you can make * a subsequent pagination request using the <code>Marker</code> request parameter to retrieve more items. * Note that IAM might return fewer than the <code>MaxItems</code> number of results even when there are more * results available. We recommend that you check <code>IsTruncated</code> after every call to ensure that * you receive all your results. * @return Returns a reference to this object so that method calls can be chained together. */ public ListUsersResult withIsTruncated(Boolean isTruncated) { setIsTruncated(isTruncated); 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 (getUsers() != null) sb.append("Users: ").append(getUsers()).append(","); if (getIsTruncated() != null) sb.append("IsTruncated: ").append(getIsTruncated()).append(","); if (getMarker() != null) sb.append("Marker: ").append(getMarker()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUsers() == null) ? 0 : getUsers().hashCode()); hashCode = prime * hashCode + ((getIsTruncated() == null) ? 0 : getIsTruncated().hashCode()); hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListUsersResult == false) return false; ListUsersResult other = (ListUsersResult) obj; if (other.getUsers() == null ^ this.getUsers() == null) return false; if (other.getUsers() != null && other.getUsers().equals(this.getUsers()) == false) return false; if (other.getIsTruncated() == null ^ this.getIsTruncated() == null) return false; if (other.getIsTruncated() != null && other.getIsTruncated().equals(this.getIsTruncated()) == false) return false; if (other.getMarker() == null ^ this.getMarker() == null) return false; if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false) return false; return true; }
/** * 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 (getUsers() != null) sb.append("Users: ").append(getUsers()).append(","); if (getIsTruncated() != null) sb.append("IsTruncated: ").append(getIsTruncated()).append(","); if (getMarker() != null) sb.append("Marker: ").append(getMarker()); sb.append("}"); return sb.toString(); }