public MqttHeaders withContentType(String contentType) {
        setContentType(contentType);
        return this;
    }
<p>
A UTF-8 encoded string that describes the content of the publishing message.
</p>
<p>
For more information, see <a href="https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901118">
Content Type</a> from the MQTT Version 5.0 specification.
</p>
<p>
Supports <a
href="https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html">substitution
templates</a>.
</p>

@param contentType
       A UTF-8 encoded string that describes the content of the publishing message.</p>
       <p>
       For more information, see <a
       href="https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901118"> Content Type</a> from
       the MQTT Version 5.0 specification.
       </p>
       <p>
       Supports <a href="https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html">
       substitution templates</a>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/MqttHeaders.java