use of com.google.api.services.healthcare.v1.model.ListHl7V2StoresResponse in project java-docs-samples by GoogleCloudPlatform.
the class Hl7v2StoreList method hl7v2StoreList.
public static void hl7v2StoreList(String datasetName) throws IOException {
// String datasetName =
// String.format(DATASET_NAME, "your-project-id", "your-region-id", "your-dataset-id");
// Initialize the client, which will be used to interact with the service.
CloudHealthcare client = createClient();
// Results are paginated, so multiple queries may be required.
String pageToken = null;
List<Hl7V2Store> stores = new ArrayList<>();
do {
// Create request and configure any parameters.
Hl7V2Stores.List request = client.projects().locations().datasets().hl7V2Stores().list(datasetName).setPageSize(// Specify pageSize up to 1000
100).setPageToken(pageToken);
// Execute response and collect results.
ListHl7V2StoresResponse response = request.execute();
stores.addAll(response.getHl7V2Stores());
// Update the page token for the next request.
pageToken = response.getNextPageToken();
} while (pageToken != null);
// Print results.
System.out.printf("Retrieved %s HL7v2 stores: \n", stores.size());
for (Hl7V2Store data : stores) {
System.out.println("\t" + data.toPrettyString());
}
}
Aggregations