code: public Key allocateIdSingle() {
      // [START allocateIdSingle]
      KeyFactory keyFactory = datastore.newKeyFactory().setKind("MyKind");
      IncompleteKey incompleteKey = keyFactory.newKey();
  
      // let cloud datastore automatically assign an id
      Key key = datastore.allocateId(incompleteKey);
      // [END allocateIdSingle]
      return key;
    }
docs: [TARGET allocateId(IncompleteKey)]