com.amazonaws.services.sns.model
Class MessageAttributeValue

java.lang.Object
  extended by com.amazonaws.services.sns.model.MessageAttributeValue
All Implemented Interfaces:
java.io.Serializable

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 Using Amazon SNS Message Attributes .

See Also:
Serialized Form

Constructor Summary
MessageAttributeValue()
           
 
Method Summary
 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, 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, 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, Number, and Binary.
 MessageAttributeValue withStringValue(java.lang.String stringValue)
          Strings are Unicode with UTF8 binary encoding.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageAttributeValue

public MessageAttributeValue()
Method Detail

getDataType

public java.lang.String getDataType()
Amazon SNS supports the following logical data types: String, Number, and Binary. For more information, see Message Attribute Data Types.

Returns:
Amazon SNS supports the following logical data types: String, Number, and Binary. For more information, see Message Attribute Data Types.

setDataType

public void setDataType(java.lang.String dataType)
Amazon SNS supports the following logical data types: String, Number, and Binary. For more information, see Message Attribute Data Types.

Parameters:
dataType - Amazon SNS supports the following logical data types: String, Number, and Binary. For more information, see Message Attribute Data Types.

withDataType

public MessageAttributeValue withDataType(java.lang.String dataType)
Amazon SNS supports the following logical data types: String, 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.

Parameters:
dataType - Amazon SNS supports the following logical data types: String, Number, and Binary. For more information, see Message Attribute Data Types.
Returns:
A reference to this updated object so that method calls can be chained together.

getStringValue

public java.lang.String getStringValue()
Strings are Unicode with UTF8 binary encoding. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.

Returns:
Strings are Unicode with UTF8 binary encoding. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.

setStringValue

public void setStringValue(java.lang.String stringValue)
Strings are Unicode with UTF8 binary encoding. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.

Parameters:
stringValue - Strings are Unicode with UTF8 binary encoding. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.

withStringValue

public MessageAttributeValue withStringValue(java.lang.String stringValue)
Strings are Unicode with UTF8 binary encoding. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.

Returns a reference to this object so that method calls can be chained together.

Parameters:
stringValue - Strings are Unicode with UTF8 binary encoding. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.
Returns:
A reference to this updated object so that method calls can be chained together.

getBinaryValue

public java.nio.ByteBuffer getBinaryValue()
Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.

Returns:
Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.

setBinaryValue

public void setBinaryValue(java.nio.ByteBuffer binaryValue)
Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.

Parameters:
binaryValue - Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.

withBinaryValue

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.

Parameters:
binaryValue - Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.