public class PublishRequest extends AmazonWebServiceRequest implements Serializable
Publish operation.
Publishes state information.
For more information, see HTTP Protocol in the AWS IoT Developer Guide .
| Constructor and Description |
|---|
PublishRequest() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
ByteBuffer |
getPayload()
The state information, in JSON format.
|
Integer |
getQos()
The Quality of Service (QoS) level.
|
String |
getTopic()
The name of the MQTT topic.
|
int |
hashCode() |
void |
setPayload(ByteBuffer payload)
The state information, in JSON format.
|
void |
setQos(Integer qos)
The Quality of Service (QoS) level.
|
void |
setTopic(String topic)
The name of the MQTT topic.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PublishRequest |
withPayload(ByteBuffer payload)
The state information, in JSON format.
|
PublishRequest |
withQos(Integer qos)
The Quality of Service (QoS) level.
|
PublishRequest |
withTopic(String topic)
The name of the MQTT topic.
|
getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollectorpublic String getTopic()
public void setTopic(String topic)
topic - The name of the MQTT topic.public PublishRequest withTopic(String topic)
Returns a reference to this object so that method calls can be chained together.
topic - The name of the MQTT topic.public Integer getQos()
Constraints:
Range: 0 - 1
public void setQos(Integer qos)
Constraints:
Range: 0 - 1
qos - The Quality of Service (QoS) level.public PublishRequest withQos(Integer qos)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 0 - 1
qos - The Quality of Service (QoS) level.public ByteBuffer getPayload()
public void setPayload(ByteBuffer payload)
payload - The state information, in JSON format.public PublishRequest withPayload(ByteBuffer payload)
Returns a reference to this object so that method calls can be chained together.
payload - The state information, in JSON format.public String toString()
toString in class ObjectObject.toString()Copyright © 2016. All rights reserved.