@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getResourceId() == null) ? 0 : getResourceId().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; }
/** * <p> * The ID for the specified resource. * </p> * * @param resourceId * The ID for the specified resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceTagSet withResourceId(String resourceId) { setResourceId(resourceId); return this; }
setResourceType(resourceType); return this;
public ResourceTagSet unmarshall(StaxUnmarshallerContext context) throws Exception { ResourceTagSet resourceTagSet = new ResourceTagSet(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; resourceTagSet.setResourceType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; resourceTagSet.setResourceId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; resourceTagSet.withTags(new ArrayList<Tag>()); continue; resourceTagSet.withTags(TagStaxUnmarshaller.getInstance().unmarshall(context)); continue;
/** * <p> * The tags associated with the specified resource. * </p> * * @param tags * The tags associated with the specified resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceTagSet withTags(java.util.Collection<Tag> tags) { setTags(tags); return this; }
withResourceType(resourceType);
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceTagSet() == null) ? 0 : getResourceTagSet().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListTagsForResourceResult == false) return false; ListTagsForResourceResult other = (ListTagsForResourceResult) obj; if (other.getResourceTagSet() == null ^ this.getResourceTagSet() == null) return false; if (other.getResourceTagSet() != null && other.getResourceTagSet().equals(this.getResourceTagSet()) == false) return false; return true; }
/** * <p> * The tags associated with the specified resource. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. * </p> * * @param tags * The tags associated with the specified resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceTagSet withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList<Tag>(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ResourceTagSet == false) return false; ResourceTagSet other = (ResourceTagSet) obj; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getResourceId() == null ^ this.getResourceId() == null) return false; if (other.getResourceId() != null && other.getResourceId().equals(this.getResourceId()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == 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 (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getResourceId() != null) sb.append("ResourceId: ").append(getResourceId()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); }