/** * <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; }
/** * 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(); }
@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; }
/** * Marshall the given parameter object. */ public void marshall(CreateGrantRequest createGrantRequest, ProtocolMarshaller protocolMarshaller) { if (createGrantRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createGrantRequest.getKeyId(), KEYID_BINDING); protocolMarshaller.marshall(createGrantRequest.getGranteePrincipal(), GRANTEEPRINCIPAL_BINDING); protocolMarshaller.marshall(createGrantRequest.getRetiringPrincipal(), RETIRINGPRINCIPAL_BINDING); protocolMarshaller.marshall(createGrantRequest.getOperations(), OPERATIONS_BINDING); protocolMarshaller.marshall(createGrantRequest.getConstraints(), CONSTRAINTS_BINDING); protocolMarshaller.marshall(createGrantRequest.getGrantTokens(), GRANTTOKENS_BINDING); protocolMarshaller.marshall(createGrantRequest.getName(), NAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
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)
/** * <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; }
/** * 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 (getGranteePrincipal() != null) sb.append("GranteePrincipal: " + getGranteePrincipal() + ","); if (getRetiringPrincipal() != null) sb.append("RetiringPrincipal: " + getRetiringPrincipal() + ","); if (getOperations() != null) sb.append("Operations: " + getOperations() + ","); if (getConstraints() != null) sb.append("Constraints: " + getConstraints() + ","); if (getGrantTokens() != null) sb.append("GrantTokens: " + getGrantTokens() + ","); if (getName() != null) sb.append("Name: " + getName()); sb.append("}"); return sb.toString(); }
@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; }
&& 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)
jsonWriter.value(retiringPrincipal); if (createGrantRequest.getOperations() != null) { java.util.List<String> operations = createGrantRequest.getOperations(); jsonWriter.name("Operations"); jsonWriter.beginArray();
/** * <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; }
/** * <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; }
/** * <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(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; }
@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; }
@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; }
@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; }
@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; }
/** * Marshall the given parameter object. */ public void marshall(CreateGrantRequest createGrantRequest, ProtocolMarshaller protocolMarshaller) { if (createGrantRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createGrantRequest.getKeyId(), KEYID_BINDING); protocolMarshaller.marshall(createGrantRequest.getGranteePrincipal(), GRANTEEPRINCIPAL_BINDING); protocolMarshaller.marshall(createGrantRequest.getRetiringPrincipal(), RETIRINGPRINCIPAL_BINDING); protocolMarshaller.marshall(createGrantRequest.getOperations(), OPERATIONS_BINDING); protocolMarshaller.marshall(createGrantRequest.getConstraints(), CONSTRAINTS_BINDING); protocolMarshaller.marshall(createGrantRequest.getGrantTokens(), GRANTTOKENS_BINDING); protocolMarshaller.marshall(createGrantRequest.getName(), NAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(CreateGrantRequest createGrantRequest, ProtocolMarshaller protocolMarshaller) { if (createGrantRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createGrantRequest.getKeyId(), KEYID_BINDING); protocolMarshaller.marshall(createGrantRequest.getGranteePrincipal(), GRANTEEPRINCIPAL_BINDING); protocolMarshaller.marshall(createGrantRequest.getRetiringPrincipal(), RETIRINGPRINCIPAL_BINDING); protocolMarshaller.marshall(createGrantRequest.getOperations(), OPERATIONS_BINDING); protocolMarshaller.marshall(createGrantRequest.getConstraints(), CONSTRAINTS_BINDING); protocolMarshaller.marshall(createGrantRequest.getGrantTokens(), GRANTTOKENS_BINDING); protocolMarshaller.marshall(createGrantRequest.getName(), NAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }