public Block withEntityTypes(String... entityTypes) {
        if (this.entityTypes == null) {
            setEntityTypes(new java.util.ArrayList<String>(entityTypes.length));
        }
        for (String ele : entityTypes) {
            this.entityTypes.add(ele);
        }
        return this;
    }
public Block withEntityTypes ( String ... entityTypes ) { if ( this . entityTypes == null ) { setEntityTypes ( new java . util . ArrayList < String > ( entityTypes . length ) ) ; } for ( String ele : entityTypes ) { this . entityTypes . add ( ele ) ; } return this ; }
<p>
The type of entity. The following can be returned:
</p>
<ul>
<li>
<p>
<i>KEY</i> - An identifier for a field on the document.
</p>
</li>
<li>
<p>
<i>VALUE</i> - The field text.
</p>
</li>
</ul>
<p>
<code>EntityTypes</code> isn't returned by <code>DetectDocumentText</code> and
<code>GetDocumentTextDetection</code>.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setEntityTypes(java.util.Collection)} or {@link #withEntityTypes(java.util.Collection)} if you want to
override the existing values.
</p>

@param entityTypes
The type of entity. The following can be returned:</p>
<ul>
<li>
<p>
<i>KEY</i> - An identifier for a field on the document.
</p>
</li>
<li>
<p>
<i>VALUE</i> - The field text.
</p>
</li>
</ul>
<p>
<code>EntityTypes</code> isn't returned by <code>DetectDocumentText</code> and
<code>GetDocumentTextDetection</code>.
@return Returns a reference to this object so that method calls can be chained together.
@see EntityType