code: public Block withEntityTypes(EntityType... entityTypes) {
          java.util.ArrayList<String> entityTypesCopy = new java.util.ArrayList<String>(entityTypes.length);
          for (EntityType value : entityTypes) {
              entityTypesCopy.add(value.toString());
          }
          if (getEntityTypes() == null) {
              setEntityTypes(entityTypesCopy);
          } else {
              getEntityTypes().addAll(entityTypesCopy);
          }
          return this;
      }
docs: <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>
  
  @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