public class MessageAttributeValue
extends java.lang.Object
implements java.io.Serializable
The user-specified message attribute value. For string data types, the value attribute has the same restrictions on the content as the message body. For more information, see Publish.
Name, type, and value must not be empty or null. In addition, the message body should not be empty or null. All parts of the message attribute, including name, type, and value, are included in the message size restriction, which is currently 256 KB (262,144 bytes). For more information, see Amazon SNS message attributes and Publishing to a mobile phone in the Amazon SNS Developer Guide.
Constructor and Description |
---|
MessageAttributeValue() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.nio.ByteBuffer |
getBinaryValue()
Binary type attributes can store any binary data, for example, compressed
data, encrypted data, or images.
|
java.lang.String |
getDataType()
Amazon SNS supports the following logical data types: String,
String.Array, Number, and Binary.
|
java.lang.String |
getStringValue()
Strings are Unicode with UTF8 binary encoding.
|
int |
hashCode() |
void |
setBinaryValue(java.nio.ByteBuffer binaryValue)
Binary type attributes can store any binary data, for example, compressed
data, encrypted data, or images.
|
void |
setDataType(java.lang.String dataType)
Amazon SNS supports the following logical data types: String,
String.Array, Number, and Binary.
|
void |
setStringValue(java.lang.String stringValue)
Strings are Unicode with UTF8 binary encoding.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
MessageAttributeValue |
withBinaryValue(java.nio.ByteBuffer binaryValue)
Binary type attributes can store any binary data, for example, compressed
data, encrypted data, or images.
|
MessageAttributeValue |
withDataType(java.lang.String dataType)
Amazon SNS supports the following logical data types: String,
String.Array, Number, and Binary.
|
MessageAttributeValue |
withStringValue(java.lang.String stringValue)
Strings are Unicode with UTF8 binary encoding.
|
public java.lang.String getDataType()
Amazon SNS supports the following logical data types: String, String.Array, Number, and Binary. For more information, see Message Attribute Data Types.
Amazon SNS supports the following logical data types: String, String.Array, Number, and Binary. For more information, see Message Attribute Data Types.
public void setDataType(java.lang.String dataType)
Amazon SNS supports the following logical data types: String, String.Array, Number, and Binary. For more information, see Message Attribute Data Types.
dataType
- Amazon SNS supports the following logical data types: String, String.Array, Number, and Binary. For more information, see Message Attribute Data Types.
public MessageAttributeValue withDataType(java.lang.String dataType)
Amazon SNS supports the following logical data types: String, String.Array, Number, and Binary. For more information, see Message Attribute Data Types.
Returns a reference to this object so that method calls can be chained together.
dataType
- Amazon SNS supports the following logical data types: String, String.Array, Number, and Binary. For more information, see Message Attribute Data Types.
public java.lang.String getStringValue()
Strings are Unicode with UTF8 binary encoding. For a list of code values, see ASCII Printable Characters.
Strings are Unicode with UTF8 binary encoding. For a list of code values, see ASCII Printable Characters.
public void setStringValue(java.lang.String stringValue)
Strings are Unicode with UTF8 binary encoding. For a list of code values, see ASCII Printable Characters.
stringValue
- Strings are Unicode with UTF8 binary encoding. For a list of code values, see ASCII Printable Characters.
public MessageAttributeValue withStringValue(java.lang.String stringValue)
Strings are Unicode with UTF8 binary encoding. For a list of code values, see ASCII Printable Characters.
Returns a reference to this object so that method calls can be chained together.
stringValue
- Strings are Unicode with UTF8 binary encoding. For a list of code values, see ASCII Printable Characters.
public java.nio.ByteBuffer getBinaryValue()
Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.
Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.
public void setBinaryValue(java.nio.ByteBuffer binaryValue)
Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.
binaryValue
- Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.
public MessageAttributeValue withBinaryValue(java.nio.ByteBuffer binaryValue)
Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.
Returns a reference to this object so that method calls can be chained together.
binaryValue
- Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.