public final ListDocumentsPagedResponse listDocuments(String parent) {
    ListDocumentsRequest request = ListDocumentsRequest.newBuilder().setParent(parent).build();
    return listDocuments(request);
  }
public final ListDocumentsPagedResponse listDocuments ( String parent ) { ListDocumentsRequest request = ListDocumentsRequest . newBuilder ( ) . setParent ( parent ) . build ( ) ; return listDocuments ( request ) ; }
Returns the list of all documents of the knowledge base.

<p>Sample code:

<pre><code>
try (DocumentsClient documentsClient = DocumentsClient.create()) {
KnowledgeBaseName parent = KnowledgeBaseName.of("[PROJECT]", "[KNOWLEDGE_BASE]");
for (Document element : documentsClient.listDocuments(parent.toString()).iterateAll()) {
// doThingsWith(element);
}
}
</code></pre>

@param parent Required. The knowledge base to list all documents for. Format:
`projects/&lt;Project ID&gt;/knowledgeBases/&lt;Knowledge Base ID&gt;`.
@throws com.google.api.gax.rpc.ApiException if the remote call fails