public SubjectDetail withCredentials(CredentialSummary... credentials) {
        if (this.credentials == null) {
            setCredentials(new java.util.ArrayList<CredentialSummary>(credentials.length));
        }
        for (CredentialSummary ele : credentials) {
            this.credentials.add(ele);
        }
        return this;
    }
<p>
The temporary session credentials vended at the last authenticating call with this subject.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setCredentials(java.util.Collection)} or {@link #withCredentials(java.util.Collection)} if you want to
override the existing values.
</p>

@param credentials
       The temporary session credentials vended at the last authenticating call with this subject.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-iamrolesanywhere/src/main/java/com/amazonaws/services/iamrolesanywhere/model/SubjectDetail.java