Class MessageAttributeValue
- java.lang.Object
-
- software.amazon.awssdk.services.sqs.model.MessageAttributeValue
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<MessageAttributeValue.Builder,MessageAttributeValue>
@Generated("software.amazon.awssdk:codegen") public final class MessageAttributeValue extends Object implements SdkPojo, Serializable, ToCopyableBuilder<MessageAttributeValue.Builder,MessageAttributeValue>
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, seeSendMessage.
Name
,type
,value
and the message body must not be empty or null. All parts of the message attribute, includingName
,Type
, andValue
, are part of the message size restriction (256 KiB or 262,144 bytes).- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MessageAttributeValue.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<SdkBytes>
binaryListValues()
Not implemented.SdkBytes
binaryValue()
Binary type attributes can store any binary data, such as compressed data, encrypted data, or images.static MessageAttributeValue.Builder
builder()
String
dataType()
Amazon SQS supports the following logical data types:String
,Number
, andBinary
.boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
boolean
hasBinaryListValues()
For responses, this returns true if the service returned a value for the BinaryListValues property.int
hashCode()
boolean
hasStringListValues()
For responses, this returns true if the service returned a value for the StringListValues property.List<SdkField<?>>
sdkFields()
static Class<? extends MessageAttributeValue.Builder>
serializableBuilderClass()
List<String>
stringListValues()
Not implemented.String
stringValue()
Strings are Unicode with UTF-8 binary encoding.MessageAttributeValue.Builder
toBuilder()
String
toString()
Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
stringValue
public final String stringValue()
Strings are Unicode with UTF-8 binary encoding. For a list of code values, see ASCII Printable Characters.
- Returns:
- Strings are Unicode with UTF-8 binary encoding. For a list of code values, see ASCII Printable Characters.
-
binaryValue
public final SdkBytes binaryValue()
Binary type attributes can store any binary data, such as compressed data, encrypted data, or images.
- Returns:
- Binary type attributes can store any binary data, such as compressed data, encrypted data, or images.
-
hasStringListValues
public final boolean hasStringListValues()
For responses, this returns true if the service returned a value for the StringListValues property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
stringListValues
public final List<String> stringListValues()
Not implemented. Reserved for future use.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasStringListValues()
method.- Returns:
- Not implemented. Reserved for future use.
-
hasBinaryListValues
public final boolean hasBinaryListValues()
For responses, this returns true if the service returned a value for the BinaryListValues property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
binaryListValues
public final List<SdkBytes> binaryListValues()
Not implemented. Reserved for future use.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasBinaryListValues()
method.- Returns:
- Not implemented. Reserved for future use.
-
dataType
public final String dataType()
Amazon SQS supports the following logical data types:
String
,Number
, andBinary
. For theNumber
data type, you must useStringValue
.You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer Guide.
- Returns:
- Amazon SQS supports the following logical data types:
String
,Number
, andBinary
. For theNumber
data type, you must useStringValue
.You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer Guide.
-
toBuilder
public MessageAttributeValue.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<MessageAttributeValue.Builder,MessageAttributeValue>
-
builder
public static MessageAttributeValue.Builder builder()
-
serializableBuilderClass
public static Class<? extends MessageAttributeValue.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String toString()
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.
-
-