public GetContactResult withTopicPreferences(TopicPreference... topicPreferences) {
        if (this.topicPreferences == null) {
            setTopicPreferences(new java.util.ArrayList<TopicPreference>(topicPreferences.length));
        }
        for (TopicPreference ele : topicPreferences) {
            this.topicPreferences.add(ele);
        }
        return this;
    }
<p>
The contact's preference for being opted-in to or opted-out of a topic.&gt;
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setTopicPreferences(java.util.Collection)} or {@link #withTopicPreferences(java.util.Collection)} if you
want to override the existing values.
</p>

@param topicPreferences
       The contact's preference for being opted-in to or opted-out of a topic.&gt;
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-sesv2/src/main/java/com/amazonaws/services/simpleemailv2/model/GetContactResult.java