Skip to content

Commit

Permalink
feat: expose new read_time API fields, currently only available in pr…
Browse files Browse the repository at this point in the history
…ivate preview (#706)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 440914241

Source-Link: googleapis/googleapis@0ed730f

Source-Link: googleapis/googleapis-gen@b2e5ae9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJlNWFlOTdmZDI0ZjY0YWYwZmVmMTk5OWRhZDE0OTQ1ZmRjMzY2MyJ9
  • Loading branch information
gcf-owl-bot[bot] committed Apr 13, 2022
1 parent a8f46a9 commit e11bd20
Show file tree
Hide file tree
Showing 20 changed files with 3,018 additions and 149 deletions.
12 changes: 11 additions & 1 deletion proto-google-cloud-datastore-v1/clirr-ignored-differences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,14 @@
<className>com/google/datastore/v1/*OrBuilder</className>
<method>* has*(*)</method>
</difference>
</differences>
<difference>
<differenceType>7012</differenceType>
<className>com/google/datastore/v1/*OrBuilder</className>
<method>* get*(*)</method>
</difference>
<difference>
<differenceType>7012</differenceType>
<className>com/google/datastore/v1/*OrBuilder</className>
<method>boolean contains*(*)</method>
</difference>
</differences>
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,21 @@ private CommitResponse(
case 32:
{
indexUpdates_ = input.readInt32();
break;
}
case 66:
{
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (commitTime_ != null) {
subBuilder = commitTime_.toBuilder();
}
commitTime_ =
input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(commitTime_);
commitTime_ = subBuilder.buildPartial();
}

break;
}
default:
Expand Down Expand Up @@ -218,6 +233,52 @@ public int getIndexUpdates() {
return indexUpdates_;
}

public static final int COMMIT_TIME_FIELD_NUMBER = 8;
private com.google.protobuf.Timestamp commitTime_;
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*
* @return Whether the commitTime field is set.
*/
@java.lang.Override
public boolean hasCommitTime() {
return commitTime_ != null;
}
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*
* @return The commitTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCommitTime() {
return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_;
}
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() {
return getCommitTime();
}

private byte memoizedIsInitialized = -1;

@java.lang.Override
Expand All @@ -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);
}

Expand All @@ -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;
Expand All @@ -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;
}
Expand All @@ -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;
Expand Down Expand Up @@ -442,6 +517,12 @@ public Builder clear() {
}
indexUpdates_ = 0;

if (commitTimeBuilder_ == null) {
commitTime_ = null;
} else {
commitTime_ = null;
commitTimeBuilder_ = null;
}
return this;
}

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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_;
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*
* @return Whether the commitTime field is set.
*/
public boolean hasCommitTime() {
return commitTimeBuilder_ != null || commitTime_ != null;
}
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*
* @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();
}
}
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*/
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;
}
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*/
public Builder setCommitTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (commitTimeBuilder_ == null) {
commitTime_ = builderForValue.build();
onChanged();
} else {
commitTimeBuilder_.setMessage(builderForValue.build());
}

return this;
}
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*/
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;
}
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*/
public Builder clearCommitTime() {
if (commitTimeBuilder_ == null) {
commitTime_ = null;
onChanged();
} else {
commitTime_ = null;
commitTimeBuilder_ = null;
}

return this;
}
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*/
public com.google.protobuf.Timestamp.Builder getCommitTimeBuilder() {

onChanged();
return getCommitTimeFieldBuilder().getBuilder();
}
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*/
public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() {
if (commitTimeBuilder_ != null) {
return commitTimeBuilder_.getMessageOrBuilder();
} else {
return commitTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: commitTime_;
}
}
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*/
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,39 @@ public interface CommitResponseOrBuilder
* @return The indexUpdates.
*/
int getIndexUpdates();

/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*
* @return Whether the commitTime field is set.
*/
boolean hasCommitTime();
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*
* @return The commitTime.
*/
com.google.protobuf.Timestamp getCommitTime();
/**
*
*
* <pre>
* The transaction commit timestamp. Not set for non-transactional commits.
* </pre>
*
* <code>.google.protobuf.Timestamp commit_time = 8;</code>
*/
com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder();
}

0 comments on commit e11bd20

Please sign in to comment.