@@ -21,6 +21,7 @@ import "google/api/client.proto";
2121import "google/api/field_behavior.proto" ;
2222import "google/datastore/v1/entity.proto" ;
2323import "google/datastore/v1/query.proto" ;
24+ import "google/protobuf/timestamp.proto" ;
2425
2526option csharp_namespace = "Google.Cloud.Datastore.V1" ;
2627option go_package = "google.golang.org/genproto/googleapis/datastore/v1;datastore" ;
@@ -138,6 +139,9 @@ message LookupResponse {
138139 // order of results in this field is undefined and has no relation to the
139140 // order of the keys in the input.
140141 repeated Key deferred = 3 ;
142+
143+ // The time at which these entities were read or found missing.
144+ google.protobuf.Timestamp read_time = 7 ;
141145}
142146
143147// The request for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
@@ -259,6 +263,9 @@ message CommitResponse {
259263 // The number of index entries updated during the commit, or zero if none were
260264 // updated.
261265 int32 index_updates = 4 ;
266+
267+ // The transaction commit timestamp. Not set for non-transactional commits.
268+ google.protobuf.Timestamp commit_time = 8 ;
262269}
263270
264271// The request for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
@@ -332,6 +339,11 @@ message Mutation {
332339 // to. If this does not match the current version on the server, the
333340 // mutation conflicts.
334341 int64 base_version = 8 ;
342+
343+ // The update time of the entity that this mutation is being applied
344+ // to. If this does not match the current update time on the server, the
345+ // mutation conflicts.
346+ google.protobuf.Timestamp update_time = 11 ;
335347 }
336348}
337349
@@ -348,6 +360,12 @@ message MutationResult {
348360 // than the version of any possible future entity.
349361 int64 version = 4 ;
350362
363+ // The update time of the entity on the server after processing the mutation.
364+ // If the mutation doesn't change anything on the server, then the timestamp
365+ // will be the update timestamp of the current entity. This field will not be
366+ // set after a 'delete'.
367+ google.protobuf.Timestamp update_time = 6 ;
368+
351369 // Whether a conflict was detected for this mutation. Always false when a
352370 // conflict detection strategy field is not set in the mutation.
353371 bool conflict_detected = 5 ;
@@ -386,6 +404,11 @@ message ReadOptions {
386404 // transaction identifier is returned by a call to
387405 // [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
388406 bytes transaction = 2 ;
407+
408+ // Reads entities as they were at the given time. This may not be older
409+ // than 270 seconds. This value is only supported for Cloud Firestore in
410+ // Datastore mode.
411+ google.protobuf.Timestamp read_time = 4 ;
389412 }
390413}
391414
@@ -403,7 +426,9 @@ message TransactionOptions {
403426
404427 // Options specific to read-only transactions.
405428 message ReadOnly {
406-
429+ // Reads entities at the given time.
430+ // This may not be older than 60 seconds.
431+ google.protobuf.Timestamp read_time = 1 ;
407432 }
408433
409434 // The `mode` of the transaction, indicating whether write operations are
0 commit comments