public class SendMessageBatchRequestEntry extends Object implements Serializable, Cloneable
Contains the details of a single Amazon SQS message along with a
Id
.
Constructor and Description |
---|
SendMessageBatchRequestEntry()
Default constructor for a new SendMessageBatchRequestEntry object.
|
SendMessageBatchRequestEntry(String id,
String messageBody)
Constructs a new SendMessageBatchRequestEntry object.
|
Modifier and Type | Method and Description |
---|---|
SendMessageBatchRequestEntry |
addMessageAttributesEntry(String key,
MessageAttributeValue value)
Each message attribute consists of a Name, Type, and Value.
|
SendMessageBatchRequestEntry |
clearMessageAttributesEntries()
Removes all the entries added into MessageAttributes.
|
SendMessageBatchRequestEntry |
clone() |
boolean |
equals(Object obj) |
Integer |
getDelaySeconds()
The number of seconds for which the message has to be delayed.
|
String |
getId()
An identifier for the message in this batch.
|
Map<String,MessageAttributeValue> |
getMessageAttributes()
Each message attribute consists of a Name, Type, and Value.
|
String |
getMessageBody()
Body of the message.
|
int |
hashCode() |
void |
setDelaySeconds(Integer delaySeconds)
The number of seconds for which the message has to be delayed.
|
void |
setId(String id)
An identifier for the message in this batch.
|
void |
setMessageAttributes(Map<String,MessageAttributeValue> messageAttributes)
Each message attribute consists of a Name, Type, and Value.
|
void |
setMessageBody(String messageBody)
Body of the message.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SendMessageBatchRequestEntry |
withDelaySeconds(Integer delaySeconds)
The number of seconds for which the message has to be delayed.
|
SendMessageBatchRequestEntry |
withId(String id)
An identifier for the message in this batch.
|
SendMessageBatchRequestEntry |
withMessageAttributes(Map<String,MessageAttributeValue> messageAttributes)
Each message attribute consists of a Name, Type, and Value.
|
SendMessageBatchRequestEntry |
withMessageBody(String messageBody)
Body of the message.
|
public SendMessageBatchRequestEntry()
public SendMessageBatchRequestEntry(String id, String messageBody)
id
- An identifier for the message in this batch. This is used to
communicate the result. Note that the Id
s of a batch
request need to be unique within the request.messageBody
- Body of the message.public String getId()
Id
s of a batch
request need to be unique within the request.Id
s of a batch
request need to be unique within the request.public void setId(String id)
Id
s of a batch
request need to be unique within the request.id
- An identifier for the message in this batch. This is used to
communicate the result. Note that the Id
s of a batch
request need to be unique within the request.public SendMessageBatchRequestEntry withId(String id)
Id
s of a batch
request need to be unique within the request.
Returns a reference to this object so that method calls can be chained together.
id
- An identifier for the message in this batch. This is used to
communicate the result. Note that the Id
s of a batch
request need to be unique within the request.public String getMessageBody()
public void setMessageBody(String messageBody)
messageBody
- Body of the message.public SendMessageBatchRequestEntry withMessageBody(String messageBody)
Returns a reference to this object so that method calls can be chained together.
messageBody
- Body of the message.public Integer getDelaySeconds()
public void setDelaySeconds(Integer delaySeconds)
delaySeconds
- The number of seconds for which the message has to be delayed.public SendMessageBatchRequestEntry withDelaySeconds(Integer delaySeconds)
Returns a reference to this object so that method calls can be chained together.
delaySeconds
- The number of seconds for which the message has to be delayed.public Map<String,MessageAttributeValue> getMessageAttributes()
public void setMessageAttributes(Map<String,MessageAttributeValue> messageAttributes)
messageAttributes
- Each message attribute consists of a Name, Type, and Value. For more
information, see Message
Attribute Items.public SendMessageBatchRequestEntry withMessageAttributes(Map<String,MessageAttributeValue> messageAttributes)
Returns a reference to this object so that method calls can be chained together.
messageAttributes
- Each message attribute consists of a Name, Type, and Value. For more
information, see Message
Attribute Items.public SendMessageBatchRequestEntry addMessageAttributesEntry(String key, MessageAttributeValue value)
The method adds a new key-value pair into MessageAttributes parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into MessageAttributes.value
- The corresponding value of the entry to be added into MessageAttributes.public SendMessageBatchRequestEntry clearMessageAttributesEntries()
Returns a reference to this object so that method calls can be chained together.
public String toString()
toString
in class Object
Object.toString()
public SendMessageBatchRequestEntry clone()
Copyright © 2015. All rights reserved.