@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKeyId() == null) ? 0 : getKeyId().hashCode()); hashCode = prime * hashCode + ((getGrantTokens() == null) ? 0 : getGrantTokens().hashCode()); return hashCode; }
/** * <p> * A list of grant tokens. * </p> * <p> * For more information, see <a * href="http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token">Grant Tokens</a> in the * <i>AWS Key Management Service Developer Guide</i>. * </p> * * @param grantTokens * A list of grant tokens.</p> * <p> * For more information, see <a * href="http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token">Grant Tokens</a> in * the <i>AWS Key Management Service Developer Guide</i>. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeKeyRequest withGrantTokens(java.util.Collection<String> grantTokens) { setGrantTokens(grantTokens); return this; }
setKeyId(keyId); return this;
if (getGrantTokens() == null) { this.grantTokens = new java.util.ArrayList<String>(grantTokens.length);
KMSKeyVH kmsKey = new KMSKeyVH(); try { DescribeKeyResult result = awskms.describeKey(new DescribeKeyRequest().withKeyId(key.getKeyId())); kmsKey.setKey(result.getKeyMetadata()); kmsKey.setTags(awskms.listResourceTags(new ListResourceTagsRequest().withKeyId(key.getKeyId())).getTags());
if (getGrantTokens() == null) { this.grantTokens = new java.util.ArrayList<String>(grantTokens.length);
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeKeyRequest == false) return false; DescribeKeyRequest other = (DescribeKeyRequest) obj; if (other.getKeyId() == null ^ this.getKeyId() == null) return false; if (other.getKeyId() != null && other.getKeyId().equals(this.getKeyId()) == false) return false; if (other.getGrantTokens() == null ^ this.getGrantTokens() == null) return false; if (other.getGrantTokens() != null && other.getGrantTokens().equals(this.getGrantTokens()) == false) return false; return true; }
setGrantTokens(new com.amazonaws.internal.SdkInternalList<String>(grantTokens.length));
if (getGrantTokens() == null) { this.grantTokens = new java.util.ArrayList<String>(grantTokens.length);
setKeyId(keyId); 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 (getKeyId() != null) sb.append("KeyId: ").append(getKeyId()).append(","); if (getGrantTokens() != null) sb.append("GrantTokens: ").append(getGrantTokens()); sb.append("}"); return sb.toString(); }
/** * <p> * A list of grant tokens. * </p> * <p> * For more information, see <a href= * "http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token" * >Grant Tokens</a> in the <i>AWS Key Management Service Developer * Guide</i>. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param grantTokens <p> * A list of grant tokens. * </p> * <p> * For more information, see <a href= * "http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token" * >Grant Tokens</a> in the <i>AWS Key Management Service * Developer Guide</i>. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribeKeyRequest withGrantTokens(java.util.Collection<String> grantTokens) { setGrantTokens(grantTokens); return this; }
setKeyId(keyId); return this;
/** * Marshall the given parameter object. */ public void marshall(DescribeKeyRequest describeKeyRequest, ProtocolMarshaller protocolMarshaller) { if (describeKeyRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeKeyRequest.getKeyId(), KEYID_BINDING); protocolMarshaller.marshall(describeKeyRequest.getGrantTokens(), GRANTTOKENS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * <p> * A list of grant tokens. * </p> * <p> * For more information, see <a * href="http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token">Grant Tokens</a> in the * <i>AWS Key Management Service Developer Guide</i>. * </p> * * @param grantTokens * A list of grant tokens.</p> * <p> * For more information, see <a * href="http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token">Grant Tokens</a> in * the <i>AWS Key Management Service Developer Guide</i>. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeKeyRequest withGrantTokens(java.util.Collection<String> grantTokens) { setGrantTokens(grantTokens); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKeyId() == null) ? 0 : getKeyId().hashCode()); hashCode = prime * hashCode + ((getGrantTokens() == null) ? 0 : getGrantTokens().hashCode()); return hashCode; }
/** * <p> * A list of grant tokens. * </p> * <p> * For more information, see <a * href="http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token">Grant Tokens</a> in the * <i>AWS Key Management Service Developer Guide</i>. * </p> * * @param grantTokens * A list of grant tokens.</p> * <p> * For more information, see <a * href="http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token">Grant Tokens</a> in * the <i>AWS Key Management Service Developer Guide</i>. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeKeyRequest withGrantTokens(java.util.Collection<String> grantTokens) { setGrantTokens(grantTokens); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeKeyRequest == false) return false; DescribeKeyRequest other = (DescribeKeyRequest) obj; if (other.getKeyId() == null ^ this.getKeyId() == null) return false; if (other.getKeyId() != null && other.getKeyId().equals(this.getKeyId()) == false) return false; if (other.getGrantTokens() == null ^ this.getGrantTokens() == null) return false; if (other.getGrantTokens() != null && other.getGrantTokens().equals(this.getGrantTokens()) == false) return false; return true; } }
/** * <p> * A list of grant tokens. * </p> * <p> * For more information, see <a href= * "http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token" * >Grant Tokens</a> in the <i>AWS Key Management Service Developer * Guide</i>. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param grantTokens <p> * A list of grant tokens. * </p> * <p> * For more information, see <a href= * "http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token" * >Grant Tokens</a> in the <i>AWS Key Management Service * Developer Guide</i>. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribeKeyRequest withGrantTokens(java.util.Collection<String> grantTokens) { setGrantTokens(grantTokens); 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 (getKeyId() != null) sb.append("KeyId: " + getKeyId() + ","); if (getGrantTokens() != null) sb.append("GrantTokens: " + getGrantTokens()); sb.append("}"); return sb.toString(); }