@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKeyId() == null) ? 0 : getKeyId().hashCode()); hashCode = prime * hashCode + ((getGranteePrincipal() == null) ? 0 : getGranteePrincipal().hashCode()); hashCode = prime * hashCode + ((getRetiringPrincipal() == null) ? 0 : getRetiringPrincipal().hashCode()); hashCode = prime * hashCode + ((getOperations() == null) ? 0 : getOperations().hashCode()); hashCode = prime * hashCode + ((getConstraints() == null) ? 0 : getConstraints().hashCode()); hashCode = prime * hashCode + ((getGrantTokens() == null) ? 0 : getGrantTokens().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().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 CreateGrantRequest withGrantTokens(java.util.Collection<String> grantTokens) { setGrantTokens(grantTokens); return this; }
/** * <p> * A list of operations that the grant permits. * </p> * * @param operations * A list of operations that the grant permits. * @return Returns a reference to this object so that method calls can be chained together. * @see GrantOperation */ public CreateGrantRequest withOperations(GrantOperation... operations) { com.amazonaws.internal.SdkInternalList<String> operationsCopy = new com.amazonaws.internal.SdkInternalList<String>(operations.length); for (GrantOperation value : operations) { operationsCopy.add(value.toString()); } if (getOperations() == null) { setOperations(operationsCopy); } else { getOperations().addAll(operationsCopy); } return this; }
/** * <p> * A list of operations that the grant permits. * </p> * * @param operations * A list of operations that the grant permits. * @return Returns a reference to this object so that method calls can be chained together. * @see GrantOperation */ public CreateGrantRequest withOperations(java.util.Collection<String> operations) { setOperations(operations); return this; }
/** * <p> * A list of operations that the grant permits. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param operations <p> * A list of operations that the grant permits. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public CreateGrantRequest withOperations(String... operations) { if (getOperations() == null) { this.operations = new java.util.ArrayList<String>(operations.length); } for (String value : operations) { this.operations.add(value); } return this; }
if (getGrantTokens() == null) { this.grantTokens = new java.util.ArrayList<String>(grantTokens.length);
/** * <p> * A structure that you can use to allow certain operations in the grant only when the desired encryption context is * present. For more information about encryption context, see <a * href="http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html">Encryption Context</a> in the * <i>AWS Key Management Service Developer Guide</i>. * </p> * * @param constraints * A structure that you can use to allow certain operations in the grant only when the desired encryption * context is present. For more information about encryption context, see <a * href="http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html">Encryption Context</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 CreateGrantRequest withConstraints(GrantConstraints constraints) { setConstraints(constraints); return this; }
/** * <p> * A list of operations that the grant permits. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setOperations(java.util.Collection)} or {@link #withOperations(java.util.Collection)} if you want to * override the existing values. * </p> * * @param operations * A list of operations that the grant permits. * @return Returns a reference to this object so that method calls can be chained together. * @see GrantOperation */ public CreateGrantRequest withOperations(String... operations) { if (this.operations == null) { setOperations(new com.amazonaws.internal.SdkInternalList<String>(operations.length)); } for (String ele : operations) { this.operations.add(ele); } return this; }
/** * <p> * A list of operations that the grant permits. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param operations <p> * A list of operations that the grant permits. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public CreateGrantRequest withOperations(String... operations) { if (getOperations() == null) { this.operations = new java.util.ArrayList<String>(operations.length); } for (String value : operations) { this.operations.add(value); } return this; }
if (getGrantTokens() == null) { this.grantTokens = new java.util.ArrayList<String>(grantTokens.length);
/** * <p> * A structure that you can use to allow certain operations in the grant only when the desired encryption context is * present. For more information about encryption context, see <a * href="http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html">Encryption Context</a> in the * <i>AWS Key Management Service Developer Guide</i>. * </p> * * @param constraints * A structure that you can use to allow certain operations in the grant only when the desired encryption * context is present. For more information about encryption context, see <a * href="http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html">Encryption Context</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 CreateGrantRequest withConstraints(GrantConstraints constraints) { setConstraints(constraints); return this; }
return false; CreateGrantRequest other = (CreateGrantRequest) obj; if (other.getKeyId() == null ^ this.getKeyId() == null) return false; if (other.getKeyId() != null && other.getKeyId().equals(this.getKeyId()) == false) return false; if (other.getGranteePrincipal() == null ^ this.getGranteePrincipal() == null) return false; if (other.getGranteePrincipal() != null && other.getGranteePrincipal().equals(this.getGranteePrincipal()) == false) return false; if (other.getRetiringPrincipal() == null ^ this.getRetiringPrincipal() == null) return false; if (other.getRetiringPrincipal() != null && other.getRetiringPrincipal().equals(this.getRetiringPrincipal()) == false) return false; if (other.getOperations() == null ^ this.getOperations() == null) return false; if (other.getOperations() != null && other.getOperations().equals(this.getOperations()) == false) return false; if (other.getConstraints() == null ^ this.getConstraints() == null) return false; if (other.getConstraints() != null && other.getConstraints().equals(this.getConstraints()) == false) return false; if (other.getGrantTokens() == null ^ this.getGrantTokens() == null) return false; if (other.getGrantTokens() != null && other.getGrantTokens().equals(this.getGrantTokens()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false)
/** * <p> * A list of operations that the grant permits. * </p> * * @param operations * A list of operations that the grant permits. * @return Returns a reference to this object so that method calls can be chained together. * @see GrantOperation */ public CreateGrantRequest withOperations(GrantOperation... operations) { com.amazonaws.internal.SdkInternalList<String> operationsCopy = new com.amazonaws.internal.SdkInternalList<String>(operations.length); for (GrantOperation value : operations) { operationsCopy.add(value.toString()); } if (getOperations() == null) { setOperations(operationsCopy); } else { getOperations().addAll(operationsCopy); } return this; }
/** * <p> * A list of operations that the grant permits. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param operations <p> * A list of operations that the grant permits. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public CreateGrantRequest withOperations(java.util.Collection<String> operations) { setOperations(operations); return this; }
setGrantTokens(new com.amazonaws.internal.SdkInternalList<String>(grantTokens.length));
/** * <p> * A list of operations that the grant permits. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param operations <p> * A list of operations that the grant permits. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public CreateGrantRequest withOperations(String... operations) { if (getOperations() == null) { this.operations = new java.util.ArrayList<String>(operations.length); } for (String value : operations) { this.operations.add(value); } return this; }
if (getGrantTokens() == null) { this.grantTokens = new java.util.ArrayList<String>(grantTokens.length);
/** * <p> * A structure that you can use to allow certain operations in the grant only when the desired encryption context is * present. For more information about encryption context, see <a * href="http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html">Encryption Context</a> in the * <i>AWS Key Management Service Developer Guide</i>. * </p> * * @param constraints * A structure that you can use to allow certain operations in the grant only when the desired encryption * context is present. For more information about encryption context, see <a * href="http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html">Encryption Context</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 CreateGrantRequest withConstraints(GrantConstraints constraints) { setConstraints(constraints); 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 (getGranteePrincipal() != null) sb.append("GranteePrincipal: ").append(getGranteePrincipal()).append(","); if (getRetiringPrincipal() != null) sb.append("RetiringPrincipal: ").append(getRetiringPrincipal()).append(","); if (getOperations() != null) sb.append("Operations: ").append(getOperations()).append(","); if (getConstraints() != null) sb.append("Constraints: ").append(getConstraints()).append(","); if (getGrantTokens() != null) sb.append("GrantTokens: ").append(getGrantTokens()).append(","); if (getName() != null) sb.append("Name: ").append(getName()); sb.append("}"); return sb.toString(); }
/** * <p> * A list of operations that the grant permits. * </p> * * @param operations * A list of operations that the grant permits. * @return Returns a reference to this object so that method calls can be chained together. * @see GrantOperation */ public CreateGrantRequest withOperations(GrantOperation... operations) { com.amazonaws.internal.SdkInternalList<String> operationsCopy = new com.amazonaws.internal.SdkInternalList<String>(operations.length); for (GrantOperation value : operations) { operationsCopy.add(value.toString()); } if (getOperations() == null) { setOperations(operationsCopy); } else { getOperations().addAll(operationsCopy); } return this; }