public TestRoleResult withMessages(String... messages) {
        if (this.messages == null) {
            setMessages(new com.amazonaws.internal.SdkInternalList<String>(messages.length));
        }
        for (String ele : messages) {
            this.messages.add(ele);
        }
        return this;
    }
<p>
If the <code>Success</code> element contains <code>false</code>, this value is an array of one or more error
messages that were generated during the test process.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setMessages(java.util.Collection)} or {@link #withMessages(java.util.Collection)} if you want to override
the existing values.
</p>

@param messages
       If the <code>Success</code> element contains <code>false</code>, this value is an array of one or more
       error messages that were generated during the test process.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-elastictranscoder/src/main/java/com/amazonaws/services/elastictranscoder/model/TestRoleResult.java