@Generated(value="software.amazon.awssdk:codegen") public final class PublishRequest extends IotDataPlaneRequest implements ToCopyableBuilder<PublishRequest.Builder,PublishRequest>
The input for the Publish operation.
| Modifier and Type | Class and Description |
|---|---|
static interface |
PublishRequest.Builder |
| Modifier and Type | Method and Description |
|---|---|
static PublishRequest.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
SdkBytes |
payload()
The message body.
|
Integer |
qos()
The Quality of Service (QoS) level.
|
Boolean |
retain()
A Boolean value that determines whether to set the RETAIN flag when the message is published.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends PublishRequest.Builder> |
serializableBuilderClass() |
PublishRequest.Builder |
toBuilder() |
String |
topic()
The name of the MQTT topic.
|
String |
toString()
Returns a string representation of this object.
|
overrideConfigurationclone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String topic()
The name of the MQTT topic.
public final Integer qos()
The Quality of Service (QoS) level.
public final Boolean retain()
A Boolean value that determines whether to set the RETAIN flag when the message is published.
Setting the RETAIN flag causes the message to be retained and sent to new subscribers to the topic.
Valid values: true | false
Default value: false
Setting the RETAIN flag causes the message to be retained and sent to new subscribers to the topic.
Valid values: true | false
Default value: false
public final SdkBytes payload()
The message body. MQTT accepts text, binary, and empty (null) message payloads.
Publishing an empty (null) payload with retain = true deletes the retained message identified
by topic from Amazon Web Services IoT Core.
Publishing an empty (null) payload with retain = true deletes the retained message
identified by topic from Amazon Web Services IoT Core.
public PublishRequest.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<PublishRequest.Builder,PublishRequest>toBuilder in class IotDataPlaneRequestpublic static PublishRequest.Builder builder()
public static Class<? extends PublishRequest.Builder> serializableBuilderClass()
public final int hashCode()
hashCode in class AwsRequestpublic final boolean equals(Object obj)
equals in class AwsRequestpublic final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
getValueForField in class SdkRequestCopyright © 2022. All rights reserved.