public GatewayInstance withInstanceMessages(MessageDetail... instanceMessages) {
        if (this.instanceMessages == null) {
            setInstanceMessages(new java.util.ArrayList<MessageDetail>(instanceMessages.length));
        }
        for (MessageDetail ele : instanceMessages) {
            this.instanceMessages.add(ele);
        }
        return this;
    }
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setInstanceMessages(java.util.Collection)} or {@link #withInstanceMessages(java.util.Collection)} if you
want to override the existing values.
</p>

@param instanceMessages
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-mediaconnect/src/main/java/com/amazonaws/services/mediaconnect/model/GatewayInstance.java