@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDBSecurityGroupName() == null) ? 0 : getDBSecurityGroupName().hashCode()); hashCode = prime * hashCode + ((getDBSecurityGroupDescription() == null) ? 0 : getDBSecurityGroupDescription().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().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 (getDBSecurityGroupName() != null) sb.append("DBSecurityGroupName: ").append(getDBSecurityGroupName()).append(","); if (getDBSecurityGroupDescription() != null) sb.append("DBSecurityGroupDescription: ").append(getDBSecurityGroupDescription()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateDBSecurityGroupRequest == false) return false; CreateDBSecurityGroupRequest other = (CreateDBSecurityGroupRequest) obj; if (other.getDBSecurityGroupName() == null ^ this.getDBSecurityGroupName() == null) return false; if (other.getDBSecurityGroupName() != null && other.getDBSecurityGroupName().equals(this.getDBSecurityGroupName()) == false) return false; if (other.getDBSecurityGroupDescription() == null ^ this.getDBSecurityGroupDescription() == null) return false; if (other.getDBSecurityGroupDescription() != null && other.getDBSecurityGroupDescription().equals(this.getDBSecurityGroupDescription()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; }
public Request<CreateDBSecurityGroupRequest> marshall(CreateDBSecurityGroupRequest createDBSecurityGroupRequest) { if (createDBSecurityGroupRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<CreateDBSecurityGroupRequest> request = new DefaultRequest<CreateDBSecurityGroupRequest>(createDBSecurityGroupRequest, "AmazonRDS"); request.addParameter("Action", "CreateDBSecurityGroup"); request.addParameter("Version", "2014-10-31"); request.setHttpMethod(HttpMethodName.POST); if (createDBSecurityGroupRequest.getDBSecurityGroupName() != null) { request.addParameter("DBSecurityGroupName", StringUtils.fromString(createDBSecurityGroupRequest.getDBSecurityGroupName())); } if (createDBSecurityGroupRequest.getDBSecurityGroupDescription() != null) { request.addParameter("DBSecurityGroupDescription", StringUtils.fromString(createDBSecurityGroupRequest.getDBSecurityGroupDescription())); } if (!createDBSecurityGroupRequest.getTags().isEmpty() || !((com.amazonaws.internal.SdkInternalList<Tag>) createDBSecurityGroupRequest.getTags()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<Tag> tagsList = (com.amazonaws.internal.SdkInternalList<Tag>) createDBSecurityGroupRequest.getTags(); int tagsListIndex = 1; for (Tag tagsListValue : tagsList) { if (tagsListValue.getKey() != null) { request.addParameter("Tags.Tag." + tagsListIndex + ".Key", StringUtils.fromString(tagsListValue.getKey())); } if (tagsListValue.getValue() != null) { request.addParameter("Tags.Tag." + tagsListIndex + ".Value", StringUtils.fromString(tagsListValue.getValue())); } tagsListIndex++; } } return request; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDBSecurityGroupName() == null) ? 0 : getDBSecurityGroupName().hashCode()); hashCode = prime * hashCode + ((getDBSecurityGroupDescription() == null) ? 0 : getDBSecurityGroupDescription().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().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 (getDBSecurityGroupName() != null) sb.append("DBSecurityGroupName: ").append(getDBSecurityGroupName()).append(","); if (getDBSecurityGroupDescription() != null) sb.append("DBSecurityGroupDescription: ").append(getDBSecurityGroupDescription()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateDBSecurityGroupRequest == false) return false; CreateDBSecurityGroupRequest other = (CreateDBSecurityGroupRequest) obj; if (other.getDBSecurityGroupName() == null ^ this.getDBSecurityGroupName() == null) return false; if (other.getDBSecurityGroupName() != null && other.getDBSecurityGroupName().equals(this.getDBSecurityGroupName()) == false) return false; if (other.getDBSecurityGroupDescription() == null ^ this.getDBSecurityGroupDescription() == null) return false; if (other.getDBSecurityGroupDescription() != null && other.getDBSecurityGroupDescription().equals(this.getDBSecurityGroupDescription()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; }
public Request<CreateDBSecurityGroupRequest> marshall(CreateDBSecurityGroupRequest createDBSecurityGroupRequest) { if (createDBSecurityGroupRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<CreateDBSecurityGroupRequest> request = new DefaultRequest<CreateDBSecurityGroupRequest>(createDBSecurityGroupRequest, "AmazonRDS"); request.addParameter("Action", "CreateDBSecurityGroup"); request.addParameter("Version", "2014-10-31"); request.setHttpMethod(HttpMethodName.POST); if (createDBSecurityGroupRequest.getDBSecurityGroupName() != null) { request.addParameter("DBSecurityGroupName", StringUtils.fromString(createDBSecurityGroupRequest.getDBSecurityGroupName())); } if (createDBSecurityGroupRequest.getDBSecurityGroupDescription() != null) { request.addParameter("DBSecurityGroupDescription", StringUtils.fromString(createDBSecurityGroupRequest.getDBSecurityGroupDescription())); } if (!createDBSecurityGroupRequest.getTags().isEmpty() || !((com.amazonaws.internal.SdkInternalList<Tag>) createDBSecurityGroupRequest.getTags()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<Tag> tagsList = (com.amazonaws.internal.SdkInternalList<Tag>) createDBSecurityGroupRequest.getTags(); int tagsListIndex = 1; for (Tag tagsListValue : tagsList) { if (tagsListValue.getKey() != null) { request.addParameter("Tags.Tag." + tagsListIndex + ".Key", StringUtils.fromString(tagsListValue.getKey())); } if (tagsListValue.getValue() != null) { request.addParameter("Tags.Tag." + tagsListIndex + ".Value", StringUtils.fromString(tagsListValue.getValue())); } tagsListIndex++; } } return request; }