diff --git a/proto-google-cloud-datastore-v1/clirr-ignored-differences.xml b/proto-google-cloud-datastore-v1/clirr-ignored-differences.xml
index 433c9d79c..e59f11f80 100644
--- a/proto-google-cloud-datastore-v1/clirr-ignored-differences.xml
+++ b/proto-google-cloud-datastore-v1/clirr-ignored-differences.xml
@@ -6,4 +6,14 @@
+ * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ *
+ * @return Whether the commitTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasCommitTime() {
+ return commitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ *
+ * @return The commitTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getCommitTime() {
+ return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_;
+ }
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() {
+ return getCommitTime();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -238,6 +299,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (indexUpdates_ != 0) {
output.writeInt32(4, indexUpdates_);
}
+ if (commitTime_ != null) {
+ output.writeMessage(8, getCommitTime());
+ }
unknownFields.writeTo(output);
}
@@ -253,6 +317,9 @@ public int getSerializedSize() {
if (indexUpdates_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, indexUpdates_);
}
+ if (commitTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCommitTime());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -270,6 +337,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getMutationResultsList().equals(other.getMutationResultsList())) return false;
if (getIndexUpdates() != other.getIndexUpdates()) return false;
+ if (hasCommitTime() != other.hasCommitTime()) return false;
+ if (hasCommitTime()) {
+ if (!getCommitTime().equals(other.getCommitTime())) return false;
+ }
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -287,6 +358,10 @@ public int hashCode() {
}
hash = (37 * hash) + INDEX_UPDATES_FIELD_NUMBER;
hash = (53 * hash) + getIndexUpdates();
+ if (hasCommitTime()) {
+ hash = (37 * hash) + COMMIT_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getCommitTime().hashCode();
+ }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -442,6 +517,12 @@ public Builder clear() {
}
indexUpdates_ = 0;
+ if (commitTimeBuilder_ == null) {
+ commitTime_ = null;
+ } else {
+ commitTime_ = null;
+ commitTimeBuilder_ = null;
+ }
return this;
}
@@ -480,6 +561,11 @@ public com.google.datastore.v1.CommitResponse buildPartial() {
result.mutationResults_ = mutationResultsBuilder_.build();
}
result.indexUpdates_ = indexUpdates_;
+ if (commitTimeBuilder_ == null) {
+ result.commitTime_ = commitTime_;
+ } else {
+ result.commitTime_ = commitTimeBuilder_.build();
+ }
onBuilt();
return result;
}
@@ -559,6 +645,9 @@ public Builder mergeFrom(com.google.datastore.v1.CommitResponse other) {
if (other.getIndexUpdates() != 0) {
setIndexUpdates(other.getIndexUpdates());
}
+ if (other.hasCommitTime()) {
+ mergeCommitTime(other.getCommitTime());
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -1017,6 +1106,189 @@ public Builder clearIndexUpdates() {
return this;
}
+ private com.google.protobuf.Timestamp commitTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ commitTimeBuilder_;
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ *
+ * @return Whether the commitTime field is set.
+ */
+ public boolean hasCommitTime() {
+ return commitTimeBuilder_ != null || commitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ *
+ * @return The commitTime.
+ */
+ public com.google.protobuf.Timestamp getCommitTime() {
+ if (commitTimeBuilder_ == null) {
+ return commitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : commitTime_;
+ } else {
+ return commitTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ */
+ public Builder setCommitTime(com.google.protobuf.Timestamp value) {
+ if (commitTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ commitTime_ = value;
+ onChanged();
+ } else {
+ commitTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ */
+ public Builder setCommitTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (commitTimeBuilder_ == null) {
+ commitTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ commitTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ */
+ public Builder mergeCommitTime(com.google.protobuf.Timestamp value) {
+ if (commitTimeBuilder_ == null) {
+ if (commitTime_ != null) {
+ commitTime_ =
+ com.google.protobuf.Timestamp.newBuilder(commitTime_).mergeFrom(value).buildPartial();
+ } else {
+ commitTime_ = value;
+ }
+ onChanged();
+ } else {
+ commitTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ */
+ public Builder clearCommitTime() {
+ if (commitTimeBuilder_ == null) {
+ commitTime_ = null;
+ onChanged();
+ } else {
+ commitTime_ = null;
+ commitTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ */
+ public com.google.protobuf.Timestamp.Builder getCommitTimeBuilder() {
+
+ onChanged();
+ return getCommitTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ */
+ public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() {
+ if (commitTimeBuilder_ != null) {
+ return commitTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return commitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : commitTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getCommitTimeFieldBuilder() {
+ if (commitTimeBuilder_ == null) {
+ commitTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getCommitTime(), getParentForChildren(), isClean());
+ commitTime_ = null;
+ }
+ return commitTimeBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/CommitResponseOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/CommitResponseOrBuilder.java
index 9a6f308c7..9b1681cfa 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/CommitResponseOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/CommitResponseOrBuilder.java
@@ -93,4 +93,39 @@ public interface CommitResponseOrBuilder
* @return The indexUpdates.
*/
int getIndexUpdates();
+
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ *
+ * @return Whether the commitTime field is set.
+ */
+ boolean hasCommitTime();
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ *
+ * @return The commitTime.
+ */
+ com.google.protobuf.Timestamp getCommitTime();
+ /**
+ *
+ *
+ * + * The transaction commit timestamp. Not set for non-transactional commits. + *+ * + *
.google.protobuf.Timestamp commit_time = 8;
+ */
+ com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder();
}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreProto.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreProto.java
index 41b425c3a..256f06c9a 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreProto.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreProto.java
@@ -121,15 +121,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "ns.proto\032\027google/api/client.proto\032\037googl"
+ "e/api/field_behavior.proto\032 google/datas"
+ "tore/v1/entity.proto\032\037google/datastore/v"
- + "1/query.proto\"\215\001\n\rLookupRequest\022\027\n\nproje"
- + "ct_id\030\010 \001(\tB\003\340A\002\0226\n\014read_options\030\001 \001(\0132 "
- + ".google.datastore.v1.ReadOptions\022+\n\004keys"
- + "\030\003 \003(\0132\030.google.datastore.v1.KeyB\003\340A\002\"\242\001"
- + "\n\016LookupResponse\0220\n\005found\030\001 \003(\0132!.google"
- + ".datastore.v1.EntityResult\0222\n\007missing\030\002 "
- + "\003(\0132!.google.datastore.v1.EntityResult\022*"
- + "\n\010deferred\030\003 \003(\0132\030.google.datastore.v1.K"
- + "ey\"\211\002\n\017RunQueryRequest\022\027\n\nproject_id\030\010 \001"
+ + "1/query.proto\032\037google/protobuf/timestamp"
+ + ".proto\"\215\001\n\rLookupRequest\022\027\n\nproject_id\030\010"
+ + " \001(\tB\003\340A\002\0226\n\014read_options\030\001 \001(\0132 .google"
+ + ".datastore.v1.ReadOptions\022+\n\004keys\030\003 \003(\0132"
+ + "\030.google.datastore.v1.KeyB\003\340A\002\"\321\001\n\016Looku"
+ + "pResponse\0220\n\005found\030\001 \003(\0132!.google.datast"
+ + "ore.v1.EntityResult\0222\n\007missing\030\002 \003(\0132!.g"
+ + "oogle.datastore.v1.EntityResult\022*\n\010defer"
+ + "red\030\003 \003(\0132\030.google.datastore.v1.Key\022-\n\tr"
+ + "ead_time\030\007 \001(\0132\032.google.protobuf.Timesta"
+ + "mp\"\211\002\n\017RunQueryRequest\022\027\n\nproject_id\030\010 \001"
+ "(\tB\003\340A\002\0226\n\014partition_id\030\002 \001(\0132 .google.d"
+ "atastore.v1.PartitionId\0226\n\014read_options\030"
+ "\001 \001(\0132 .google.datastore.v1.ReadOptions\022"
@@ -151,75 +153,81 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "n\030\001 \001(\014H\000\0220\n\tmutations\030\006 \003(\0132\035.google.da"
+ "tastore.v1.Mutation\"F\n\004Mode\022\024\n\020MODE_UNSP"
+ "ECIFIED\020\000\022\021\n\rTRANSACTIONAL\020\001\022\025\n\021NON_TRAN"
- + "SACTIONAL\020\002B\026\n\024transaction_selector\"f\n\016C"
- + "ommitResponse\022=\n\020mutation_results\030\003 \003(\0132"
- + "#.google.datastore.v1.MutationResult\022\025\n\r"
- + "index_updates\030\004 \001(\005\"Z\n\022AllocateIdsReques"
- + "t\022\027\n\nproject_id\030\010 \001(\tB\003\340A\002\022+\n\004keys\030\001 \003(\013"
- + "2\030.google.datastore.v1.KeyB\003\340A\002\"=\n\023Alloc"
- + "ateIdsResponse\022&\n\004keys\030\001 \003(\0132\030.google.da"
- + "tastore.v1.Key\"n\n\021ReserveIdsRequest\022\027\n\np"
- + "roject_id\030\010 \001(\tB\003\340A\002\022\023\n\013database_id\030\t \001("
- + "\t\022+\n\004keys\030\001 \003(\0132\030.google.datastore.v1.Ke"
- + "yB\003\340A\002\"\024\n\022ReserveIdsResponse\"\207\002\n\010Mutatio"
- + "n\022-\n\006insert\030\004 \001(\0132\033.google.datastore.v1."
- + "EntityH\000\022-\n\006update\030\005 \001(\0132\033.google.datast"
- + "ore.v1.EntityH\000\022-\n\006upsert\030\006 \001(\0132\033.google"
- + ".datastore.v1.EntityH\000\022*\n\006delete\030\007 \001(\0132\030"
- + ".google.datastore.v1.KeyH\000\022\026\n\014base_versi"
- + "on\030\010 \001(\003H\001B\013\n\toperationB\035\n\033conflict_dete"
- + "ction_strategy\"c\n\016MutationResult\022%\n\003key\030"
- + "\003 \001(\0132\030.google.datastore.v1.Key\022\017\n\007versi"
- + "on\030\004 \001(\003\022\031\n\021conflict_detected\030\005 \001(\010\"\325\001\n\013"
- + "ReadOptions\022L\n\020read_consistency\030\001 \001(\01620."
- + "google.datastore.v1.ReadOptions.ReadCons"
- + "istencyH\000\022\025\n\013transaction\030\002 \001(\014H\000\"M\n\017Read"
+ + "SACTIONAL\020\002B\026\n\024transaction_selector\"\227\001\n\016"
+ + "CommitResponse\022=\n\020mutation_results\030\003 \003(\013"
+ + "2#.google.datastore.v1.MutationResult\022\025\n"
+ + "\rindex_updates\030\004 \001(\005\022/\n\013commit_time\030\010 \001("
+ + "\0132\032.google.protobuf.Timestamp\"Z\n\022Allocat"
+ + "eIdsRequest\022\027\n\nproject_id\030\010 \001(\tB\003\340A\002\022+\n\004"
+ + "keys\030\001 \003(\0132\030.google.datastore.v1.KeyB\003\340A"
+ + "\002\"=\n\023AllocateIdsResponse\022&\n\004keys\030\001 \003(\0132\030"
+ + ".google.datastore.v1.Key\"n\n\021ReserveIdsRe"
+ + "quest\022\027\n\nproject_id\030\010 \001(\tB\003\340A\002\022\023\n\013databa"
+ + "se_id\030\t \001(\t\022+\n\004keys\030\001 \003(\0132\030.google.datas"
+ + "tore.v1.KeyB\003\340A\002\"\024\n\022ReserveIdsResponse\"\272"
+ + "\002\n\010Mutation\022-\n\006insert\030\004 \001(\0132\033.google.dat"
+ + "astore.v1.EntityH\000\022-\n\006update\030\005 \001(\0132\033.goo"
+ + "gle.datastore.v1.EntityH\000\022-\n\006upsert\030\006 \001("
+ + "\0132\033.google.datastore.v1.EntityH\000\022*\n\006dele"
+ + "te\030\007 \001(\0132\030.google.datastore.v1.KeyH\000\022\026\n\014"
+ + "base_version\030\010 \001(\003H\001\0221\n\013update_time\030\013 \001("
+ + "\0132\032.google.protobuf.TimestampH\001B\013\n\topera"
+ + "tionB\035\n\033conflict_detection_strategy\"\224\001\n\016"
+ + "MutationResult\022%\n\003key\030\003 \001(\0132\030.google.dat"
+ + "astore.v1.Key\022\017\n\007version\030\004 \001(\003\022/\n\013update"
+ + "_time\030\006 \001(\0132\032.google.protobuf.Timestamp\022"
+ + "\031\n\021conflict_detected\030\005 \001(\010\"\206\002\n\013ReadOptio"
+ + "ns\022L\n\020read_consistency\030\001 \001(\01620.google.da"
+ + "tastore.v1.ReadOptions.ReadConsistencyH\000"
+ + "\022\025\n\013transaction\030\002 \001(\014H\000\022/\n\tread_time\030\004 \001"
+ + "(\0132\032.google.protobuf.TimestampH\000\"M\n\017Read"
+ "Consistency\022 \n\034READ_CONSISTENCY_UNSPECIF"
+ "IED\020\000\022\n\n\006STRONG\020\001\022\014\n\010EVENTUAL\020\002B\022\n\020consi"
- + "stency_type\"\343\001\n\022TransactionOptions\022G\n\nre"
+ + "stency_type\"\222\002\n\022TransactionOptions\022G\n\nre"
+ "ad_write\030\001 \001(\01321.google.datastore.v1.Tra"
+ "nsactionOptions.ReadWriteH\000\022E\n\tread_only"
+ "\030\002 \001(\01320.google.datastore.v1.Transaction"
+ "Options.ReadOnlyH\000\032)\n\tReadWrite\022\034\n\024previ"
- + "ous_transaction\030\001 \001(\014\032\n\n\010ReadOnlyB\006\n\004mod"
- + "e2\223\n\n\tDatastore\022\235\001\n\006Lookup\022\".google.data"
- + "store.v1.LookupRequest\032#.google.datastor"
- + "e.v1.LookupResponse\"J\202\323\344\223\002%\" /v1/project"
- + "s/{project_id}:lookup:\001*\332A\034project_id,re"
- + "ad_options,keys\022\206\001\n\010RunQuery\022$.google.da"
- + "tastore.v1.RunQueryRequest\032%.google.data"
- + "store.v1.RunQueryResponse\"-\202\323\344\223\002\'\"\"/v1/p"
- + "rojects/{project_id}:runQuery:\001*\022\263\001\n\020Beg"
- + "inTransaction\022,.google.datastore.v1.Begi"
- + "nTransactionRequest\032-.google.datastore.v"
- + "1.BeginTransactionResponse\"B\202\323\344\223\002/\"*/v1/"
- + "projects/{project_id}:beginTransaction:\001"
- + "*\332A\nproject_id\022\302\001\n\006Commit\022\".google.datas"
- + "tore.v1.CommitRequest\032#.google.datastore"
- + ".v1.CommitResponse\"o\202\323\344\223\002%\" /v1/projects"
- + "/{project_id}:commit:\001*\332A%project_id,mod"
- + "e,transaction,mutations\332A\031project_id,mod"
- + "e,mutations\022\237\001\n\010Rollback\022$.google.datast"
- + "ore.v1.RollbackRequest\032%.google.datastor"
- + "e.v1.RollbackResponse\"F\202\323\344\223\002\'\"\"/v1/proje"
- + "cts/{project_id}:rollback:\001*\332A\026project_i"
- + "d,transaction\022\244\001\n\013AllocateIds\022\'.google.d"
- + "atastore.v1.AllocateIdsRequest\032(.google."
- + "datastore.v1.AllocateIdsResponse\"B\202\323\344\223\002*"
- + "\"%/v1/projects/{project_id}:allocateIds:"
- + "\001*\332A\017project_id,keys\022\240\001\n\nReserveIds\022&.go"
- + "ogle.datastore.v1.ReserveIdsRequest\032\'.go"
- + "ogle.datastore.v1.ReserveIdsResponse\"A\202\323"
- + "\344\223\002)\"$/v1/projects/{project_id}:reserveI"
- + "ds:\001*\332A\017project_id,keys\032v\312A\030datastore.go"
- + "ogleapis.com\322AXhttps://www.googleapis.co"
- + "m/auth/cloud-platform,https://www.google"
- + "apis.com/auth/datastoreB\300\001\n\027com.google.d"
- + "atastore.v1B\016DatastoreProtoP\001Z.google.protobuf.Timestamp update_time = 5;
+ *
+ * @return Whether the updateTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasUpdateTime() {
+ return updateTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ *
+ * @return The updateTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getUpdateTime() {
+ return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
+ }
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
+ return getUpdateTime();
+ }
+
public static final int CURSOR_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString cursor_;
/**
@@ -424,6 +494,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (version_ != 0L) {
output.writeInt64(4, version_);
}
+ if (updateTime_ != null) {
+ output.writeMessage(5, getUpdateTime());
+ }
unknownFields.writeTo(output);
}
@@ -442,6 +515,9 @@ public int getSerializedSize() {
if (version_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, version_);
}
+ if (updateTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -462,6 +538,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getEntity().equals(other.getEntity())) return false;
}
if (getVersion() != other.getVersion()) return false;
+ if (hasUpdateTime() != other.hasUpdateTime()) return false;
+ if (hasUpdateTime()) {
+ if (!getUpdateTime().equals(other.getUpdateTime())) return false;
+ }
if (!getCursor().equals(other.getCursor())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
@@ -480,6 +560,10 @@ public int hashCode() {
}
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getVersion());
+ if (hasUpdateTime()) {
+ hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getUpdateTime().hashCode();
+ }
hash = (37 * hash) + CURSOR_FIELD_NUMBER;
hash = (53 * hash) + getCursor().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
@@ -634,6 +718,12 @@ public Builder clear() {
}
version_ = 0L;
+ if (updateTimeBuilder_ == null) {
+ updateTime_ = null;
+ } else {
+ updateTime_ = null;
+ updateTimeBuilder_ = null;
+ }
cursor_ = com.google.protobuf.ByteString.EMPTY;
return this;
@@ -668,6 +758,11 @@ public com.google.datastore.v1.EntityResult buildPartial() {
result.entity_ = entityBuilder_.build();
}
result.version_ = version_;
+ if (updateTimeBuilder_ == null) {
+ result.updateTime_ = updateTime_;
+ } else {
+ result.updateTime_ = updateTimeBuilder_.build();
+ }
result.cursor_ = cursor_;
onBuilt();
return result;
@@ -724,6 +819,9 @@ public Builder mergeFrom(com.google.datastore.v1.EntityResult other) {
if (other.getVersion() != 0L) {
setVersion(other.getVersion());
}
+ if (other.hasUpdateTime()) {
+ mergeUpdateTime(other.getUpdateTime());
+ }
if (other.getCursor() != com.google.protobuf.ByteString.EMPTY) {
setCursor(other.getCursor());
}
@@ -1005,6 +1103,216 @@ public Builder clearVersion() {
return this;
}
+ private com.google.protobuf.Timestamp updateTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ updateTimeBuilder_;
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ *
+ * @return Whether the updateTime field is set.
+ */
+ public boolean hasUpdateTime() {
+ return updateTimeBuilder_ != null || updateTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ *
+ * @return The updateTime.
+ */
+ public com.google.protobuf.Timestamp getUpdateTime() {
+ if (updateTimeBuilder_ == null) {
+ return updateTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : updateTime_;
+ } else {
+ return updateTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ */
+ public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
+ if (updateTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ updateTime_ = value;
+ onChanged();
+ } else {
+ updateTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ */
+ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (updateTimeBuilder_ == null) {
+ updateTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ updateTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ */
+ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
+ if (updateTimeBuilder_ == null) {
+ if (updateTime_ != null) {
+ updateTime_ =
+ com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial();
+ } else {
+ updateTime_ = value;
+ }
+ onChanged();
+ } else {
+ updateTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ */
+ public Builder clearUpdateTime() {
+ if (updateTimeBuilder_ == null) {
+ updateTime_ = null;
+ onChanged();
+ } else {
+ updateTime_ = null;
+ updateTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ */
+ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
+
+ onChanged();
+ return getUpdateTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ */
+ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
+ if (updateTimeBuilder_ != null) {
+ return updateTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return updateTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : updateTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getUpdateTimeFieldBuilder() {
+ if (updateTimeBuilder_ == null) {
+ updateTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getUpdateTime(), getParentForChildren(), isClean());
+ updateTime_ = null;
+ }
+ return updateTimeBuilder_;
+ }
+
private com.google.protobuf.ByteString cursor_ = com.google.protobuf.ByteString.EMPTY;
/**
*
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/EntityResultOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/EntityResultOrBuilder.java
index 9113fb739..6be5b8e1a 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/EntityResultOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/EntityResultOrBuilder.java
@@ -77,6 +77,50 @@ public interface EntityResultOrBuilder
*/
long getVersion();
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ *
+ * @return Whether the updateTime field is set.
+ */
+ boolean hasUpdateTime();
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ *
+ * @return The updateTime.
+ */
+ com.google.protobuf.Timestamp getUpdateTime();
+ /**
+ *
+ *
+ * + * The time at which the entity was last changed. + * This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity + * results. + * If this entity is missing, this field will not be set. + *+ * + *
.google.protobuf.Timestamp update_time = 5;
+ */
+ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder();
+
/**
*
*
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/LookupResponse.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/LookupResponse.java
index 20ae9687f..23563a3c6 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/LookupResponse.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/LookupResponse.java
@@ -105,6 +105,21 @@ private LookupResponse(
input.readMessage(com.google.datastore.v1.Key.parser(), extensionRegistry));
break;
}
+ case 58:
+ {
+ com.google.protobuf.Timestamp.Builder subBuilder = null;
+ if (readTime_ != null) {
+ subBuilder = readTime_.toBuilder();
+ }
+ readTime_ =
+ input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(readTime_);
+ readTime_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -384,6 +399,52 @@ public com.google.datastore.v1.KeyOrBuilder getDeferredOrBuilder(int index) {
return deferred_.get(index);
}
+ public static final int READ_TIME_FIELD_NUMBER = 7;
+ private com.google.protobuf.Timestamp readTime_;
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ *
+ * @return Whether the readTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasReadTime() {
+ return readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ *
+ * @return The readTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getReadTime() {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ return getReadTime();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -407,6 +468,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
for (int i = 0; i < deferred_.size(); i++) {
output.writeMessage(3, deferred_.get(i));
}
+ if (readTime_ != null) {
+ output.writeMessage(7, getReadTime());
+ }
unknownFields.writeTo(output);
}
@@ -425,6 +489,9 @@ public int getSerializedSize() {
for (int i = 0; i < deferred_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, deferred_.get(i));
}
+ if (readTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getReadTime());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -443,6 +510,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getFoundList().equals(other.getFoundList())) return false;
if (!getMissingList().equals(other.getMissingList())) return false;
if (!getDeferredList().equals(other.getDeferredList())) return false;
+ if (hasReadTime() != other.hasReadTime()) return false;
+ if (hasReadTime()) {
+ if (!getReadTime().equals(other.getReadTime())) return false;
+ }
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -466,6 +537,10 @@ public int hashCode() {
hash = (37 * hash) + DEFERRED_FIELD_NUMBER;
hash = (53 * hash) + getDeferredList().hashCode();
}
+ if (hasReadTime()) {
+ hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getReadTime().hashCode();
+ }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -633,6 +708,12 @@ public Builder clear() {
} else {
deferredBuilder_.clear();
}
+ if (readTimeBuilder_ == null) {
+ readTime_ = null;
+ } else {
+ readTime_ = null;
+ readTimeBuilder_ = null;
+ }
return this;
}
@@ -688,6 +769,11 @@ public com.google.datastore.v1.LookupResponse buildPartial() {
} else {
result.deferred_ = deferredBuilder_.build();
}
+ if (readTimeBuilder_ == null) {
+ result.readTime_ = readTime_;
+ } else {
+ result.readTime_ = readTimeBuilder_.build();
+ }
onBuilt();
return result;
}
@@ -818,6 +904,9 @@ public Builder mergeFrom(com.google.datastore.v1.LookupResponse other) {
}
}
}
+ if (other.hasReadTime()) {
+ mergeReadTime(other.getReadTime());
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -1998,6 +2087,185 @@ public java.util.List+ * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ *
+ * @return Whether the readTime field is set.
+ */
+ public boolean hasReadTime() {
+ return readTimeBuilder_ != null || readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ *
+ * @return The readTime.
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (readTimeBuilder_ == null) {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ } else {
+ return readTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ readTime_ = value;
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (readTimeBuilder_ == null) {
+ readTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public Builder mergeReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (readTime_ != null) {
+ readTime_ =
+ com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial();
+ } else {
+ readTime_ = value;
+ }
+ onChanged();
+ } else {
+ readTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public Builder clearReadTime() {
+ if (readTimeBuilder_ == null) {
+ readTime_ = null;
+ onChanged();
+ } else {
+ readTime_ = null;
+ readTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {
+
+ onChanged();
+ return getReadTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ if (readTimeBuilder_ != null) {
+ return readTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getReadTimeFieldBuilder() {
+ if (readTimeBuilder_ == null) {
+ readTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getReadTime(), getParentForChildren(), isClean());
+ readTime_ = null;
+ }
+ return readTimeBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/LookupResponseOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/LookupResponseOrBuilder.java
index 496a9cdcf..5d89e1b33 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/LookupResponseOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/LookupResponseOrBuilder.java
@@ -205,4 +205,39 @@ public interface LookupResponseOrBuilder
* repeated .google.datastore.v1.Key deferred = 3;
*/
com.google.datastore.v1.KeyOrBuilder getDeferredOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ *
+ * @return Whether the readTime field is set.
+ */
+ boolean hasReadTime();
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ *
+ * @return The readTime.
+ */
+ com.google.protobuf.Timestamp getReadTime();
+ /**
+ *
+ *
+ * + * The time at which these entities were read or found missing. + *+ * + *
.google.protobuf.Timestamp read_time = 7;
+ */
+ com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder();
}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Mutation.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Mutation.java
index 4bacc9628..ecc6b68f2 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Mutation.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Mutation.java
@@ -134,6 +134,22 @@ private Mutation(
conflictDetectionStrategy_ = input.readInt64();
break;
}
+ case 90:
+ {
+ com.google.protobuf.Timestamp.Builder subBuilder = null;
+ if (conflictDetectionStrategyCase_ == 11) {
+ subBuilder =
+ ((com.google.protobuf.Timestamp) conflictDetectionStrategy_).toBuilder();
+ }
+ conflictDetectionStrategy_ =
+ input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom((com.google.protobuf.Timestamp) conflictDetectionStrategy_);
+ conflictDetectionStrategy_ = subBuilder.buildPartial();
+ }
+ conflictDetectionStrategyCase_ = 11;
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -228,6 +244,7 @@ public enum ConflictDetectionStrategyCase
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
BASE_VERSION(8),
+ UPDATE_TIME(11),
CONFLICTDETECTIONSTRATEGY_NOT_SET(0);
private final int value;
@@ -248,6 +265,8 @@ public static ConflictDetectionStrategyCase forNumber(int value) {
switch (value) {
case 8:
return BASE_VERSION;
+ case 11:
+ return UPDATE_TIME;
case 0:
return CONFLICTDETECTIONSTRATEGY_NOT_SET;
default:
@@ -519,6 +538,63 @@ public long getBaseVersion() {
return 0L;
}
+ public static final int UPDATE_TIME_FIELD_NUMBER = 11;
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ *
+ * @return Whether the updateTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasUpdateTime() {
+ return conflictDetectionStrategyCase_ == 11;
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ *
+ * @return The updateTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getUpdateTime() {
+ if (conflictDetectionStrategyCase_ == 11) {
+ return (com.google.protobuf.Timestamp) conflictDetectionStrategy_;
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
+ if (conflictDetectionStrategyCase_ == 11) {
+ return (com.google.protobuf.Timestamp) conflictDetectionStrategy_;
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -548,6 +624,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (conflictDetectionStrategyCase_ == 8) {
output.writeInt64(8, (long) ((java.lang.Long) conflictDetectionStrategy_));
}
+ if (conflictDetectionStrategyCase_ == 11) {
+ output.writeMessage(11, (com.google.protobuf.Timestamp) conflictDetectionStrategy_);
+ }
unknownFields.writeTo(output);
}
@@ -582,6 +661,11 @@ public int getSerializedSize() {
com.google.protobuf.CodedOutputStream.computeInt64Size(
8, (long) ((java.lang.Long) conflictDetectionStrategy_));
}
+ if (conflictDetectionStrategyCase_ == 11) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 11, (com.google.protobuf.Timestamp) conflictDetectionStrategy_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -620,6 +704,9 @@ public boolean equals(final java.lang.Object obj) {
case 8:
if (getBaseVersion() != other.getBaseVersion()) return false;
break;
+ case 11:
+ if (!getUpdateTime().equals(other.getUpdateTime())) return false;
+ break;
case 0:
default:
}
@@ -659,6 +746,10 @@ public int hashCode() {
hash = (37 * hash) + BASE_VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBaseVersion());
break;
+ case 11:
+ hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getUpdateTime().hashCode();
+ break;
case 0:
default:
}
@@ -867,6 +958,13 @@ public com.google.datastore.v1.Mutation buildPartial() {
if (conflictDetectionStrategyCase_ == 8) {
result.conflictDetectionStrategy_ = conflictDetectionStrategy_;
}
+ if (conflictDetectionStrategyCase_ == 11) {
+ if (updateTimeBuilder_ == null) {
+ result.conflictDetectionStrategy_ = conflictDetectionStrategy_;
+ } else {
+ result.conflictDetectionStrategy_ = updateTimeBuilder_.build();
+ }
+ }
result.operationCase_ = operationCase_;
result.conflictDetectionStrategyCase_ = conflictDetectionStrategyCase_;
onBuilt();
@@ -950,6 +1048,11 @@ public Builder mergeFrom(com.google.datastore.v1.Mutation other) {
setBaseVersion(other.getBaseVersion());
break;
}
+ case UPDATE_TIME:
+ {
+ mergeUpdateTime(other.getUpdateTime());
+ break;
+ }
case CONFLICTDETECTIONSTRATEGY_NOT_SET:
{
break;
@@ -1944,6 +2047,232 @@ public Builder clearBaseVersion() {
return this;
}
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ updateTimeBuilder_;
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ *
+ * @return Whether the updateTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasUpdateTime() {
+ return conflictDetectionStrategyCase_ == 11;
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ *
+ * @return The updateTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getUpdateTime() {
+ if (updateTimeBuilder_ == null) {
+ if (conflictDetectionStrategyCase_ == 11) {
+ return (com.google.protobuf.Timestamp) conflictDetectionStrategy_;
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ } else {
+ if (conflictDetectionStrategyCase_ == 11) {
+ return updateTimeBuilder_.getMessage();
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ */
+ public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
+ if (updateTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ conflictDetectionStrategy_ = value;
+ onChanged();
+ } else {
+ updateTimeBuilder_.setMessage(value);
+ }
+ conflictDetectionStrategyCase_ = 11;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ */
+ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (updateTimeBuilder_ == null) {
+ conflictDetectionStrategy_ = builderForValue.build();
+ onChanged();
+ } else {
+ updateTimeBuilder_.setMessage(builderForValue.build());
+ }
+ conflictDetectionStrategyCase_ = 11;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ */
+ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
+ if (updateTimeBuilder_ == null) {
+ if (conflictDetectionStrategyCase_ == 11
+ && conflictDetectionStrategy_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
+ conflictDetectionStrategy_ =
+ com.google.protobuf.Timestamp.newBuilder(
+ (com.google.protobuf.Timestamp) conflictDetectionStrategy_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ conflictDetectionStrategy_ = value;
+ }
+ onChanged();
+ } else {
+ if (conflictDetectionStrategyCase_ == 11) {
+ updateTimeBuilder_.mergeFrom(value);
+ }
+ updateTimeBuilder_.setMessage(value);
+ }
+ conflictDetectionStrategyCase_ = 11;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ */
+ public Builder clearUpdateTime() {
+ if (updateTimeBuilder_ == null) {
+ if (conflictDetectionStrategyCase_ == 11) {
+ conflictDetectionStrategyCase_ = 0;
+ conflictDetectionStrategy_ = null;
+ onChanged();
+ }
+ } else {
+ if (conflictDetectionStrategyCase_ == 11) {
+ conflictDetectionStrategyCase_ = 0;
+ conflictDetectionStrategy_ = null;
+ }
+ updateTimeBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ */
+ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
+ return getUpdateTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
+ if ((conflictDetectionStrategyCase_ == 11) && (updateTimeBuilder_ != null)) {
+ return updateTimeBuilder_.getMessageOrBuilder();
+ } else {
+ if (conflictDetectionStrategyCase_ == 11) {
+ return (com.google.protobuf.Timestamp) conflictDetectionStrategy_;
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getUpdateTimeFieldBuilder() {
+ if (updateTimeBuilder_ == null) {
+ if (!(conflictDetectionStrategyCase_ == 11)) {
+ conflictDetectionStrategy_ = com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+ updateTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ (com.google.protobuf.Timestamp) conflictDetectionStrategy_,
+ getParentForChildren(),
+ isClean());
+ conflictDetectionStrategy_ = null;
+ }
+ conflictDetectionStrategyCase_ = 11;
+ onChanged();
+ ;
+ return updateTimeBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationOrBuilder.java
index 672998d72..3257d3d22 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationOrBuilder.java
@@ -204,6 +204,47 @@ public interface MutationOrBuilder
*/
long getBaseVersion();
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ *
+ * @return Whether the updateTime field is set.
+ */
+ boolean hasUpdateTime();
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ *
+ * @return The updateTime.
+ */
+ com.google.protobuf.Timestamp getUpdateTime();
+ /**
+ *
+ *
+ * + * The update time of the entity that this mutation is being applied + * to. If this does not match the current update time on the server, the + * mutation conflicts. + *+ * + *
.google.protobuf.Timestamp update_time = 11;
+ */
+ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder();
+
public com.google.datastore.v1.Mutation.OperationCase getOperationCase();
public com.google.datastore.v1.Mutation.ConflictDetectionStrategyCase
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationResult.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationResult.java
index ecc28914b..c1c710167 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationResult.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationResult.java
@@ -90,6 +90,21 @@ private MutationResult(
case 40:
{
conflictDetected_ = input.readBool();
+ break;
+ }
+ case 50:
+ {
+ com.google.protobuf.Timestamp.Builder subBuilder = null;
+ if (updateTime_ != null) {
+ subBuilder = updateTime_.toBuilder();
+ }
+ updateTime_ =
+ input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(updateTime_);
+ updateTime_ = subBuilder.buildPartial();
+ }
+
break;
}
default:
@@ -197,6 +212,61 @@ public long getVersion() {
return version_;
}
+ public static final int UPDATE_TIME_FIELD_NUMBER = 6;
+ private com.google.protobuf.Timestamp updateTime_;
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ *
+ * @return Whether the updateTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasUpdateTime() {
+ return updateTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ *
+ * @return The updateTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getUpdateTime() {
+ return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
+ return getUpdateTime();
+ }
+
public static final int CONFLICT_DETECTED_FIELD_NUMBER = 5;
private boolean conflictDetected_;
/**
@@ -239,6 +309,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (conflictDetected_ != false) {
output.writeBool(5, conflictDetected_);
}
+ if (updateTime_ != null) {
+ output.writeMessage(6, getUpdateTime());
+ }
unknownFields.writeTo(output);
}
@@ -257,6 +330,9 @@ public int getSerializedSize() {
if (conflictDetected_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, conflictDetected_);
}
+ if (updateTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -277,6 +353,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getKey().equals(other.getKey())) return false;
}
if (getVersion() != other.getVersion()) return false;
+ if (hasUpdateTime() != other.hasUpdateTime()) return false;
+ if (hasUpdateTime()) {
+ if (!getUpdateTime().equals(other.getUpdateTime())) return false;
+ }
if (getConflictDetected() != other.getConflictDetected()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
@@ -295,6 +375,10 @@ public int hashCode() {
}
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getVersion());
+ if (hasUpdateTime()) {
+ hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getUpdateTime().hashCode();
+ }
hash = (37 * hash) + CONFLICT_DETECTED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getConflictDetected());
hash = (29 * hash) + unknownFields.hashCode();
@@ -450,6 +534,12 @@ public Builder clear() {
}
version_ = 0L;
+ if (updateTimeBuilder_ == null) {
+ updateTime_ = null;
+ } else {
+ updateTime_ = null;
+ updateTimeBuilder_ = null;
+ }
conflictDetected_ = false;
return this;
@@ -485,6 +575,11 @@ public com.google.datastore.v1.MutationResult buildPartial() {
result.key_ = keyBuilder_.build();
}
result.version_ = version_;
+ if (updateTimeBuilder_ == null) {
+ result.updateTime_ = updateTime_;
+ } else {
+ result.updateTime_ = updateTimeBuilder_.build();
+ }
result.conflictDetected_ = conflictDetected_;
onBuilt();
return result;
@@ -541,6 +636,9 @@ public Builder mergeFrom(com.google.datastore.v1.MutationResult other) {
if (other.getVersion() != 0L) {
setVersion(other.getVersion());
}
+ if (other.hasUpdateTime()) {
+ mergeUpdateTime(other.getUpdateTime());
+ }
if (other.getConflictDetected() != false) {
setConflictDetected(other.getConflictDetected());
}
@@ -823,6 +921,216 @@ public Builder clearVersion() {
return this;
}
+ private com.google.protobuf.Timestamp updateTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ updateTimeBuilder_;
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ *
+ * @return Whether the updateTime field is set.
+ */
+ public boolean hasUpdateTime() {
+ return updateTimeBuilder_ != null || updateTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ *
+ * @return The updateTime.
+ */
+ public com.google.protobuf.Timestamp getUpdateTime() {
+ if (updateTimeBuilder_ == null) {
+ return updateTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : updateTime_;
+ } else {
+ return updateTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ */
+ public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
+ if (updateTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ updateTime_ = value;
+ onChanged();
+ } else {
+ updateTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ */
+ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (updateTimeBuilder_ == null) {
+ updateTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ updateTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ */
+ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
+ if (updateTimeBuilder_ == null) {
+ if (updateTime_ != null) {
+ updateTime_ =
+ com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial();
+ } else {
+ updateTime_ = value;
+ }
+ onChanged();
+ } else {
+ updateTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ */
+ public Builder clearUpdateTime() {
+ if (updateTimeBuilder_ == null) {
+ updateTime_ = null;
+ onChanged();
+ } else {
+ updateTime_ = null;
+ updateTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ */
+ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
+
+ onChanged();
+ return getUpdateTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ */
+ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
+ if (updateTimeBuilder_ != null) {
+ return updateTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return updateTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : updateTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getUpdateTimeFieldBuilder() {
+ if (updateTimeBuilder_ == null) {
+ updateTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getUpdateTime(), getParentForChildren(), isClean());
+ updateTime_ = null;
+ }
+ return updateTimeBuilder_;
+ }
+
private boolean conflictDetected_;
/**
*
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationResultOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationResultOrBuilder.java
index 777a56ae9..03f686a2c 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationResultOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationResultOrBuilder.java
@@ -78,6 +78,50 @@ public interface MutationResultOrBuilder
*/
long getVersion();
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ *
+ * @return Whether the updateTime field is set.
+ */
+ boolean hasUpdateTime();
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ *
+ * @return The updateTime.
+ */
+ com.google.protobuf.Timestamp getUpdateTime();
+ /**
+ *
+ *
+ * + * The update time of the entity on the server after processing the mutation. + * If the mutation doesn't change anything on the server, then the timestamp + * will be the update timestamp of the current entity. This field will not be + * set after a 'delete'. + *+ * + *
.google.protobuf.Timestamp update_time = 6;
+ */
+ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder();
+
/**
*
*
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryProto.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryProto.java
index fa56f7282..d96e6c2d9 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryProto.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryProto.java
@@ -90,80 +90,85 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
java.lang.String[] descriptorData = {
"\n\037google/datastore/v1/query.proto\022\023googl"
+ "e.datastore.v1\032 google/datastore/v1/enti"
- + "ty.proto\032\036google/protobuf/wrappers.proto"
- + "\"\257\001\n\014EntityResult\022+\n\006entity\030\001 \001(\0132\033.goog"
- + "le.datastore.v1.Entity\022\017\n\007version\030\004 \001(\003\022"
- + "\016\n\006cursor\030\003 \001(\014\"Q\n\nResultType\022\033\n\027RESULT_"
- + "TYPE_UNSPECIFIED\020\000\022\010\n\004FULL\020\001\022\016\n\nPROJECTI"
- + "ON\020\002\022\014\n\010KEY_ONLY\020\003\"\362\002\n\005Query\0223\n\nprojecti"
- + "on\030\002 \003(\0132\037.google.datastore.v1.Projectio"
- + "n\0221\n\004kind\030\003 \003(\0132#.google.datastore.v1.Ki"
- + "ndExpression\022+\n\006filter\030\004 \001(\0132\033.google.da"
- + "tastore.v1.Filter\0221\n\005order\030\005 \003(\0132\".googl"
- + "e.datastore.v1.PropertyOrder\022;\n\013distinct"
- + "_on\030\006 \003(\0132&.google.datastore.v1.Property"
- + "Reference\022\024\n\014start_cursor\030\007 \001(\014\022\022\n\nend_c"
- + "ursor\030\010 \001(\014\022\016\n\006offset\030\n \001(\005\022*\n\005limit\030\014 \001"
- + "(\0132\033.google.protobuf.Int32Value\"\036\n\016KindE"
- + "xpression\022\014\n\004name\030\001 \001(\t\"!\n\021PropertyRefer"
- + "ence\022\014\n\004name\030\002 \001(\t\"F\n\nProjection\0228\n\010prop"
- + "erty\030\001 \001(\0132&.google.datastore.v1.Propert"
- + "yReference\"\321\001\n\rPropertyOrder\0228\n\010property"
- + "\030\001 \001(\0132&.google.datastore.v1.PropertyRef"
- + "erence\022?\n\tdirection\030\002 \001(\0162,.google.datas"
- + "tore.v1.PropertyOrder.Direction\"E\n\tDirec"
- + "tion\022\031\n\025DIRECTION_UNSPECIFIED\020\000\022\r\n\tASCEN"
- + "DING\020\001\022\016\n\nDESCENDING\020\002\"\231\001\n\006Filter\022@\n\020com"
- + "posite_filter\030\001 \001(\0132$.google.datastore.v"
- + "1.CompositeFilterH\000\022>\n\017property_filter\030\002"
- + " \001(\0132#.google.datastore.v1.PropertyFilte"
- + "rH\000B\r\n\013filter_type\"\251\001\n\017CompositeFilter\0229"
- + "\n\002op\030\001 \001(\0162-.google.datastore.v1.Composi"
- + "teFilter.Operator\022,\n\007filters\030\002 \003(\0132\033.goo"
- + "gle.datastore.v1.Filter\"-\n\010Operator\022\030\n\024O"
- + "PERATOR_UNSPECIFIED\020\000\022\007\n\003AND\020\001\"\352\002\n\016Prope"
- + "rtyFilter\0228\n\010property\030\001 \001(\0132&.google.dat"
- + "astore.v1.PropertyReference\0228\n\002op\030\002 \001(\0162"
- + ",.google.datastore.v1.PropertyFilter.Ope"
- + "rator\022)\n\005value\030\003 \001(\0132\032.google.datastore."
- + "v1.Value\"\270\001\n\010Operator\022\030\n\024OPERATOR_UNSPEC"
- + "IFIED\020\000\022\r\n\tLESS_THAN\020\001\022\026\n\022LESS_THAN_OR_E"
- + "QUAL\020\002\022\020\n\014GREATER_THAN\020\003\022\031\n\025GREATER_THAN"
- + "_OR_EQUAL\020\004\022\t\n\005EQUAL\020\005\022\006\n\002IN\020\006\022\r\n\tNOT_EQ"
- + "UAL\020\t\022\020\n\014HAS_ANCESTOR\020\013\022\n\n\006NOT_IN\020\r\"\245\002\n\010"
- + "GqlQuery\022\024\n\014query_string\030\001 \001(\t\022\026\n\016allow_"
- + "literals\030\002 \001(\010\022H\n\016named_bindings\030\005 \003(\01320"
- + ".google.datastore.v1.GqlQuery.NamedBindi"
- + "ngsEntry\022C\n\023positional_bindings\030\004 \003(\0132&."
- + "google.datastore.v1.GqlQueryParameter\032\\\n"
- + "\022NamedBindingsEntry\022\013\n\003key\030\001 \001(\t\0225\n\005valu"
- + "e\030\002 \001(\0132&.google.datastore.v1.GqlQueryPa"
- + "rameter:\0028\001\"d\n\021GqlQueryParameter\022+\n\005valu"
- + "e\030\002 \001(\0132\032.google.datastore.v1.ValueH\000\022\020\n"
- + "\006cursor\030\003 \001(\014H\000B\020\n\016parameter_type\"\336\003\n\020Qu"
- + "eryResultBatch\022\027\n\017skipped_results\030\006 \001(\005\022"
- + "\026\n\016skipped_cursor\030\003 \001(\014\022H\n\022entity_result"
- + "_type\030\001 \001(\0162,.google.datastore.v1.Entity"
- + "Result.ResultType\0229\n\016entity_results\030\002 \003("
- + "\0132!.google.datastore.v1.EntityResult\022\022\n\n"
- + "end_cursor\030\004 \001(\014\022K\n\014more_results\030\005 \001(\01625"
- + ".google.datastore.v1.QueryResultBatch.Mo"
- + "reResultsType\022\030\n\020snapshot_version\030\007 \001(\003\""
- + "\230\001\n\017MoreResultsType\022!\n\035MORE_RESULTS_TYPE"
- + "_UNSPECIFIED\020\000\022\020\n\014NOT_FINISHED\020\001\022\034\n\030MORE"
- + "_RESULTS_AFTER_LIMIT\020\002\022\035\n\031MORE_RESULTS_A"
- + "FTER_CURSOR\020\004\022\023\n\017NO_MORE_RESULTS\020\003B\274\001\n\027c"
- + "om.google.datastore.v1B\nQueryProtoP\001Z.google.protobuf.Timestamp read_time = 8;
+ *
+ * @return Whether the readTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasReadTime() {
+ return readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ *
+ * @return The readTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getReadTime() {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ return getReadTime();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -623,6 +708,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (snapshotVersion_ != 0L) {
output.writeInt64(7, snapshotVersion_);
}
+ if (readTime_ != null) {
+ output.writeMessage(8, getReadTime());
+ }
unknownFields.writeTo(output);
}
@@ -656,6 +744,9 @@ public int getSerializedSize() {
if (snapshotVersion_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, snapshotVersion_);
}
+ if (readTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getReadTime());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -678,6 +769,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getEndCursor().equals(other.getEndCursor())) return false;
if (moreResults_ != other.moreResults_) return false;
if (getSnapshotVersion() != other.getSnapshotVersion()) return false;
+ if (hasReadTime() != other.hasReadTime()) return false;
+ if (hasReadTime()) {
+ if (!getReadTime().equals(other.getReadTime())) return false;
+ }
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -705,6 +800,10 @@ public int hashCode() {
hash = (53 * hash) + moreResults_;
hash = (37 * hash) + SNAPSHOT_VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSnapshotVersion());
+ if (hasReadTime()) {
+ hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getReadTime().hashCode();
+ }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -870,6 +969,12 @@ public Builder clear() {
snapshotVersion_ = 0L;
+ if (readTimeBuilder_ == null) {
+ readTime_ = null;
+ } else {
+ readTime_ = null;
+ readTimeBuilder_ = null;
+ }
return this;
}
@@ -913,6 +1018,11 @@ public com.google.datastore.v1.QueryResultBatch buildPartial() {
result.endCursor_ = endCursor_;
result.moreResults_ = moreResults_;
result.snapshotVersion_ = snapshotVersion_;
+ if (readTimeBuilder_ == null) {
+ result.readTime_ = readTime_;
+ } else {
+ result.readTime_ = readTimeBuilder_.build();
+ }
onBuilt();
return result;
}
@@ -1007,6 +1117,9 @@ public Builder mergeFrom(com.google.datastore.v1.QueryResultBatch other) {
if (other.getSnapshotVersion() != 0L) {
setSnapshotVersion(other.getSnapshotVersion());
}
+ if (other.hasReadTime()) {
+ mergeReadTime(other.getReadTime());
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -1813,6 +1926,257 @@ public Builder clearSnapshotVersion() {
return this;
}
+ private com.google.protobuf.Timestamp readTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ readTimeBuilder_;
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ *
+ * @return Whether the readTime field is set.
+ */
+ public boolean hasReadTime() {
+ return readTimeBuilder_ != null || readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ *
+ * @return The readTime.
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (readTimeBuilder_ == null) {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ } else {
+ return readTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ readTime_ = value;
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (readTimeBuilder_ == null) {
+ readTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ */
+ public Builder mergeReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (readTime_ != null) {
+ readTime_ =
+ com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial();
+ } else {
+ readTime_ = value;
+ }
+ onChanged();
+ } else {
+ readTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ */
+ public Builder clearReadTime() {
+ if (readTimeBuilder_ == null) {
+ readTime_ = null;
+ onChanged();
+ } else {
+ readTime_ = null;
+ readTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ */
+ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {
+
+ onChanged();
+ return getReadTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ if (readTimeBuilder_ != null) {
+ return readTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getReadTimeFieldBuilder() {
+ if (readTimeBuilder_ == null) {
+ readTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getReadTime(), getParentForChildren(), isClean());
+ readTime_ = null;
+ }
+ return readTimeBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryResultBatchOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryResultBatchOrBuilder.java
index 835cd4cf5..f297d1da6 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryResultBatchOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryResultBatchOrBuilder.java
@@ -184,4 +184,63 @@ public interface QueryResultBatchOrBuilder
* @return The snapshotVersion.
*/
long getSnapshotVersion();
+
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ *
+ * @return Whether the readTime field is set.
+ */
+ boolean hasReadTime();
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ *
+ * @return The readTime.
+ */
+ com.google.protobuf.Timestamp getReadTime();
+ /**
+ *
+ *
+ * + * Read timestamp this batch was returned from. + * This applies to the range of results from the query's `start_cursor` (or + * the beginning of the query if no cursor was given) to this batch's + * `end_cursor` (not the query's `end_cursor`). + * In a single transaction, subsequent query result batches for the same query + * can have a greater timestamp. Each batch's read timestamp + * is valid for all preceding batches. + * This value will not be set for eventually consistent queries in Cloud + * Datastore. + *+ * + *
.google.protobuf.Timestamp read_time = 8;
+ */
+ com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder();
}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ReadOptions.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ReadOptions.java
index 9326a5043..73862ea67 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ReadOptions.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ReadOptions.java
@@ -81,6 +81,21 @@ private ReadOptions(
consistencyType_ = input.readBytes();
break;
}
+ case 34:
+ {
+ com.google.protobuf.Timestamp.Builder subBuilder = null;
+ if (consistencyTypeCase_ == 4) {
+ subBuilder = ((com.google.protobuf.Timestamp) consistencyType_).toBuilder();
+ }
+ consistencyType_ =
+ input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom((com.google.protobuf.Timestamp) consistencyType_);
+ consistencyType_ = subBuilder.buildPartial();
+ }
+ consistencyTypeCase_ = 4;
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -283,6 +298,7 @@ public enum ConsistencyTypeCase
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
READ_CONSISTENCY(1),
TRANSACTION(2),
+ READ_TIME(4),
CONSISTENCYTYPE_NOT_SET(0);
private final int value;
@@ -305,6 +321,8 @@ public static ConsistencyTypeCase forNumber(int value) {
return READ_CONSISTENCY;
case 2:
return TRANSACTION;
+ case 4:
+ return READ_TIME;
case 0:
return CONSISTENCYTYPE_NOT_SET;
default:
@@ -419,6 +437,63 @@ public com.google.protobuf.ByteString getTransaction() {
return com.google.protobuf.ByteString.EMPTY;
}
+ public static final int READ_TIME_FIELD_NUMBER = 4;
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ *
+ * @return Whether the readTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasReadTime() {
+ return consistencyTypeCase_ == 4;
+ }
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ *
+ * @return The readTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (consistencyTypeCase_ == 4) {
+ return (com.google.protobuf.Timestamp) consistencyType_;
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ if (consistencyTypeCase_ == 4) {
+ return (com.google.protobuf.Timestamp) consistencyType_;
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -439,6 +514,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (consistencyTypeCase_ == 2) {
output.writeBytes(2, (com.google.protobuf.ByteString) consistencyType_);
}
+ if (consistencyTypeCase_ == 4) {
+ output.writeMessage(4, (com.google.protobuf.Timestamp) consistencyType_);
+ }
unknownFields.writeTo(output);
}
@@ -458,6 +536,11 @@ public int getSerializedSize() {
com.google.protobuf.CodedOutputStream.computeBytesSize(
2, (com.google.protobuf.ByteString) consistencyType_);
}
+ if (consistencyTypeCase_ == 4) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 4, (com.google.protobuf.Timestamp) consistencyType_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -481,6 +564,9 @@ public boolean equals(final java.lang.Object obj) {
case 2:
if (!getTransaction().equals(other.getTransaction())) return false;
break;
+ case 4:
+ if (!getReadTime().equals(other.getReadTime())) return false;
+ break;
case 0:
default:
}
@@ -504,6 +590,10 @@ public int hashCode() {
hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;
hash = (53 * hash) + getTransaction().hashCode();
break;
+ case 4:
+ hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getReadTime().hashCode();
+ break;
case 0:
default:
}
@@ -685,6 +775,13 @@ public com.google.datastore.v1.ReadOptions buildPartial() {
if (consistencyTypeCase_ == 2) {
result.consistencyType_ = consistencyType_;
}
+ if (consistencyTypeCase_ == 4) {
+ if (readTimeBuilder_ == null) {
+ result.consistencyType_ = consistencyType_;
+ } else {
+ result.consistencyType_ = readTimeBuilder_.build();
+ }
+ }
result.consistencyTypeCase_ = consistencyTypeCase_;
onBuilt();
return result;
@@ -746,6 +843,11 @@ public Builder mergeFrom(com.google.datastore.v1.ReadOptions other) {
setTransaction(other.getTransaction());
break;
}
+ case READ_TIME:
+ {
+ mergeReadTime(other.getReadTime());
+ break;
+ }
case CONSISTENCYTYPE_NOT_SET:
{
break;
@@ -996,6 +1098,232 @@ public Builder clearTransaction() {
return this;
}
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ readTimeBuilder_;
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ *
+ * @return Whether the readTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasReadTime() {
+ return consistencyTypeCase_ == 4;
+ }
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ *
+ * @return The readTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (readTimeBuilder_ == null) {
+ if (consistencyTypeCase_ == 4) {
+ return (com.google.protobuf.Timestamp) consistencyType_;
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ } else {
+ if (consistencyTypeCase_ == 4) {
+ return readTimeBuilder_.getMessage();
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ consistencyType_ = value;
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(value);
+ }
+ consistencyTypeCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (readTimeBuilder_ == null) {
+ consistencyType_ = builderForValue.build();
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(builderForValue.build());
+ }
+ consistencyTypeCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public Builder mergeReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (consistencyTypeCase_ == 4
+ && consistencyType_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
+ consistencyType_ =
+ com.google.protobuf.Timestamp.newBuilder(
+ (com.google.protobuf.Timestamp) consistencyType_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ consistencyType_ = value;
+ }
+ onChanged();
+ } else {
+ if (consistencyTypeCase_ == 4) {
+ readTimeBuilder_.mergeFrom(value);
+ }
+ readTimeBuilder_.setMessage(value);
+ }
+ consistencyTypeCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public Builder clearReadTime() {
+ if (readTimeBuilder_ == null) {
+ if (consistencyTypeCase_ == 4) {
+ consistencyTypeCase_ = 0;
+ consistencyType_ = null;
+ onChanged();
+ }
+ } else {
+ if (consistencyTypeCase_ == 4) {
+ consistencyTypeCase_ = 0;
+ consistencyType_ = null;
+ }
+ readTimeBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {
+ return getReadTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ if ((consistencyTypeCase_ == 4) && (readTimeBuilder_ != null)) {
+ return readTimeBuilder_.getMessageOrBuilder();
+ } else {
+ if (consistencyTypeCase_ == 4) {
+ return (com.google.protobuf.Timestamp) consistencyType_;
+ }
+ return com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getReadTimeFieldBuilder() {
+ if (readTimeBuilder_ == null) {
+ if (!(consistencyTypeCase_ == 4)) {
+ consistencyType_ = com.google.protobuf.Timestamp.getDefaultInstance();
+ }
+ readTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ (com.google.protobuf.Timestamp) consistencyType_,
+ getParentForChildren(),
+ isClean());
+ consistencyType_ = null;
+ }
+ consistencyTypeCase_ = 4;
+ onChanged();
+ ;
+ return readTimeBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ReadOptionsOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ReadOptionsOrBuilder.java
index be0193329..5f3c01402 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ReadOptionsOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ReadOptionsOrBuilder.java
@@ -92,5 +92,46 @@ public interface ReadOptionsOrBuilder
*/
com.google.protobuf.ByteString getTransaction();
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ *
+ * @return Whether the readTime field is set.
+ */
+ boolean hasReadTime();
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ *
+ * @return The readTime.
+ */
+ com.google.protobuf.Timestamp getReadTime();
+ /**
+ *
+ *
+ * + * Reads entities as they were at the given time. This may not be older + * than 270 seconds. This value is only supported for Cloud Firestore in + * Datastore mode. + *+ * + *
.google.protobuf.Timestamp read_time = 4;
+ */
+ com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder();
+
public com.google.datastore.v1.ReadOptions.ConsistencyTypeCase getConsistencyTypeCase();
}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/TransactionOptions.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/TransactionOptions.java
index 90d4a0d9f..914a7c60e 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/TransactionOptions.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/TransactionOptions.java
@@ -701,7 +701,46 @@ public com.google.datastore.v1.TransactionOptions.ReadWrite getDefaultInstanceFo
public interface ReadOnlyOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.datastore.v1.TransactionOptions.ReadOnly)
- com.google.protobuf.MessageOrBuilder {}
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ *
+ * @return Whether the readTime field is set.
+ */
+ boolean hasReadTime();
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ *
+ * @return The readTime.
+ */
+ com.google.protobuf.Timestamp getReadTime();
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder();
+ }
/**
*
*
@@ -752,6 +791,21 @@ private ReadOnly(
case 0:
done = true;
break;
+ case 10:
+ {
+ com.google.protobuf.Timestamp.Builder subBuilder = null;
+ if (readTime_ != null) {
+ subBuilder = readTime_.toBuilder();
+ }
+ readTime_ =
+ input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(readTime_);
+ readTime_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -786,6 +840,55 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
com.google.datastore.v1.TransactionOptions.ReadOnly.Builder.class);
}
+ public static final int READ_TIME_FIELD_NUMBER = 1;
+ private com.google.protobuf.Timestamp readTime_;
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ *
+ * @return Whether the readTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasReadTime() {
+ return readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ *
+ * @return The readTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getReadTime() {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ return getReadTime();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -800,6 +903,9 @@ public final boolean isInitialized() {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (readTime_ != null) {
+ output.writeMessage(1, getReadTime());
+ }
unknownFields.writeTo(output);
}
@@ -809,6 +915,9 @@ public int getSerializedSize() {
if (size != -1) return size;
size = 0;
+ if (readTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getReadTime());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -825,6 +934,10 @@ public boolean equals(final java.lang.Object obj) {
com.google.datastore.v1.TransactionOptions.ReadOnly other =
(com.google.datastore.v1.TransactionOptions.ReadOnly) obj;
+ if (hasReadTime() != other.hasReadTime()) return false;
+ if (hasReadTime()) {
+ if (!getReadTime().equals(other.getReadTime())) return false;
+ }
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -836,6 +949,10 @@ public int hashCode() {
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasReadTime()) {
+ hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getReadTime().hashCode();
+ }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -984,6 +1101,12 @@ private void maybeForceBuilderInitialization() {
@java.lang.Override
public Builder clear() {
super.clear();
+ if (readTimeBuilder_ == null) {
+ readTime_ = null;
+ } else {
+ readTime_ = null;
+ readTimeBuilder_ = null;
+ }
return this;
}
@@ -1011,6 +1134,11 @@ public com.google.datastore.v1.TransactionOptions.ReadOnly build() {
public com.google.datastore.v1.TransactionOptions.ReadOnly buildPartial() {
com.google.datastore.v1.TransactionOptions.ReadOnly result =
new com.google.datastore.v1.TransactionOptions.ReadOnly(this);
+ if (readTimeBuilder_ == null) {
+ result.readTime_ = readTime_;
+ } else {
+ result.readTime_ = readTimeBuilder_.build();
+ }
onBuilt();
return result;
}
@@ -1063,6 +1191,9 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
public Builder mergeFrom(com.google.datastore.v1.TransactionOptions.ReadOnly other) {
if (other == com.google.datastore.v1.TransactionOptions.ReadOnly.getDefaultInstance())
return this;
+ if (other.hasReadTime()) {
+ mergeReadTime(other.getReadTime());
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -1093,6 +1224,194 @@ public Builder mergeFrom(
return this;
}
+ private com.google.protobuf.Timestamp readTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ readTimeBuilder_;
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ *
+ * @return Whether the readTime field is set.
+ */
+ public boolean hasReadTime() {
+ return readTimeBuilder_ != null || readTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ *
+ * @return The readTime.
+ */
+ public com.google.protobuf.Timestamp getReadTime() {
+ if (readTimeBuilder_ == null) {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ } else {
+ return readTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ readTime_ = value;
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (readTimeBuilder_ == null) {
+ readTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ readTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ public Builder mergeReadTime(com.google.protobuf.Timestamp value) {
+ if (readTimeBuilder_ == null) {
+ if (readTime_ != null) {
+ readTime_ =
+ com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial();
+ } else {
+ readTime_ = value;
+ }
+ onChanged();
+ } else {
+ readTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ public Builder clearReadTime() {
+ if (readTimeBuilder_ == null) {
+ readTime_ = null;
+ onChanged();
+ } else {
+ readTime_ = null;
+ readTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {
+
+ onChanged();
+ return getReadTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
+ if (readTimeBuilder_ != null) {
+ return readTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Reads entities at the given time. + * This may not be older than 60 seconds. + *+ * + *
.google.protobuf.Timestamp read_time = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getReadTimeFieldBuilder() {
+ if (readTimeBuilder_ == null) {
+ readTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getReadTime(), getParentForChildren(), isClean());
+ readTime_ = null;
+ }
+ return readTimeBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
diff --git a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto
index 6a29b0e98..22d930ad0 100644
--- a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto
+++ b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto
@@ -21,6 +21,7 @@ import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/datastore/v1/entity.proto";
import "google/datastore/v1/query.proto";
+import "google/protobuf/timestamp.proto";
option csharp_namespace = "Google.Cloud.Datastore.V1";
option go_package = "google.golang.org/genproto/googleapis/datastore/v1;datastore";
@@ -138,6 +139,9 @@ message LookupResponse {
// order of results in this field is undefined and has no relation to the
// order of the keys in the input.
repeated Key deferred = 3;
+
+ // The time at which these entities were read or found missing.
+ google.protobuf.Timestamp read_time = 7;
}
// The request for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
@@ -259,6 +263,9 @@ message CommitResponse {
// The number of index entries updated during the commit, or zero if none were
// updated.
int32 index_updates = 4;
+
+ // The transaction commit timestamp. Not set for non-transactional commits.
+ google.protobuf.Timestamp commit_time = 8;
}
// The request for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
@@ -332,6 +339,11 @@ message Mutation {
// to. If this does not match the current version on the server, the
// mutation conflicts.
int64 base_version = 8;
+
+ // The update time of the entity that this mutation is being applied
+ // to. If this does not match the current update time on the server, the
+ // mutation conflicts.
+ google.protobuf.Timestamp update_time = 11;
}
}
@@ -348,6 +360,12 @@ message MutationResult {
// than the version of any possible future entity.
int64 version = 4;
+ // The update time of the entity on the server after processing the mutation.
+ // If the mutation doesn't change anything on the server, then the timestamp
+ // will be the update timestamp of the current entity. This field will not be
+ // set after a 'delete'.
+ google.protobuf.Timestamp update_time = 6;
+
// Whether a conflict was detected for this mutation. Always false when a
// conflict detection strategy field is not set in the mutation.
bool conflict_detected = 5;
@@ -386,6 +404,11 @@ message ReadOptions {
// transaction identifier is returned by a call to
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
bytes transaction = 2;
+
+ // Reads entities as they were at the given time. This may not be older
+ // than 270 seconds. This value is only supported for Cloud Firestore in
+ // Datastore mode.
+ google.protobuf.Timestamp read_time = 4;
}
}
@@ -403,7 +426,9 @@ message TransactionOptions {
// Options specific to read-only transactions.
message ReadOnly {
-
+ // Reads entities at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 1;
}
// The `mode` of the transaction, indicating whether write operations are
diff --git a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query.proto b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query.proto
index 3e6461839..00c020021 100644
--- a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query.proto
+++ b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query.proto
@@ -17,6 +17,7 @@ syntax = "proto3";
package google.datastore.v1;
import "google/datastore/v1/entity.proto";
+import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
option csharp_namespace = "Google.Cloud.Datastore.V1";
@@ -62,6 +63,12 @@ message EntityResult {
// is always set except for eventually consistent reads.
int64 version = 4;
+ // The time at which the entity was last changed.
+ // This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity
+ // results.
+ // If this entity is missing, this field will not be set.
+ google.protobuf.Timestamp update_time = 5;
+
// A cursor that points to the position after the result entity.
// Set only when the `EntityResult` is part of a `QueryResultBatch` message.
bytes cursor = 3;
@@ -353,4 +360,16 @@ message QueryResultBatch {
// is valid for all preceding batches.
// The value will be zero for eventually consistent queries.
int64 snapshot_version = 7;
+
+ // Read timestamp this batch was returned from.
+ // This applies to the range of results from the query's `start_cursor` (or
+ // the beginning of the query if no cursor was given) to this batch's
+ // `end_cursor` (not the query's `end_cursor`).
+ //
+ // In a single transaction, subsequent query result batches for the same query
+ // can have a greater timestamp. Each batch's read timestamp
+ // is valid for all preceding batches.
+ // This value will not be set for eventually consistent queries in Cloud
+ // Datastore.
+ google.protobuf.Timestamp read_time = 8;
}