@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerNames() == null) ? 0 : getLoadBalancerNames().hashCode()); return hashCode; }
/** * <p> * The names of the load balancers. * </p> * * @param loadBalancerNames * The names of the load balancers. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTagsRequest withLoadBalancerNames(java.util.Collection<String> loadBalancerNames) { setLoadBalancerNames(loadBalancerNames); return this; }
private Map<String, List<Tag>> getElbTags(AmazonElasticLoadBalancingClient elbClient, List<String> elbNames) { if (isEmpty(elbNames)) { return emptyMap(); } else { final Map<String, List<Tag>> result = newHashMapWithExpectedSize(elbNames.size()); // http://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeTags.html // describeTags expects a maximum of 20 load balancer names per call for (List<String> elbNamePartition : partition(elbNames, ELB_NAMES_MAX_SIZE)) { elbClient.describeTags(new DescribeTagsRequest().withLoadBalancerNames(elbNamePartition)) .getTagDescriptions() .forEach(tagDescription -> result.put(tagDescription.getLoadBalancerName(), tagDescription.getTags())); } return result; } }
elbNamesTemp.add(elbName); if(i%20==0){ tagDescriptions.addAll(elbClient.describeTags( new com.amazonaws.services.elasticloadbalancing.model.DescribeTagsRequest().withLoadBalancerNames(elbNamesTemp)).getTagDescriptions()); elbNamesTemp = new ArrayList<>(); tagDescriptions.addAll(elbClient.describeTags( new com.amazonaws.services.elasticloadbalancing.model.DescribeTagsRequest().withLoadBalancerNames(elbNamesTemp)).getTagDescriptions());
.describeTags(new DescribeTagsRequest().withLoadBalancerNames(subsetNames)); describeTagsResult.getTagDescriptions().forEach(tag -> { try {
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeTagsRequest == false) return false; DescribeTagsRequest other = (DescribeTagsRequest) obj; if (other.getLoadBalancerNames() == null ^ this.getLoadBalancerNames() == null) return false; if (other.getLoadBalancerNames() != null && other.getLoadBalancerNames().equals(this.getLoadBalancerNames()) == false) return false; return true; }
/** * <p> * The names of the load balancers. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setLoadBalancerNames(java.util.Collection)} or {@link #withLoadBalancerNames(java.util.Collection)} if * you want to override the existing values. * </p> * * @param loadBalancerNames * The names of the load balancers. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTagsRequest withLoadBalancerNames(String... loadBalancerNames) { if (this.loadBalancerNames == null) { setLoadBalancerNames(new com.amazonaws.internal.SdkInternalList<String>(loadBalancerNames.length)); } for (String ele : loadBalancerNames) { this.loadBalancerNames.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 (getLoadBalancerNames() != null) sb.append("LoadBalancerNames: ").append(getLoadBalancerNames()); sb.append("}"); return sb.toString(); }
/** * <p> * The names of the load balancers. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param loadBalancerNames <p> * The names of the load balancers. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribeTagsRequest withLoadBalancerNames(java.util.Collection<String> loadBalancerNames) { setLoadBalancerNames(loadBalancerNames); return this; }
public Request<DescribeTagsRequest> marshall(DescribeTagsRequest describeTagsRequest) { if (describeTagsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<DescribeTagsRequest> request = new DefaultRequest<DescribeTagsRequest>(describeTagsRequest, "AmazonElasticLoadBalancing"); request.addParameter("Action", "DescribeTags"); request.addParameter("Version", "2012-06-01"); request.setHttpMethod(HttpMethodName.POST); if (!describeTagsRequest.getLoadBalancerNames().isEmpty() || !((com.amazonaws.internal.SdkInternalList<String>) describeTagsRequest.getLoadBalancerNames()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<String> loadBalancerNamesList = (com.amazonaws.internal.SdkInternalList<String>) describeTagsRequest .getLoadBalancerNames(); int loadBalancerNamesListIndex = 1; for (String loadBalancerNamesListValue : loadBalancerNamesList) { if (loadBalancerNamesListValue != null) { request.addParameter("LoadBalancerNames.member." + loadBalancerNamesListIndex, StringUtils.fromString(loadBalancerNamesListValue)); } loadBalancerNamesListIndex++; } } return request; }
/** * <p> * The names of the load balancers. * </p> * * @param loadBalancerNames * The names of the load balancers. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTagsRequest withLoadBalancerNames(java.util.Collection<String> loadBalancerNames) { setLoadBalancerNames(loadBalancerNames); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerNames() == null) ? 0 : getLoadBalancerNames().hashCode()); return hashCode; }
/** * <p> * The names of the load balancers. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setLoadBalancerNames(java.util.Collection)} or {@link #withLoadBalancerNames(java.util.Collection)} if * you want to override the existing values. * </p> * * @param loadBalancerNames * The names of the load balancers. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTagsRequest withLoadBalancerNames(String... loadBalancerNames) { if (this.loadBalancerNames == null) { setLoadBalancerNames(new com.amazonaws.internal.SdkInternalList<String>(loadBalancerNames.length)); } for (String ele : loadBalancerNames) { this.loadBalancerNames.add(ele); } return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeTagsRequest == false) return false; DescribeTagsRequest other = (DescribeTagsRequest) obj; if (other.getLoadBalancerNames() == null ^ this.getLoadBalancerNames() == null) return false; if (other.getLoadBalancerNames() != null && other.getLoadBalancerNames().equals(this.getLoadBalancerNames()) == false) return false; return true; } }
/** * 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 (getLoadBalancerNames() != null) sb.append("LoadBalancerNames: " + getLoadBalancerNames()); sb.append("}"); return sb.toString(); }
/** * <p> * The names of the load balancers. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param loadBalancerNames <p> * The names of the load balancers. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribeTagsRequest withLoadBalancerNames(String... loadBalancerNames) { if (getLoadBalancerNames() == null) { this.loadBalancerNames = new java.util.ArrayList<String>(loadBalancerNames.length); } for (String value : loadBalancerNames) { this.loadBalancerNames.add(value); } return this; }
public Request<DescribeTagsRequest> marshall(DescribeTagsRequest describeTagsRequest) { if (describeTagsRequest == null) { throw new AmazonClientException( "Invalid argument passed to marshall(DescribeTagsRequest)"); } Request<DescribeTagsRequest> request = new DefaultRequest<DescribeTagsRequest>( describeTagsRequest, "AmazonElasticLoadBalancing"); request.addParameter("Action", "DescribeTags"); request.addParameter("Version", "2012-06-01"); String prefix; if (describeTagsRequest.getLoadBalancerNames() != null) { prefix = "LoadBalancerNames"; java.util.List<String> loadBalancerNames = describeTagsRequest.getLoadBalancerNames(); int loadBalancerNamesIndex = 1; String loadBalancerNamesPrefix = prefix; for (String loadBalancerNamesItem : loadBalancerNames) { prefix = loadBalancerNamesPrefix + ".member." + loadBalancerNamesIndex; if (loadBalancerNamesItem != null) { request.addParameter(prefix, StringUtils.fromString(loadBalancerNamesItem)); } loadBalancerNamesIndex++; } prefix = loadBalancerNamesPrefix; } return request; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerNames() == null) ? 0 : getLoadBalancerNames().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeTagsRequest == false) return false; DescribeTagsRequest other = (DescribeTagsRequest) obj; if (other.getLoadBalancerNames() == null ^ this.getLoadBalancerNames() == null) return false; if (other.getLoadBalancerNames() != null && other.getLoadBalancerNames().equals(this.getLoadBalancerNames()) == 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 (getLoadBalancerNames() != null) sb.append("LoadBalancerNames: ").append(getLoadBalancerNames()); sb.append("}"); return sb.toString(); }