@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class GetRetainedMessageResult extends AmazonWebServiceResult<ResponseMetadata> implements Serializable, Cloneable
The output from the GetRetainedMessage operation.
Constructor and Description |
---|
GetRetainedMessageResult() |
Modifier and Type | Method and Description |
---|---|
GetRetainedMessageResult |
clone() |
boolean |
equals(Object obj) |
Long |
getLastModifiedTime()
The Epoch date and time, in milliseconds, when the retained message was stored by IoT.
|
ByteBuffer |
getPayload()
The Base64-encoded message payload of the retained message body.
|
Integer |
getQos()
The quality of service (QoS) level used to publish the retained message.
|
String |
getTopic()
The topic name to which the retained message was published.
|
ByteBuffer |
getUserProperties()
A base64-encoded JSON string that includes an array of JSON objects, or null if the retained message doesn't
include any user properties.
|
int |
hashCode() |
void |
setLastModifiedTime(Long lastModifiedTime)
The Epoch date and time, in milliseconds, when the retained message was stored by IoT.
|
void |
setPayload(ByteBuffer payload)
The Base64-encoded message payload of the retained message body.
|
void |
setQos(Integer qos)
The quality of service (QoS) level used to publish the retained message.
|
void |
setTopic(String topic)
The topic name to which the retained message was published.
|
void |
setUserProperties(ByteBuffer userProperties)
A base64-encoded JSON string that includes an array of JSON objects, or null if the retained message doesn't
include any user properties.
|
String |
toString()
Returns a string representation of this object.
|
GetRetainedMessageResult |
withLastModifiedTime(Long lastModifiedTime)
The Epoch date and time, in milliseconds, when the retained message was stored by IoT.
|
GetRetainedMessageResult |
withPayload(ByteBuffer payload)
The Base64-encoded message payload of the retained message body.
|
GetRetainedMessageResult |
withQos(Integer qos)
The quality of service (QoS) level used to publish the retained message.
|
GetRetainedMessageResult |
withTopic(String topic)
The topic name to which the retained message was published.
|
GetRetainedMessageResult |
withUserProperties(ByteBuffer userProperties)
A base64-encoded JSON string that includes an array of JSON objects, or null if the retained message doesn't
include any user properties.
|
getSdkHttpMetadata, getSdkResponseMetadata, setSdkHttpMetadata, setSdkResponseMetadata
public void setTopic(String topic)
The topic name to which the retained message was published.
topic
- The topic name to which the retained message was published.public String getTopic()
The topic name to which the retained message was published.
public GetRetainedMessageResult withTopic(String topic)
The topic name to which the retained message was published.
topic
- The topic name to which the retained message was published.public void setPayload(ByteBuffer payload)
The Base64-encoded message payload of the retained message body.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
payload
- The Base64-encoded message payload of the retained message body.public ByteBuffer getPayload()
The Base64-encoded message payload of the retained message body.
ByteBuffer
s are stateful. Calling their get
methods changes their position
. We recommend
using ByteBuffer.asReadOnlyBuffer()
to create a read-only view of the buffer with an independent
position
, and calling get
methods on this rather than directly on the returned ByteBuffer
.
Doing so will ensure that anyone else using the ByteBuffer
will not be affected by changes to the
position
.
public GetRetainedMessageResult withPayload(ByteBuffer payload)
The Base64-encoded message payload of the retained message body.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
payload
- The Base64-encoded message payload of the retained message body.public void setQos(Integer qos)
The quality of service (QoS) level used to publish the retained message.
qos
- The quality of service (QoS) level used to publish the retained message.public Integer getQos()
The quality of service (QoS) level used to publish the retained message.
public GetRetainedMessageResult withQos(Integer qos)
The quality of service (QoS) level used to publish the retained message.
qos
- The quality of service (QoS) level used to publish the retained message.public void setLastModifiedTime(Long lastModifiedTime)
The Epoch date and time, in milliseconds, when the retained message was stored by IoT.
lastModifiedTime
- The Epoch date and time, in milliseconds, when the retained message was stored by IoT.public Long getLastModifiedTime()
The Epoch date and time, in milliseconds, when the retained message was stored by IoT.
public GetRetainedMessageResult withLastModifiedTime(Long lastModifiedTime)
The Epoch date and time, in milliseconds, when the retained message was stored by IoT.
lastModifiedTime
- The Epoch date and time, in milliseconds, when the retained message was stored by IoT.public void setUserProperties(ByteBuffer userProperties)
A base64-encoded JSON string that includes an array of JSON objects, or null if the retained message doesn't include any user properties.
The following example userProperties
parameter is a JSON string that represents two user properties.
Note that it will be base64-encoded:
[{"deviceName": "alpha"}, {"deviceCnt": "45"}]
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
userProperties
- A base64-encoded JSON string that includes an array of JSON objects, or null if the retained message
doesn't include any user properties.
The following example userProperties
parameter is a JSON string that represents two user
properties. Note that it will be base64-encoded:
[{"deviceName": "alpha"}, {"deviceCnt": "45"}]
public ByteBuffer getUserProperties()
A base64-encoded JSON string that includes an array of JSON objects, or null if the retained message doesn't include any user properties.
The following example userProperties
parameter is a JSON string that represents two user properties.
Note that it will be base64-encoded:
[{"deviceName": "alpha"}, {"deviceCnt": "45"}]
ByteBuffer
s are stateful. Calling their get
methods changes their position
. We recommend
using ByteBuffer.asReadOnlyBuffer()
to create a read-only view of the buffer with an independent
position
, and calling get
methods on this rather than directly on the returned ByteBuffer
.
Doing so will ensure that anyone else using the ByteBuffer
will not be affected by changes to the
position
.
The following example userProperties
parameter is a JSON string that represents two user
properties. Note that it will be base64-encoded:
[{"deviceName": "alpha"}, {"deviceCnt": "45"}]
public GetRetainedMessageResult withUserProperties(ByteBuffer userProperties)
A base64-encoded JSON string that includes an array of JSON objects, or null if the retained message doesn't include any user properties.
The following example userProperties
parameter is a JSON string that represents two user properties.
Note that it will be base64-encoded:
[{"deviceName": "alpha"}, {"deviceCnt": "45"}]
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
userProperties
- A base64-encoded JSON string that includes an array of JSON objects, or null if the retained message
doesn't include any user properties.
The following example userProperties
parameter is a JSON string that represents two user
properties. Note that it will be base64-encoded:
[{"deviceName": "alpha"}, {"deviceCnt": "45"}]
public String toString()
toString
in class Object
Object.toString()
public GetRetainedMessageResult clone()