@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStringValue() == null) ? 0 : getStringValue().hashCode()); hashCode = prime * hashCode + ((getBinaryValue() == null) ? 0 : getBinaryValue().hashCode()); hashCode = prime * hashCode + ((getStringListValues() == null) ? 0 : getStringListValues().hashCode()); hashCode = prime * hashCode + ((getBinaryListValues() == null) ? 0 : getBinaryListValues().hashCode()); hashCode = prime * hashCode + ((getDataType() == null) ? 0 : getDataType().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 (getStringValue() != null) sb.append("StringValue: ").append(getStringValue()).append(","); if (getBinaryValue() != null) sb.append("BinaryValue: ").append(getBinaryValue()).append(","); if (getStringListValues() != null) sb.append("StringListValues: ").append(getStringListValues()).append(","); if (getBinaryListValues() != null) sb.append("BinaryListValues: ").append(getBinaryListValues()).append(","); if (getDataType() != null) sb.append("DataType: ").append(getDataType()); sb.append("}"); return sb.toString(); }
md5Digest.update(STRING_TYPE_FIELD_INDEX); updateLengthAndBytes(md5Digest, attrValue.getStringValue()); } else if (attrValue.getBinaryValue() != null) { md5Digest.update(BINARY_TYPE_FIELD_INDEX); updateLengthAndBytes(md5Digest, attrValue.getBinaryValue()); } else if (attrValue.getStringListValues().size() > 0) { md5Digest.update(STRING_LIST_TYPE_FIELD_INDEX);
if (other.getStringValue() != null && other.getStringValue().equals(this.getStringValue()) == false) return false; if (other.getBinaryValue() == null ^ this.getBinaryValue() == null) return false; if (other.getBinaryValue() != null && other.getBinaryValue().equals(this.getBinaryValue()) == false) return false; if (other.getStringListValues() == null ^ this.getStringListValues() == null)
if (entry.getValue().getBinaryValue() != null) { request.addParameter("MessageAttribute." + messageAttributesListIndex + ".Value.BinaryValue", StringUtils.fromByteBuffer(entry.getValue().getBinaryValue()));
if (entry.getValue().getBinaryValue() != null) { request.addParameter("SendMessageBatchRequestEntry." + entriesListIndex + ".MessageAttribute." + messageAttributesListIndex + ".Value.BinaryValue", StringUtils.fromByteBuffer(entry.getValue().getBinaryValue()));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStringValue() == null) ? 0 : getStringValue().hashCode()); hashCode = prime * hashCode + ((getBinaryValue() == null) ? 0 : getBinaryValue().hashCode()); hashCode = prime * hashCode + ((getStringListValues() == null) ? 0 : getStringListValues().hashCode()); hashCode = prime * hashCode + ((getBinaryListValues() == null) ? 0 : getBinaryListValues().hashCode()); hashCode = prime * hashCode + ((getDataType() == null) ? 0 : getDataType().hashCode()); return hashCode; }
/** * 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 (getStringValue() != null) sb.append("StringValue: " + getStringValue() + ","); if (getBinaryValue() != null) sb.append("BinaryValue: " + getBinaryValue() + ","); if (getStringListValues() != null) sb.append("StringListValues: " + getStringListValues() + ","); if (getBinaryListValues() != null) sb.append("BinaryListValues: " + getBinaryListValues() + ","); if (getDataType() != null) sb.append("DataType: " + getDataType()); sb.append("}"); return sb.toString(); }
&& other.getStringValue().equals(this.getStringValue()) == false) return false; if (other.getBinaryValue() == null ^ this.getBinaryValue() == null) return false; if (other.getBinaryValue() != null && other.getBinaryValue().equals(this.getBinaryValue()) == false) return false; if (other.getStringListValues() == null ^ this.getStringListValues() == null)
md5Digest.update(STRING_TYPE_FIELD_INDEX); updateLengthAndBytes(md5Digest, attrValue.getStringValue()); } else if (attrValue.getBinaryValue() != null) { md5Digest.update(BINARY_TYPE_FIELD_INDEX); updateLengthAndBytes(md5Digest, attrValue.getBinaryValue()); } else if (attrValue.getStringListValues() != null) { md5Digest.update(STRING_LIST_TYPE_FIELD_INDEX);
request.addParameter(prefix, StringUtils.fromString(stringValue)); if (_messageAttributeValue.getBinaryValue() != null) { prefix = _prefix + "BinaryValue"; java.nio.ByteBuffer binaryValue = _messageAttributeValue.getBinaryValue(); request.addParameter(prefix, StringUtils.fromByteBuffer(binaryValue));
private static Map<String, Object> getMessageAttributesAsMessageHeaders(com.amazonaws.services.sqs.model.Message message) { Map<String, Object> messageHeaders = new HashMap<>(); for (Map.Entry<String, MessageAttributeValue> messageAttribute : message.getMessageAttributes().entrySet()) { if (MessageHeaders.CONTENT_TYPE.equals(messageAttribute.getKey())) { messageHeaders.put(MessageHeaders.CONTENT_TYPE, MimeType.valueOf(messageAttribute.getValue().getStringValue())); } else if (MessageHeaders.ID.equals(messageAttribute.getKey())) { messageHeaders.put(MessageHeaders.ID, UUID.fromString(messageAttribute.getValue().getStringValue())); } else if (MessageAttributeDataTypes.STRING.equals(messageAttribute.getValue().getDataType())) { messageHeaders.put(messageAttribute.getKey(), messageAttribute.getValue().getStringValue()); } else if (messageAttribute.getValue().getDataType().startsWith(MessageAttributeDataTypes.NUMBER)) { Object numberValue = getNumberValue(messageAttribute.getValue()); if (numberValue != null) { messageHeaders.put(messageAttribute.getKey(), numberValue); } } else if (MessageAttributeDataTypes.BINARY.equals(messageAttribute.getValue().getDataType())) { messageHeaders.put(messageAttribute.getKey(), messageAttribute.getValue().getBinaryValue()); } } return messageHeaders; }
private static Map<String, Object> getMessageAttributesAsMessageHeaders(com.amazonaws.services.sqs.model.Message message) { Map<String, Object> messageHeaders = new HashMap<>(); for (Map.Entry<String, MessageAttributeValue> messageAttribute : message.getMessageAttributes().entrySet()) { if (MessageHeaders.CONTENT_TYPE.equals(messageAttribute.getKey())) { messageHeaders.put(MessageHeaders.CONTENT_TYPE, MimeType.valueOf(messageAttribute.getValue().getStringValue())); } else if (MessageHeaders.ID.equals(messageAttribute.getKey())) { messageHeaders.put(MessageHeaders.ID, UUID.fromString(messageAttribute.getValue().getStringValue())); } else if (MessageAttributeDataTypes.STRING.equals(messageAttribute.getValue().getDataType())) { messageHeaders.put(messageAttribute.getKey(), messageAttribute.getValue().getStringValue()); } else if (messageAttribute.getValue().getDataType().startsWith(MessageAttributeDataTypes.NUMBER)) { Object numberValue = getNumberValue(messageAttribute.getValue()); if (numberValue != null) { messageHeaders.put(messageAttribute.getKey(), numberValue); } } else if (MessageAttributeDataTypes.BINARY.equals(messageAttribute.getValue().getDataType())) { messageHeaders.put(messageAttribute.getKey(), messageAttribute.getValue().getBinaryValue()); } } return messageHeaders; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStringValue() == null) ? 0 : getStringValue().hashCode()); hashCode = prime * hashCode + ((getBinaryValue() == null) ? 0 : getBinaryValue().hashCode()); hashCode = prime * hashCode + ((getStringListValues() == null) ? 0 : getStringListValues().hashCode()); hashCode = prime * hashCode + ((getBinaryListValues() == null) ? 0 : getBinaryListValues().hashCode()); hashCode = prime * hashCode + ((getDataType() == null) ? 0 : getDataType().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 (getStringValue() != null) sb.append("StringValue: ").append(getStringValue()).append(","); if (getBinaryValue() != null) sb.append("BinaryValue: ").append(getBinaryValue()).append(","); if (getStringListValues() != null) sb.append("StringListValues: ").append(getStringListValues()).append(","); if (getBinaryListValues() != null) sb.append("BinaryListValues: ").append(getBinaryListValues()).append(","); if (getDataType() != null) sb.append("DataType: ").append(getDataType()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStringValue() == null) ? 0 : getStringValue().hashCode()); hashCode = prime * hashCode + ((getBinaryValue() == null) ? 0 : getBinaryValue().hashCode()); hashCode = prime * hashCode + ((getStringListValues() == null) ? 0 : getStringListValues().hashCode()); hashCode = prime * hashCode + ((getBinaryListValues() == null) ? 0 : getBinaryListValues().hashCode()); hashCode = prime * hashCode + ((getDataType() == null) ? 0 : getDataType().hashCode()); return hashCode; }
/** * 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 (getStringValue() != null) sb.append("StringValue: " + getStringValue() + ","); if (getBinaryValue() != null) sb.append("BinaryValue: " + getBinaryValue() + ","); if (getStringListValues() != null) sb.append("StringListValues: " + getStringListValues() + ","); if (getBinaryListValues() != null) sb.append("BinaryListValues: " + getBinaryListValues() + ","); if (getDataType() != null) sb.append("DataType: " + getDataType()); sb.append("}"); return sb.toString(); }
private int getMsgAttributesSize(Map<String, MessageAttributeValue> msgAttributes) { int totalMsgAttributesSize = 0; for (Entry<String, MessageAttributeValue> entry : msgAttributes.entrySet()) { totalMsgAttributesSize += getStringSizeInBytes(entry.getKey()); MessageAttributeValue entryVal = entry.getValue(); if (entryVal.getDataType() != null) { totalMsgAttributesSize += getStringSizeInBytes(entryVal.getDataType()); } String stringVal = entryVal.getStringValue(); if (stringVal != null) { totalMsgAttributesSize += getStringSizeInBytes(entryVal.getStringValue()); } ByteBuffer binaryVal = entryVal.getBinaryValue(); if (binaryVal != null) { totalMsgAttributesSize += binaryVal.array().length; } } return totalMsgAttributesSize; }
if (other.getStringValue() != null && other.getStringValue().equals(this.getStringValue()) == false) return false; if (other.getBinaryValue() == null ^ this.getBinaryValue() == null) return false; if (other.getBinaryValue() != null && other.getBinaryValue().equals(this.getBinaryValue()) == false) return false; if (other.getStringListValues() == null ^ this.getStringListValues() == null)
&& other.getStringValue().equals(this.getStringValue()) == false) return false; if (other.getBinaryValue() == null ^ this.getBinaryValue() == null) return false; if (other.getBinaryValue() != null && other.getBinaryValue().equals(this.getBinaryValue()) == false) return false; if (other.getStringListValues() == null ^ this.getStringListValues() == null)