use of com.google.cloud.firestore.v1.FirestoreClient.ListCollectionIdsPagedResponse in project beam by apache.
the class FirestoreTestingHelper method listCollectionIds.
Stream<String> listCollectionIds(String parent) {
ListCollectionIdsRequest lcir = ListCollectionIdsRequest.newBuilder().setParent(parent).build();
// LOGGER.debug("lcir = {}", lcir);
ListCollectionIdsPagedResponse response = rpc.listCollectionIdsPagedCallable().call(lcir);
return StreamSupport.stream(response.iteratePages().spliterator(), false).flatMap(page -> StreamSupport.stream(page.getValues().spliterator(), false)).map(colId -> String.format("%s/%s", parent, colId));
}
Aggregations