@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Tag == false) return false; Tag other = (Tag) obj; if (other.getKey() == null ^ this.getKey() == null) return false; if (other.getKey() != null && other.getKey().equals(this.getKey()) == false) return false; if (other.getValue() == null ^ this.getValue() == null) return false; if (other.getValue() != null && other.getValue().equals(this.getValue()) == false) return false; return true; }
/** * 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 (getKey() != null) sb.append("Key: ").append(getKey()).append(","); if (getValue() != null) sb.append("Value: ").append(getValue()); sb.append("}"); return sb.toString(); }
public Request<CreateTagsRequest> marshall(CreateTagsRequest createTagsRequest) { if (createTagsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<CreateTagsRequest> request = new DefaultRequest<CreateTagsRequest>(createTagsRequest, "AmazonRedshift"); request.addParameter("Action", "CreateTags"); request.addParameter("Version", "2012-12-01"); request.setHttpMethod(HttpMethodName.POST); if (createTagsRequest.getResourceName() != null) { request.addParameter("ResourceName", StringUtils.fromString(createTagsRequest.getResourceName())); } if (!createTagsRequest.getTags().isEmpty() || !((com.amazonaws.internal.SdkInternalList<Tag>) createTagsRequest.getTags()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<Tag> tagsList = (com.amazonaws.internal.SdkInternalList<Tag>) createTagsRequest.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; }
public Request<CreateHsmClientCertificateRequest> marshall(CreateHsmClientCertificateRequest createHsmClientCertificateRequest) { if (createHsmClientCertificateRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<CreateHsmClientCertificateRequest> request = new DefaultRequest<CreateHsmClientCertificateRequest>(createHsmClientCertificateRequest, "AmazonRedshift"); request.addParameter("Action", "CreateHsmClientCertificate"); request.addParameter("Version", "2012-12-01"); request.setHttpMethod(HttpMethodName.POST); if (createHsmClientCertificateRequest.getHsmClientCertificateIdentifier() != null) { request.addParameter("HsmClientCertificateIdentifier", StringUtils.fromString(createHsmClientCertificateRequest.getHsmClientCertificateIdentifier())); } if (!createHsmClientCertificateRequest.getTags().isEmpty() || !((com.amazonaws.internal.SdkInternalList<Tag>) createHsmClientCertificateRequest.getTags()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<Tag> tagsList = (com.amazonaws.internal.SdkInternalList<Tag>) createHsmClientCertificateRequest.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; }
public Request<CreateSnapshotCopyGrantRequest> marshall(CreateSnapshotCopyGrantRequest createSnapshotCopyGrantRequest) { if (createSnapshotCopyGrantRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<CreateSnapshotCopyGrantRequest> request = new DefaultRequest<CreateSnapshotCopyGrantRequest>(createSnapshotCopyGrantRequest, "AmazonRedshift"); request.addParameter("Action", "CreateSnapshotCopyGrant"); request.addParameter("Version", "2012-12-01"); request.setHttpMethod(HttpMethodName.POST); if (createSnapshotCopyGrantRequest.getSnapshotCopyGrantName() != null) { request.addParameter("SnapshotCopyGrantName", StringUtils.fromString(createSnapshotCopyGrantRequest.getSnapshotCopyGrantName())); } if (createSnapshotCopyGrantRequest.getKmsKeyId() != null) { request.addParameter("KmsKeyId", StringUtils.fromString(createSnapshotCopyGrantRequest.getKmsKeyId())); } if (!createSnapshotCopyGrantRequest.getTags().isEmpty() || !((com.amazonaws.internal.SdkInternalList<Tag>) createSnapshotCopyGrantRequest.getTags()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<Tag> tagsList = (com.amazonaws.internal.SdkInternalList<Tag>) createSnapshotCopyGrantRequest.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 boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Tag == false) return false; Tag other = (Tag) obj; if (other.getKey() == null ^ this.getKey() == null) return false; if (other.getKey() != null && other.getKey().equals(this.getKey()) == false) return false; if (other.getValue() == null ^ this.getValue() == null) return false; if (other.getValue() != null && other.getValue().equals(this.getValue()) == false) return false; return true; }
/** * 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 (getKey() != null) sb.append("Key: ").append(getKey()).append(","); if (getValue() != null) sb.append("Value: ").append(getValue()); sb.append("}"); return sb.toString(); }
public Request<CreateTagsRequest> marshall(CreateTagsRequest createTagsRequest) { if (createTagsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<CreateTagsRequest> request = new DefaultRequest<CreateTagsRequest>(createTagsRequest, "AmazonRedshift"); request.addParameter("Action", "CreateTags"); request.addParameter("Version", "2012-12-01"); request.setHttpMethod(HttpMethodName.POST); if (createTagsRequest.getResourceName() != null) { request.addParameter("ResourceName", StringUtils.fromString(createTagsRequest.getResourceName())); } if (!createTagsRequest.getTags().isEmpty() || !((com.amazonaws.internal.SdkInternalList<Tag>) createTagsRequest.getTags()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<Tag> tagsList = (com.amazonaws.internal.SdkInternalList<Tag>) createTagsRequest.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; }
public Request<CreateHsmClientCertificateRequest> marshall(CreateHsmClientCertificateRequest createHsmClientCertificateRequest) { if (createHsmClientCertificateRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<CreateHsmClientCertificateRequest> request = new DefaultRequest<CreateHsmClientCertificateRequest>(createHsmClientCertificateRequest, "AmazonRedshift"); request.addParameter("Action", "CreateHsmClientCertificate"); request.addParameter("Version", "2012-12-01"); request.setHttpMethod(HttpMethodName.POST); if (createHsmClientCertificateRequest.getHsmClientCertificateIdentifier() != null) { request.addParameter("HsmClientCertificateIdentifier", StringUtils.fromString(createHsmClientCertificateRequest.getHsmClientCertificateIdentifier())); } if (!createHsmClientCertificateRequest.getTags().isEmpty() || !((com.amazonaws.internal.SdkInternalList<Tag>) createHsmClientCertificateRequest.getTags()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<Tag> tagsList = (com.amazonaws.internal.SdkInternalList<Tag>) createHsmClientCertificateRequest.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; }