public ListRetainedMessagesResult withRetainedTopics(RetainedMessageSummary... retainedTopics) {
        if (this.retainedTopics == null) {
            setRetainedTopics(new java.util.ArrayList<RetainedMessageSummary>(retainedTopics.length));
        }
        for (RetainedMessageSummary ele : retainedTopics) {
            this.retainedTopics.add(ele);
        }
        return this;
    }
<p>
A summary list the account's retained messages. The information returned doesn't include the message payloads of
the retained messages.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setRetainedTopics(java.util.Collection)} or {@link #withRetainedTopics(java.util.Collection)} if you want
to override the existing values.
</p>

@param retainedTopics
       A summary list the account's retained messages. The information returned doesn't include the message
       payloads of the retained messages.
@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/iotdata/model/ListRetainedMessagesResult.java