Package com.google.cloud.datastore.v1


@Generated("by gapic-generator-java") package com.google.cloud.datastore.v1
A client to Cloud Datastore API

The interfaces provided are listed below, along with usage samples.

======================= DatastoreClient =======================

Service Description: Each RPC normalizes the partition IDs of the keys in its input entities, and always returns entities with keys with normalized partition IDs. This applies to all keys and entities, including those in values, except keys with both an empty path and an empty or unset partition ID. Normalization of input keys sets the project ID (if not already set) to the project ID from the request.

Sample for DatastoreClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DatastoreClient datastoreClient = DatastoreClient.create()) {
   String projectId = "projectId-894832108";
   ReadOptions readOptions = ReadOptions.newBuilder().build();
   List<Key> keys = new ArrayList<>();
   LookupResponse response = datastoreClient.lookup(projectId, readOptions, keys);
 }