@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceArn() == null) ? 0 : getResourceArn().hashCode()); hashCode = prime * hashCode + ((getTagKeys() == null) ? 0 : getTagKeys().hashCode()); return hashCode; }
/** * <p> * The Amazon Resource Name (ARN) of the resource from which to remove tags. Currently, the only supported resource * is an Amazon ECR repository. * </p> * * @param resourceArn * The Amazon Resource Name (ARN) of the resource from which to remove tags. Currently, the only supported * resource is an Amazon ECR repository. * @return Returns a reference to this object so that method calls can be chained together. */ public UntagResourceRequest withResourceArn(String resourceArn) { setResourceArn(resourceArn); return this; }
/** * <p> * The keys of the tags to be removed. * </p> * * @param tagKeys * The keys of the tags to be removed. * @return Returns a reference to this object so that method calls can be chained together. */ public UntagResourceRequest withTagKeys(java.util.Collection<String> tagKeys) { setTagKeys(tagKeys); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UntagResourceRequest == false) return false; UntagResourceRequest other = (UntagResourceRequest) obj; if (other.getResourceArn() == null ^ this.getResourceArn() == null) return false; if (other.getResourceArn() != null && other.getResourceArn().equals(this.getResourceArn()) == false) return false; if (other.getTagKeys() == null ^ this.getTagKeys() == null) return false; if (other.getTagKeys() != null && other.getTagKeys().equals(this.getTagKeys()) == false) return false; return true; }
/** * <p> * The keys of the tags to be removed. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setTagKeys(java.util.Collection)} or {@link #withTagKeys(java.util.Collection)} if you want to override * the existing values. * </p> * * @param tagKeys * The keys of the tags to be removed. * @return Returns a reference to this object so that method calls can be chained together. */ public UntagResourceRequest withTagKeys(String... tagKeys) { if (this.tagKeys == null) { setTagKeys(new java.util.ArrayList<String>(tagKeys.length)); } for (String ele : tagKeys) { this.tagKeys.add(ele); } return this; }
/** * <p> * The Amazon Resource Name (ARN) of the resource from which to remove tags. Currently, the only supported resource * is an Amazon ECR repository. * </p> * * @param resourceArn * The Amazon Resource Name (ARN) of the resource from which to remove tags. Currently, the only supported * resource is an Amazon ECR repository. * @return Returns a reference to this object so that method calls can be chained together. */ public UntagResourceRequest withResourceArn(String resourceArn) { setResourceArn(resourceArn); 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 (getResourceArn() != null) sb.append("ResourceArn: ").append(getResourceArn()).append(","); if (getTagKeys() != null) sb.append("TagKeys: ").append(getTagKeys()); sb.append("}"); return sb.toString(); }
/** * <p> * The keys of the tags to be removed. * </p> * * @param tagKeys * The keys of the tags to be removed. * @return Returns a reference to this object so that method calls can be chained together. */ public UntagResourceRequest withTagKeys(java.util.Collection<String> tagKeys) { setTagKeys(tagKeys); return this; }
/** * Marshall the given parameter object. */ public void marshall(UntagResourceRequest untagResourceRequest, ProtocolMarshaller protocolMarshaller) { if (untagResourceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(untagResourceRequest.getResourceArn(), RESOURCEARN_BINDING); protocolMarshaller.marshall(untagResourceRequest.getTagKeys(), TAGKEYS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * <p> * The keys of the tags to be removed. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setTagKeys(java.util.Collection)} or {@link #withTagKeys(java.util.Collection)} if you want to override * the existing values. * </p> * * @param tagKeys * The keys of the tags to be removed. * @return Returns a reference to this object so that method calls can be chained together. */ public UntagResourceRequest withTagKeys(String... tagKeys) { if (this.tagKeys == null) { setTagKeys(new java.util.ArrayList<String>(tagKeys.length)); } for (String ele : tagKeys) { this.tagKeys.add(ele); } return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceArn() == null) ? 0 : getResourceArn().hashCode()); hashCode = prime * hashCode + ((getTagKeys() == null) ? 0 : getTagKeys().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UntagResourceRequest == false) return false; UntagResourceRequest other = (UntagResourceRequest) obj; if (other.getResourceArn() == null ^ this.getResourceArn() == null) return false; if (other.getResourceArn() != null && other.getResourceArn().equals(this.getResourceArn()) == false) return false; if (other.getTagKeys() == null ^ this.getTagKeys() == null) return false; if (other.getTagKeys() != null && other.getTagKeys().equals(this.getTagKeys()) == 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 (getResourceArn() != null) sb.append("ResourceArn: ").append(getResourceArn()).append(","); if (getTagKeys() != null) sb.append("TagKeys: ").append(getTagKeys()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(UntagResourceRequest untagResourceRequest, ProtocolMarshaller protocolMarshaller) { if (untagResourceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(untagResourceRequest.getResourceArn(), RESOURCEARN_BINDING); protocolMarshaller.marshall(untagResourceRequest.getTagKeys(), TAGKEYS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }