public DescribeDirectoriesRequest withDirectoryIds(String... directoryIds) {
        if (this.directoryIds == null) {
            setDirectoryIds(new com.amazonaws.internal.SdkInternalList<String>(directoryIds.length));
        }
        for (String ele : directoryIds) {
            this.directoryIds.add(ele);
        }
        return this;
    }
public DescribeDirectoriesRequest withDirectoryIds ( String ... directoryIds ) { if ( this . directoryIds == null ) { setDirectoryIds ( new com . amazonaws . internal . SdkInternalList < String > ( directoryIds . length ) ) ; } for ( String ele : directoryIds ) { this . directoryIds . add ( ele ) ; } return this ; }
<p>
A list of identifiers of the directories for which to obtain the information. If this member is null, all
directories that belong to the current account are returned.
</p>
<p>
An empty list results in an <code>InvalidParameterException</code> being thrown.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setDirectoryIds(java.util.Collection)} or {@link #withDirectoryIds(java.util.Collection)} if you want to
override the existing values.
</p>

@param directoryIds
A list of identifiers of the directories for which to obtain the information. If this member is null, all
directories that belong to the current account are returned.</p>
<p>
An empty list results in an <code>InvalidParameterException</code> being thrown.
@return Returns a reference to this object so that method calls can be chained together.