@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTagDescriptions() == null) ? 0 : getTagDescriptions().hashCode()); return hashCode; }
public DescribeTagsResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeTagsResult describeTagsResult = new DescribeTagsResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeTagsResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("TagDescriptions", targetDepth)) { describeTagsResult.withTagDescriptions(new ArrayList<TagDescription>()); continue; } if (context.testExpression("TagDescriptions/member", targetDepth)) { describeTagsResult.withTagDescriptions(TagDescriptionStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeTagsResult; } } } }
/** * <p> * Information about the tags. * </p> * * @param tagDescriptions * Information about the tags. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTagsResult withTagDescriptions(java.util.Collection<TagDescription> tagDescriptions) { setTagDescriptions(tagDescriptions); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeTagsResult == false) return false; DescribeTagsResult other = (DescribeTagsResult) obj; if (other.getTagDescriptions() == null ^ this.getTagDescriptions() == null) return false; if (other.getTagDescriptions() != null && other.getTagDescriptions().equals(this.getTagDescriptions()) == false) return false; return true; }
public DescribeTagsResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeTagsResult describeTagsResult = new DescribeTagsResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("TagDescriptions/member", targetDepth)) { describeTagsResult.withTagDescriptions(TagDescriptionStaxUnmarshaller .getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return describeTagsResult; }
/** * <p> * Information about the tags. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setTagDescriptions(java.util.Collection)} or {@link #withTagDescriptions(java.util.Collection)} if you * want to override the existing values. * </p> * * @param tagDescriptions * Information about the tags. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTagsResult withTagDescriptions(TagDescription... tagDescriptions) { if (this.tagDescriptions == null) { setTagDescriptions(new com.amazonaws.internal.SdkInternalList<TagDescription>(tagDescriptions.length)); } for (TagDescription ele : tagDescriptions) { this.tagDescriptions.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 (getTagDescriptions() != null) sb.append("TagDescriptions: ").append(getTagDescriptions()); sb.append("}"); return sb.toString(); }
public DescribeTagsResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeTagsResult describeTagsResult = new DescribeTagsResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeTagsResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("TagDescriptions", targetDepth)) { describeTagsResult.withTagDescriptions(new ArrayList<TagDescription>()); continue; } if (context.testExpression("TagDescriptions/member", targetDepth)) { describeTagsResult.withTagDescriptions(TagDescriptionStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeTagsResult; } } } }
/** * <p> * Information about the tags. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param tagDescriptions <p> * Information about the tags. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribeTagsResult withTagDescriptions( java.util.Collection<TagDescription> tagDescriptions) { setTagDescriptions(tagDescriptions); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTagDescriptions() == null) ? 0 : getTagDescriptions().hashCode()); return hashCode; }
/** * <p> * Information about the tags. * </p> * * @param tagDescriptions * Information about the tags. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTagsResult withTagDescriptions(java.util.Collection<TagDescription> tagDescriptions) { setTagDescriptions(tagDescriptions); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeTagsResult == false) return false; DescribeTagsResult other = (DescribeTagsResult) obj; if (other.getTagDescriptions() == null ^ this.getTagDescriptions() == null) return false; if (other.getTagDescriptions() != null && other.getTagDescriptions().equals(this.getTagDescriptions()) == false) return false; return true; } }
/** * <p> * Information about the tags. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setTagDescriptions(java.util.Collection)} or {@link #withTagDescriptions(java.util.Collection)} if you * want to override the existing values. * </p> * * @param tagDescriptions * Information about the tags. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTagsResult withTagDescriptions(TagDescription... tagDescriptions) { if (this.tagDescriptions == null) { setTagDescriptions(new com.amazonaws.internal.SdkInternalList<TagDescription>(tagDescriptions.length)); } for (TagDescription ele : tagDescriptions) { this.tagDescriptions.add(ele); } return this; }
/** * 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 (getTagDescriptions() != null) sb.append("TagDescriptions: " + getTagDescriptions()); sb.append("}"); return sb.toString(); }
/** * <p> * Information about the tags. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param tagDescriptions <p> * Information about the tags. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribeTagsResult withTagDescriptions(TagDescription... tagDescriptions) { if (getTagDescriptions() == null) { this.tagDescriptions = new java.util.ArrayList<TagDescription>(tagDescriptions.length); } for (TagDescription value : tagDescriptions) { this.tagDescriptions.add(value); } return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTagDescriptions() == null) ? 0 : getTagDescriptions().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeTagsResult == false) return false; DescribeTagsResult other = (DescribeTagsResult) obj; if (other.getTagDescriptions() == null ^ this.getTagDescriptions() == null) return false; if (other.getTagDescriptions() != null && other.getTagDescriptions().equals(this.getTagDescriptions()) == 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 (getTagDescriptions() != null) sb.append("TagDescriptions: ").append(getTagDescriptions()); sb.append("}"); return sb.toString(); }
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());