@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUserName() == null) ? 0 : getUserName().hashCode()); hashCode = prime * hashCode + ((getPolicyName() == null) ? 0 : getPolicyName().hashCode()); hashCode = prime * hashCode + ((getPolicyDocument() == null) ? 0 : getPolicyDocument().hashCode()); return hashCode; }
/** * 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 (getUserName() != null) sb.append("UserName: ").append(getUserName()).append(","); if (getPolicyName() != null) sb.append("PolicyName: ").append(getPolicyName()).append(","); if (getPolicyDocument() != null) sb.append("PolicyDocument: ").append(getPolicyDocument()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutUserPolicyRequest == false) return false; PutUserPolicyRequest other = (PutUserPolicyRequest) obj; if (other.getUserName() == null ^ this.getUserName() == null) return false; if (other.getUserName() != null && other.getUserName().equals(this.getUserName()) == false) return false; if (other.getPolicyName() == null ^ this.getPolicyName() == null) return false; if (other.getPolicyName() != null && other.getPolicyName().equals(this.getPolicyName()) == false) return false; if (other.getPolicyDocument() == null ^ this.getPolicyDocument() == null) return false; if (other.getPolicyDocument() != null && other.getPolicyDocument().equals(this.getPolicyDocument()) == false) return false; return true; }
public Request<PutUserPolicyRequest> marshall(PutUserPolicyRequest putUserPolicyRequest) { if (putUserPolicyRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<PutUserPolicyRequest> request = new DefaultRequest<PutUserPolicyRequest>(putUserPolicyRequest, "AmazonIdentityManagement"); request.addParameter("Action", "PutUserPolicy"); request.addParameter("Version", "2010-05-08"); request.setHttpMethod(HttpMethodName.POST); if (putUserPolicyRequest.getUserName() != null) { request.addParameter("UserName", StringUtils.fromString(putUserPolicyRequest.getUserName())); } if (putUserPolicyRequest.getPolicyName() != null) { request.addParameter("PolicyName", StringUtils.fromString(putUserPolicyRequest.getPolicyName())); } if (putUserPolicyRequest.getPolicyDocument() != null) { request.addParameter("PolicyDocument", StringUtils.fromString(putUserPolicyRequest.getPolicyDocument())); } return request; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUserName() == null) ? 0 : getUserName().hashCode()); hashCode = prime * hashCode + ((getPolicyName() == null) ? 0 : getPolicyName().hashCode()); hashCode = prime * hashCode + ((getPolicyDocument() == null) ? 0 : getPolicyDocument().hashCode()); return hashCode; }
/** * 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 (getUserName() != null) sb.append("UserName: ").append(getUserName()).append(","); if (getPolicyName() != null) sb.append("PolicyName: ").append(getPolicyName()).append(","); if (getPolicyDocument() != null) sb.append("PolicyDocument: ").append(getPolicyDocument()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutUserPolicyRequest == false) return false; PutUserPolicyRequest other = (PutUserPolicyRequest) obj; if (other.getUserName() == null ^ this.getUserName() == null) return false; if (other.getUserName() != null && other.getUserName().equals(this.getUserName()) == false) return false; if (other.getPolicyName() == null ^ this.getPolicyName() == null) return false; if (other.getPolicyName() != null && other.getPolicyName().equals(this.getPolicyName()) == false) return false; if (other.getPolicyDocument() == null ^ this.getPolicyDocument() == null) return false; if (other.getPolicyDocument() != null && other.getPolicyDocument().equals(this.getPolicyDocument()) == false) return false; return true; }
public Request<PutUserPolicyRequest> marshall(PutUserPolicyRequest putUserPolicyRequest) { if (putUserPolicyRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<PutUserPolicyRequest> request = new DefaultRequest<PutUserPolicyRequest>(putUserPolicyRequest, "AmazonIdentityManagement"); request.addParameter("Action", "PutUserPolicy"); request.addParameter("Version", "2010-05-08"); request.setHttpMethod(HttpMethodName.POST); if (putUserPolicyRequest.getUserName() != null) { request.addParameter("UserName", StringUtils.fromString(putUserPolicyRequest.getUserName())); } if (putUserPolicyRequest.getPolicyName() != null) { request.addParameter("PolicyName", StringUtils.fromString(putUserPolicyRequest.getPolicyName())); } if (putUserPolicyRequest.getPolicyDocument() != null) { request.addParameter("PolicyDocument", StringUtils.fromString(putUserPolicyRequest.getPolicyDocument())); } return request; }