diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java index 46b124968c..2c430faaad 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java @@ -724,6 +724,11 @@ public final UnaryCallable beginTransactio * reasons. If `Commit` returns `ABORTED`, the caller should re-attempt the transaction from the * beginning, re-using the same session. * + *

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, for example, if + * the client job experiences a 1+ hour networking failure. At that point, Cloud Spanner has lost + * track of the transaction outcome and we recommend that you perform another read from the + * database to see the state of things as they are now. + * * @param session Required. The session in which the transaction to be committed is running. * @param transactionId Commit a previously-started transaction. * @param mutations The mutations to be executed when this transaction commits. All mutations are @@ -751,6 +756,11 @@ public final CommitResponse commit( * reasons. If `Commit` returns `ABORTED`, the caller should re-attempt the transaction from the * beginning, re-using the same session. * + *

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, for example, if + * the client job experiences a 1+ hour networking failure. At that point, Cloud Spanner has lost + * track of the transaction outcome and we recommend that you perform another read from the + * database to see the state of things as they are now. + * * @param session Required. The session in which the transaction to be committed is running. * @param singleUseTransaction Execute mutations in a temporary transaction. Note that unlike * commit of a previously-started transaction, commit with a temporary transaction is @@ -784,6 +794,11 @@ public final CommitResponse commit( * reasons. If `Commit` returns `ABORTED`, the caller should re-attempt the transaction from the * beginning, re-using the same session. * + *

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, for example, if + * the client job experiences a 1+ hour networking failure. At that point, Cloud Spanner has lost + * track of the transaction outcome and we recommend that you perform another read from the + * database to see the state of things as they are now. + * * @param session Required. The session in which the transaction to be committed is running. * @param transactionId Commit a previously-started transaction. * @param mutations The mutations to be executed when this transaction commits. All mutations are @@ -811,6 +826,11 @@ public final CommitResponse commit( * reasons. If `Commit` returns `ABORTED`, the caller should re-attempt the transaction from the * beginning, re-using the same session. * + *

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, for example, if + * the client job experiences a 1+ hour networking failure. At that point, Cloud Spanner has lost + * track of the transaction outcome and we recommend that you perform another read from the + * database to see the state of things as they are now. + * * @param session Required. The session in which the transaction to be committed is running. * @param singleUseTransaction Execute mutations in a temporary transaction. Note that unlike * commit of a previously-started transaction, commit with a temporary transaction is @@ -844,6 +864,11 @@ public final CommitResponse commit( * reasons. If `Commit` returns `ABORTED`, the caller should re-attempt the transaction from the * beginning, re-using the same session. * + *

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, for example, if + * the client job experiences a 1+ hour networking failure. At that point, Cloud Spanner has lost + * track of the transaction outcome and we recommend that you perform another read from the + * database to see the state of things as they are now. + * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -861,6 +886,11 @@ public final CommitResponse commit(CommitRequest request) { * reasons. If `Commit` returns `ABORTED`, the caller should re-attempt the transaction from the * beginning, re-using the same session. * + *

On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, for example, if + * the client job experiences a 1+ hour networking failure. At that point, Cloud Spanner has lost + * track of the transaction outcome and we recommend that you perform another read from the + * database to see the state of things as they are now. + * *

Sample code: */ public final UnaryCallable commitCallable() { diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java index a31cc5f2a1..0ee0e706d1 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java @@ -954,7 +954,10 @@ public void beginTransactionExceptionTest2() throws Exception { @Test public void commitTest() throws Exception { CommitResponse expectedResponse = - CommitResponse.newBuilder().setCommitTimestamp(Timestamp.newBuilder().build()).build(); + CommitResponse.newBuilder() + .setCommitTimestamp(Timestamp.newBuilder().build()) + .setCommitStats(CommitResponse.CommitStats.newBuilder().build()) + .build(); mockSpanner.addResponse(expectedResponse); SessionName session = SessionName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); @@ -996,7 +999,10 @@ public void commitExceptionTest() throws Exception { @Test public void commitTest2() throws Exception { CommitResponse expectedResponse = - CommitResponse.newBuilder().setCommitTimestamp(Timestamp.newBuilder().build()).build(); + CommitResponse.newBuilder() + .setCommitTimestamp(Timestamp.newBuilder().build()) + .setCommitStats(CommitResponse.CommitStats.newBuilder().build()) + .build(); mockSpanner.addResponse(expectedResponse); SessionName session = SessionName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]"); @@ -1038,7 +1044,10 @@ public void commitExceptionTest2() throws Exception { @Test public void commitTest3() throws Exception { CommitResponse expectedResponse = - CommitResponse.newBuilder().setCommitTimestamp(Timestamp.newBuilder().build()).build(); + CommitResponse.newBuilder() + .setCommitTimestamp(Timestamp.newBuilder().build()) + .setCommitStats(CommitResponse.CommitStats.newBuilder().build()) + .build(); mockSpanner.addResponse(expectedResponse); String session = "session1984987798"; @@ -1080,7 +1089,10 @@ public void commitExceptionTest3() throws Exception { @Test public void commitTest4() throws Exception { CommitResponse expectedResponse = - CommitResponse.newBuilder().setCommitTimestamp(Timestamp.newBuilder().build()).build(); + CommitResponse.newBuilder() + .setCommitTimestamp(Timestamp.newBuilder().build()) + .setCommitStats(CommitResponse.CommitStats.newBuilder().build()) + .build(); mockSpanner.addResponse(expectedResponse); String session = "session1984987798"; diff --git a/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java b/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java index 2ea1647918..52e4daaaf1 100644 --- a/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java +++ b/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java @@ -924,6 +924,11 @@ public void beginTransaction( * transactions. However, it can also happen for a variety of other * reasons. If `Commit` returns `ABORTED`, the caller should re-attempt * the transaction from the beginning, re-using the same session. + * On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, + * for example, if the client job experiences a 1+ hour networking failure. + * At that point, Cloud Spanner has lost track of the transaction outcome and + * we recommend that you perform another read from the database to see the + * state of things as they are now. * */ public void commit( @@ -1357,6 +1362,11 @@ public void beginTransaction( * transactions. However, it can also happen for a variety of other * reasons. If `Commit` returns `ABORTED`, the caller should re-attempt * the transaction from the beginning, re-using the same session. + * On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, + * for example, if the client job experiences a 1+ hour networking failure. + * At that point, Cloud Spanner has lost track of the transaction outcome and + * we recommend that you perform another read from the database to see the + * state of things as they are now. * */ public void commit( @@ -1663,6 +1673,11 @@ public com.google.spanner.v1.Transaction beginTransaction( * transactions. However, it can also happen for a variety of other * reasons. If `Commit` returns `ABORTED`, the caller should re-attempt * the transaction from the beginning, re-using the same session. + * On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, + * for example, if the client job experiences a 1+ hour networking failure. + * At that point, Cloud Spanner has lost track of the transaction outcome and + * we recommend that you perform another read from the database to see the + * state of things as they are now. * */ public com.google.spanner.v1.CommitResponse commit( @@ -1932,6 +1947,11 @@ public com.google.common.util.concurrent.ListenableFuture */ public com.google.common.util.concurrent.ListenableFuture diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java index f322ec04c0..1ba7b235bb 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java @@ -111,6 +111,11 @@ private CommitRequest( input.readMessage(com.google.spanner.v1.Mutation.parser(), extensionRegistry)); break; } + case 40: + { + returnCommitStats_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -422,6 +427,26 @@ public com.google.spanner.v1.MutationOrBuilder getMutationsOrBuilder(int index) return mutations_.get(index); } + public static final int RETURN_COMMIT_STATS_FIELD_NUMBER = 5; + private boolean returnCommitStats_; + /** + * + * + *

+   * If `true`, then statistics related to the transaction will be included in
+   * the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is
+   * `false`.
+   * 
+ * + * bool return_commit_stats = 5; + * + * @return The returnCommitStats. + */ + @java.lang.Override + public boolean getReturnCommitStats() { + return returnCommitStats_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -448,6 +473,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < mutations_.size(); i++) { output.writeMessage(4, mutations_.get(i)); } + if (returnCommitStats_ != false) { + output.writeBool(5, returnCommitStats_); + } unknownFields.writeTo(output); } @@ -473,6 +501,9 @@ public int getSerializedSize() { for (int i = 0; i < mutations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, mutations_.get(i)); } + if (returnCommitStats_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, returnCommitStats_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -490,6 +521,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSession().equals(other.getSession())) return false; if (!getMutationsList().equals(other.getMutationsList())) return false; + if (getReturnCommitStats() != other.getReturnCommitStats()) return false; if (!getTransactionCase().equals(other.getTransactionCase())) return false; switch (transactionCase_) { case 2: @@ -518,6 +550,8 @@ public int hashCode() { hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getMutationsList().hashCode(); } + hash = (37 * hash) + RETURN_COMMIT_STATS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnCommitStats()); switch (transactionCase_) { case 2: hash = (37 * hash) + TRANSACTION_ID_FIELD_NUMBER; @@ -684,6 +718,8 @@ public Builder clear() { } else { mutationsBuilder_.clear(); } + returnCommitStats_ = false; + transactionCase_ = 0; transaction_ = null; return this; @@ -733,6 +769,7 @@ public com.google.spanner.v1.CommitRequest buildPartial() { } else { result.mutations_ = mutationsBuilder_.build(); } + result.returnCommitStats_ = returnCommitStats_; result.transactionCase_ = transactionCase_; onBuilt(); return result; @@ -814,6 +851,9 @@ public Builder mergeFrom(com.google.spanner.v1.CommitRequest other) { } } } + if (other.getReturnCommitStats() != false) { + setReturnCommitStats(other.getReturnCommitStats()); + } switch (other.getTransactionCase()) { case TRANSACTION_ID: { @@ -1712,6 +1752,64 @@ public java.util.List getMutationsBuilde return mutationsBuilder_; } + private boolean returnCommitStats_; + /** + * + * + *
+     * If `true`, then statistics related to the transaction will be included in
+     * the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is
+     * `false`.
+     * 
+ * + * bool return_commit_stats = 5; + * + * @return The returnCommitStats. + */ + @java.lang.Override + public boolean getReturnCommitStats() { + return returnCommitStats_; + } + /** + * + * + *
+     * If `true`, then statistics related to the transaction will be included in
+     * the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is
+     * `false`.
+     * 
+ * + * bool return_commit_stats = 5; + * + * @param value The returnCommitStats to set. + * @return This builder for chaining. + */ + public Builder setReturnCommitStats(boolean value) { + + returnCommitStats_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If `true`, then statistics related to the transaction will be included in
+     * the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is
+     * `false`.
+     * 
+ * + * bool return_commit_stats = 5; + * + * @return This builder for chaining. + */ + public Builder clearReturnCommitStats() { + + returnCommitStats_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java index bb0f6c6acd..a32fa4b439 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java @@ -185,5 +185,20 @@ public interface CommitRequestOrBuilder */ com.google.spanner.v1.MutationOrBuilder getMutationsOrBuilder(int index); + /** + * + * + *
+   * If `true`, then statistics related to the transaction will be included in
+   * the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is
+   * `false`.
+   * 
+ * + * bool return_commit_stats = 5; + * + * @return The returnCommitStats. + */ + boolean getReturnCommitStats(); + public com.google.spanner.v1.CommitRequest.TransactionCase getTransactionCase(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponse.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponse.java index 2877285845..320d165cf9 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponse.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponse.java @@ -81,6 +81,22 @@ private CommitResponse( commitTimestamp_ = subBuilder.buildPartial(); } + break; + } + case 18: + { + com.google.spanner.v1.CommitResponse.CommitStats.Builder subBuilder = null; + if (commitStats_ != null) { + subBuilder = commitStats_.toBuilder(); + } + commitStats_ = + input.readMessage( + com.google.spanner.v1.CommitResponse.CommitStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(commitStats_); + commitStats_ = subBuilder.buildPartial(); + } + break; } default: @@ -117,6 +133,586 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.spanner.v1.CommitResponse.Builder.class); } + public interface CommitStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.CommitResponse.CommitStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The total number of mutations for the transaction. Knowing the
+     * `mutation_count` value can help you maximize the number of mutations
+     * in a transaction and minimize the number of API round trips. You can
+     * also monitor this value to prevent transactions from exceeding the system
+     * [limit](http://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
+     * If the number of mutations exceeds the limit, the server returns
+     * [INVALID_ARGUMENT](http://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
+     * 
+ * + * int64 mutation_count = 1; + * + * @return The mutationCount. + */ + long getMutationCount(); + } + /** + * + * + *
+   * Additional statistics about a commit.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.CommitResponse.CommitStats} + */ + public static final class CommitStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.CommitResponse.CommitStats) + CommitStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CommitStats.newBuilder() to construct. + private CommitStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CommitStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CommitStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CommitStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mutationCount_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_CommitResponse_CommitStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_CommitResponse_CommitStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.CommitResponse.CommitStats.class, + com.google.spanner.v1.CommitResponse.CommitStats.Builder.class); + } + + public static final int MUTATION_COUNT_FIELD_NUMBER = 1; + private long mutationCount_; + /** + * + * + *
+     * The total number of mutations for the transaction. Knowing the
+     * `mutation_count` value can help you maximize the number of mutations
+     * in a transaction and minimize the number of API round trips. You can
+     * also monitor this value to prevent transactions from exceeding the system
+     * [limit](http://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
+     * If the number of mutations exceeds the limit, the server returns
+     * [INVALID_ARGUMENT](http://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
+     * 
+ * + * int64 mutation_count = 1; + * + * @return The mutationCount. + */ + @java.lang.Override + public long getMutationCount() { + return mutationCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (mutationCount_ != 0L) { + output.writeInt64(1, mutationCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mutationCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, mutationCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.CommitResponse.CommitStats)) { + return super.equals(obj); + } + com.google.spanner.v1.CommitResponse.CommitStats other = + (com.google.spanner.v1.CommitResponse.CommitStats) obj; + + if (getMutationCount() != other.getMutationCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MUTATION_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMutationCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.CommitResponse.CommitStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.CommitResponse.CommitStats parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.CommitResponse.CommitStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Additional statistics about a commit.
+     * 
+ * + * Protobuf type {@code google.spanner.v1.CommitResponse.CommitStats} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.CommitResponse.CommitStats) + com.google.spanner.v1.CommitResponse.CommitStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_CommitResponse_CommitStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_CommitResponse_CommitStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.CommitResponse.CommitStats.class, + com.google.spanner.v1.CommitResponse.CommitStats.Builder.class); + } + + // Construct using com.google.spanner.v1.CommitResponse.CommitStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + mutationCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_CommitResponse_CommitStats_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.CommitResponse.CommitStats getDefaultInstanceForType() { + return com.google.spanner.v1.CommitResponse.CommitStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.CommitResponse.CommitStats build() { + com.google.spanner.v1.CommitResponse.CommitStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.CommitResponse.CommitStats buildPartial() { + com.google.spanner.v1.CommitResponse.CommitStats result = + new com.google.spanner.v1.CommitResponse.CommitStats(this); + result.mutationCount_ = mutationCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.CommitResponse.CommitStats) { + return mergeFrom((com.google.spanner.v1.CommitResponse.CommitStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.CommitResponse.CommitStats other) { + if (other == com.google.spanner.v1.CommitResponse.CommitStats.getDefaultInstance()) + return this; + if (other.getMutationCount() != 0L) { + setMutationCount(other.getMutationCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.spanner.v1.CommitResponse.CommitStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.spanner.v1.CommitResponse.CommitStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long mutationCount_; + /** + * + * + *
+       * The total number of mutations for the transaction. Knowing the
+       * `mutation_count` value can help you maximize the number of mutations
+       * in a transaction and minimize the number of API round trips. You can
+       * also monitor this value to prevent transactions from exceeding the system
+       * [limit](http://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
+       * If the number of mutations exceeds the limit, the server returns
+       * [INVALID_ARGUMENT](http://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
+       * 
+ * + * int64 mutation_count = 1; + * + * @return The mutationCount. + */ + @java.lang.Override + public long getMutationCount() { + return mutationCount_; + } + /** + * + * + *
+       * The total number of mutations for the transaction. Knowing the
+       * `mutation_count` value can help you maximize the number of mutations
+       * in a transaction and minimize the number of API round trips. You can
+       * also monitor this value to prevent transactions from exceeding the system
+       * [limit](http://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
+       * If the number of mutations exceeds the limit, the server returns
+       * [INVALID_ARGUMENT](http://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
+       * 
+ * + * int64 mutation_count = 1; + * + * @param value The mutationCount to set. + * @return This builder for chaining. + */ + public Builder setMutationCount(long value) { + + mutationCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The total number of mutations for the transaction. Knowing the
+       * `mutation_count` value can help you maximize the number of mutations
+       * in a transaction and minimize the number of API round trips. You can
+       * also monitor this value to prevent transactions from exceeding the system
+       * [limit](http://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
+       * If the number of mutations exceeds the limit, the server returns
+       * [INVALID_ARGUMENT](http://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
+       * 
+ * + * int64 mutation_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearMutationCount() { + + mutationCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.CommitResponse.CommitStats) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.CommitResponse.CommitStats) + private static final com.google.spanner.v1.CommitResponse.CommitStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.CommitResponse.CommitStats(); + } + + public static com.google.spanner.v1.CommitResponse.CommitStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CommitStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CommitStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.CommitResponse.CommitStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public static final int COMMIT_TIMESTAMP_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp commitTimestamp_; /** @@ -165,6 +761,60 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { return getCommitTimestamp(); } + public static final int COMMIT_STATS_FIELD_NUMBER = 2; + private com.google.spanner.v1.CommitResponse.CommitStats commitStats_; + /** + * + * + *
+   * The statistics about this Commit. Not returned by default.
+   * For more information, see
+   * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+   * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + * + * @return Whether the commitStats field is set. + */ + @java.lang.Override + public boolean hasCommitStats() { + return commitStats_ != null; + } + /** + * + * + *
+   * The statistics about this Commit. Not returned by default.
+   * For more information, see
+   * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+   * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + * + * @return The commitStats. + */ + @java.lang.Override + public com.google.spanner.v1.CommitResponse.CommitStats getCommitStats() { + return commitStats_ == null + ? com.google.spanner.v1.CommitResponse.CommitStats.getDefaultInstance() + : commitStats_; + } + /** + * + * + *
+   * The statistics about this Commit. Not returned by default.
+   * For more information, see
+   * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+   * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + */ + @java.lang.Override + public com.google.spanner.v1.CommitResponse.CommitStatsOrBuilder getCommitStatsOrBuilder() { + return getCommitStats(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -182,6 +832,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (commitTimestamp_ != null) { output.writeMessage(1, getCommitTimestamp()); } + if (commitStats_ != null) { + output.writeMessage(2, getCommitStats()); + } unknownFields.writeTo(output); } @@ -194,6 +847,9 @@ public int getSerializedSize() { if (commitTimestamp_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommitTimestamp()); } + if (commitStats_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCommitStats()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -213,6 +869,10 @@ public boolean equals(final java.lang.Object obj) { if (hasCommitTimestamp()) { if (!getCommitTimestamp().equals(other.getCommitTimestamp())) return false; } + if (hasCommitStats() != other.hasCommitStats()) return false; + if (hasCommitStats()) { + if (!getCommitStats().equals(other.getCommitStats())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -228,6 +888,10 @@ public int hashCode() { hash = (37 * hash) + COMMIT_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + getCommitTimestamp().hashCode(); } + if (hasCommitStats()) { + hash = (37 * hash) + COMMIT_STATS_FIELD_NUMBER; + hash = (53 * hash) + getCommitStats().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -378,6 +1042,12 @@ public Builder clear() { commitTimestamp_ = null; commitTimestampBuilder_ = null; } + if (commitStatsBuilder_ == null) { + commitStats_ = null; + } else { + commitStats_ = null; + commitStatsBuilder_ = null; + } return this; } @@ -409,6 +1079,11 @@ public com.google.spanner.v1.CommitResponse buildPartial() { } else { result.commitTimestamp_ = commitTimestampBuilder_.build(); } + if (commitStatsBuilder_ == null) { + result.commitStats_ = commitStats_; + } else { + result.commitStats_ = commitStatsBuilder_.build(); + } onBuilt(); return result; } @@ -461,6 +1136,9 @@ public Builder mergeFrom(com.google.spanner.v1.CommitResponse other) { if (other.hasCommitTimestamp()) { mergeCommitTimestamp(other.getCommitTimestamp()); } + if (other.hasCommitStats()) { + mergeCommitStats(other.getCommitStats()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -675,6 +1353,210 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { return commitTimestampBuilder_; } + private com.google.spanner.v1.CommitResponse.CommitStats commitStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.CommitResponse.CommitStats, + com.google.spanner.v1.CommitResponse.CommitStats.Builder, + com.google.spanner.v1.CommitResponse.CommitStatsOrBuilder> + commitStatsBuilder_; + /** + * + * + *
+     * The statistics about this Commit. Not returned by default.
+     * For more information, see
+     * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+     * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + * + * @return Whether the commitStats field is set. + */ + public boolean hasCommitStats() { + return commitStatsBuilder_ != null || commitStats_ != null; + } + /** + * + * + *
+     * The statistics about this Commit. Not returned by default.
+     * For more information, see
+     * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+     * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + * + * @return The commitStats. + */ + public com.google.spanner.v1.CommitResponse.CommitStats getCommitStats() { + if (commitStatsBuilder_ == null) { + return commitStats_ == null + ? com.google.spanner.v1.CommitResponse.CommitStats.getDefaultInstance() + : commitStats_; + } else { + return commitStatsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The statistics about this Commit. Not returned by default.
+     * For more information, see
+     * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+     * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + */ + public Builder setCommitStats(com.google.spanner.v1.CommitResponse.CommitStats value) { + if (commitStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commitStats_ = value; + onChanged(); + } else { + commitStatsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The statistics about this Commit. Not returned by default.
+     * For more information, see
+     * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+     * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + */ + public Builder setCommitStats( + com.google.spanner.v1.CommitResponse.CommitStats.Builder builderForValue) { + if (commitStatsBuilder_ == null) { + commitStats_ = builderForValue.build(); + onChanged(); + } else { + commitStatsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The statistics about this Commit. Not returned by default.
+     * For more information, see
+     * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+     * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + */ + public Builder mergeCommitStats(com.google.spanner.v1.CommitResponse.CommitStats value) { + if (commitStatsBuilder_ == null) { + if (commitStats_ != null) { + commitStats_ = + com.google.spanner.v1.CommitResponse.CommitStats.newBuilder(commitStats_) + .mergeFrom(value) + .buildPartial(); + } else { + commitStats_ = value; + } + onChanged(); + } else { + commitStatsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The statistics about this Commit. Not returned by default.
+     * For more information, see
+     * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+     * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + */ + public Builder clearCommitStats() { + if (commitStatsBuilder_ == null) { + commitStats_ = null; + onChanged(); + } else { + commitStats_ = null; + commitStatsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The statistics about this Commit. Not returned by default.
+     * For more information, see
+     * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+     * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + */ + public com.google.spanner.v1.CommitResponse.CommitStats.Builder getCommitStatsBuilder() { + + onChanged(); + return getCommitStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The statistics about this Commit. Not returned by default.
+     * For more information, see
+     * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+     * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + */ + public com.google.spanner.v1.CommitResponse.CommitStatsOrBuilder getCommitStatsOrBuilder() { + if (commitStatsBuilder_ != null) { + return commitStatsBuilder_.getMessageOrBuilder(); + } else { + return commitStats_ == null + ? com.google.spanner.v1.CommitResponse.CommitStats.getDefaultInstance() + : commitStats_; + } + } + /** + * + * + *
+     * The statistics about this Commit. Not returned by default.
+     * For more information, see
+     * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+     * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.CommitResponse.CommitStats, + com.google.spanner.v1.CommitResponse.CommitStats.Builder, + com.google.spanner.v1.CommitResponse.CommitStatsOrBuilder> + getCommitStatsFieldBuilder() { + if (commitStatsBuilder_ == null) { + commitStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.CommitResponse.CommitStats, + com.google.spanner.v1.CommitResponse.CommitStats.Builder, + com.google.spanner.v1.CommitResponse.CommitStatsOrBuilder>( + getCommitStats(), getParentForChildren(), isClean()); + commitStats_ = null; + } + return commitStatsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseOrBuilder.java index 90c6c6e672..9ff076ff84 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseOrBuilder.java @@ -57,4 +57,45 @@ public interface CommitResponseOrBuilder * .google.protobuf.Timestamp commit_timestamp = 1; */ com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder(); + + /** + * + * + *
+   * The statistics about this Commit. Not returned by default.
+   * For more information, see
+   * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+   * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + * + * @return Whether the commitStats field is set. + */ + boolean hasCommitStats(); + /** + * + * + *
+   * The statistics about this Commit. Not returned by default.
+   * For more information, see
+   * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+   * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + * + * @return The commitStats. + */ + com.google.spanner.v1.CommitResponse.CommitStats getCommitStats(); + /** + * + * + *
+   * The statistics about this Commit. Not returned by default.
+   * For more information, see
+   * [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+   * 
+ * + * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; + */ + com.google.spanner.v1.CommitResponse.CommitStatsOrBuilder getCommitStatsOrBuilder(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java index 1e757805fd..79a7ad822b 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java @@ -402,6 +402,9 @@ public interface QueryOptionsOrBuilder * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement * with an invalid optimizer version will fail with a syntax error * (`INVALID_ARGUMENT`) status. + * See + * https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer + * for more information on managing the query optimizer. * The `optimizer_version` statement hint has precedence over this setting. * * @@ -426,6 +429,9 @@ public interface QueryOptionsOrBuilder * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement * with an invalid optimizer version will fail with a syntax error * (`INVALID_ARGUMENT`) status. + * See + * https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer + * for more information on managing the query optimizer. * The `optimizer_version` statement hint has precedence over this setting. * * @@ -546,6 +552,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement * with an invalid optimizer version will fail with a syntax error * (`INVALID_ARGUMENT`) status. + * See + * https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer + * for more information on managing the query optimizer. * The `optimizer_version` statement hint has precedence over this setting. * * @@ -581,6 +590,9 @@ public java.lang.String getOptimizerVersion() { * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement * with an invalid optimizer version will fail with a syntax error * (`INVALID_ARGUMENT`) status. + * See + * https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer + * for more information on managing the query optimizer. * The `optimizer_version` statement hint has precedence over this setting. * * @@ -941,6 +953,9 @@ public Builder mergeFrom( * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement * with an invalid optimizer version will fail with a syntax error * (`INVALID_ARGUMENT`) status. + * See + * https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer + * for more information on managing the query optimizer. * The `optimizer_version` statement hint has precedence over this setting. * * @@ -975,6 +990,9 @@ public java.lang.String getOptimizerVersion() { * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement * with an invalid optimizer version will fail with a syntax error * (`INVALID_ARGUMENT`) status. + * See + * https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer + * for more information on managing the query optimizer. * The `optimizer_version` statement hint has precedence over this setting. * * @@ -1009,6 +1027,9 @@ public com.google.protobuf.ByteString getOptimizerVersionBytes() { * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement * with an invalid optimizer version will fail with a syntax error * (`INVALID_ARGUMENT`) status. + * See + * https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer + * for more information on managing the query optimizer. * The `optimizer_version` statement hint has precedence over this setting. * * @@ -1042,6 +1063,9 @@ public Builder setOptimizerVersion(java.lang.String value) { * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement * with an invalid optimizer version will fail with a syntax error * (`INVALID_ARGUMENT`) status. + * See + * https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer + * for more information on managing the query optimizer. * The `optimizer_version` statement hint has precedence over this setting. * * @@ -1071,6 +1095,9 @@ public Builder clearOptimizerVersion() { * SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement * with an invalid optimizer version will fail with a syntax error * (`INVALID_ARGUMENT`) status. + * See + * https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer + * for more information on managing the query optimizer. * The `optimizer_version` statement hint has precedence over this setting. * * @@ -1318,8 +1345,9 @@ public com.google.protobuf.ByteString getSqlBytes() { *
    * Parameter names and values that bind to placeholders in the SQL string.
    * A parameter placeholder consists of the `@` character followed by the
-   * parameter name (for example, `@firstName`). Parameter names can contain
-   * letters, numbers, and underscores.
+   * parameter name (for example, `@firstName`). Parameter names must conform
+   * to the naming requirements of identifiers as specified at
+   * https://cloud.google.com/spanner/docs/lexical#identifiers.
    * Parameters can appear anywhere that a literal value is expected.  The same
    * parameter name can be used more than once, for example:
    * `"WHERE id > @msg_id AND id < @msg_id + 100"`
@@ -1340,8 +1368,9 @@ public boolean hasParams() {
    * 
    * Parameter names and values that bind to placeholders in the SQL string.
    * A parameter placeholder consists of the `@` character followed by the
-   * parameter name (for example, `@firstName`). Parameter names can contain
-   * letters, numbers, and underscores.
+   * parameter name (for example, `@firstName`). Parameter names must conform
+   * to the naming requirements of identifiers as specified at
+   * https://cloud.google.com/spanner/docs/lexical#identifiers.
    * Parameters can appear anywhere that a literal value is expected.  The same
    * parameter name can be used more than once, for example:
    * `"WHERE id > @msg_id AND id < @msg_id + 100"`
@@ -1362,8 +1391,9 @@ public com.google.protobuf.Struct getParams() {
    * 
    * Parameter names and values that bind to placeholders in the SQL string.
    * A parameter placeholder consists of the `@` character followed by the
-   * parameter name (for example, `@firstName`). Parameter names can contain
-   * letters, numbers, and underscores.
+   * parameter name (for example, `@firstName`). Parameter names must conform
+   * to the naming requirements of identifiers as specified at
+   * https://cloud.google.com/spanner/docs/lexical#identifiers.
    * Parameters can appear anywhere that a literal value is expected.  The same
    * parameter name can be used more than once, for example:
    * `"WHERE id > @msg_id AND id < @msg_id + 100"`
@@ -2656,8 +2686,9 @@ public Builder setSqlBytes(com.google.protobuf.ByteString value) {
      * 
      * Parameter names and values that bind to placeholders in the SQL string.
      * A parameter placeholder consists of the `@` character followed by the
-     * parameter name (for example, `@firstName`). Parameter names can contain
-     * letters, numbers, and underscores.
+     * parameter name (for example, `@firstName`). Parameter names must conform
+     * to the naming requirements of identifiers as specified at
+     * https://cloud.google.com/spanner/docs/lexical#identifiers.
      * Parameters can appear anywhere that a literal value is expected.  The same
      * parameter name can be used more than once, for example:
      * `"WHERE id > @msg_id AND id < @msg_id + 100"`
@@ -2677,8 +2708,9 @@ public boolean hasParams() {
      * 
      * Parameter names and values that bind to placeholders in the SQL string.
      * A parameter placeholder consists of the `@` character followed by the
-     * parameter name (for example, `@firstName`). Parameter names can contain
-     * letters, numbers, and underscores.
+     * parameter name (for example, `@firstName`). Parameter names must conform
+     * to the naming requirements of identifiers as specified at
+     * https://cloud.google.com/spanner/docs/lexical#identifiers.
      * Parameters can appear anywhere that a literal value is expected.  The same
      * parameter name can be used more than once, for example:
      * `"WHERE id > @msg_id AND id < @msg_id + 100"`
@@ -2702,8 +2734,9 @@ public com.google.protobuf.Struct getParams() {
      * 
      * Parameter names and values that bind to placeholders in the SQL string.
      * A parameter placeholder consists of the `@` character followed by the
-     * parameter name (for example, `@firstName`). Parameter names can contain
-     * letters, numbers, and underscores.
+     * parameter name (for example, `@firstName`). Parameter names must conform
+     * to the naming requirements of identifiers as specified at
+     * https://cloud.google.com/spanner/docs/lexical#identifiers.
      * Parameters can appear anywhere that a literal value is expected.  The same
      * parameter name can be used more than once, for example:
      * `"WHERE id > @msg_id AND id < @msg_id + 100"`
@@ -2731,8 +2764,9 @@ public Builder setParams(com.google.protobuf.Struct value) {
      * 
      * Parameter names and values that bind to placeholders in the SQL string.
      * A parameter placeholder consists of the `@` character followed by the
-     * parameter name (for example, `@firstName`). Parameter names can contain
-     * letters, numbers, and underscores.
+     * parameter name (for example, `@firstName`). Parameter names must conform
+     * to the naming requirements of identifiers as specified at
+     * https://cloud.google.com/spanner/docs/lexical#identifiers.
      * Parameters can appear anywhere that a literal value is expected.  The same
      * parameter name can be used more than once, for example:
      * `"WHERE id > @msg_id AND id < @msg_id + 100"`
@@ -2757,8 +2791,9 @@ public Builder setParams(com.google.protobuf.Struct.Builder builderForValue) {
      * 
      * Parameter names and values that bind to placeholders in the SQL string.
      * A parameter placeholder consists of the `@` character followed by the
-     * parameter name (for example, `@firstName`). Parameter names can contain
-     * letters, numbers, and underscores.
+     * parameter name (for example, `@firstName`). Parameter names must conform
+     * to the naming requirements of identifiers as specified at
+     * https://cloud.google.com/spanner/docs/lexical#identifiers.
      * Parameters can appear anywhere that a literal value is expected.  The same
      * parameter name can be used more than once, for example:
      * `"WHERE id > @msg_id AND id < @msg_id + 100"`
@@ -2787,8 +2822,9 @@ public Builder mergeParams(com.google.protobuf.Struct value) {
      * 
      * Parameter names and values that bind to placeholders in the SQL string.
      * A parameter placeholder consists of the `@` character followed by the
-     * parameter name (for example, `@firstName`). Parameter names can contain
-     * letters, numbers, and underscores.
+     * parameter name (for example, `@firstName`). Parameter names must conform
+     * to the naming requirements of identifiers as specified at
+     * https://cloud.google.com/spanner/docs/lexical#identifiers.
      * Parameters can appear anywhere that a literal value is expected.  The same
      * parameter name can be used more than once, for example:
      * `"WHERE id > @msg_id AND id < @msg_id + 100"`
@@ -2814,8 +2850,9 @@ public Builder clearParams() {
      * 
      * Parameter names and values that bind to placeholders in the SQL string.
      * A parameter placeholder consists of the `@` character followed by the
-     * parameter name (for example, `@firstName`). Parameter names can contain
-     * letters, numbers, and underscores.
+     * parameter name (for example, `@firstName`). Parameter names must conform
+     * to the naming requirements of identifiers as specified at
+     * https://cloud.google.com/spanner/docs/lexical#identifiers.
      * Parameters can appear anywhere that a literal value is expected.  The same
      * parameter name can be used more than once, for example:
      * `"WHERE id > @msg_id AND id < @msg_id + 100"`
@@ -2835,8 +2872,9 @@ public com.google.protobuf.Struct.Builder getParamsBuilder() {
      * 
      * Parameter names and values that bind to placeholders in the SQL string.
      * A parameter placeholder consists of the `@` character followed by the
-     * parameter name (for example, `@firstName`). Parameter names can contain
-     * letters, numbers, and underscores.
+     * parameter name (for example, `@firstName`). Parameter names must conform
+     * to the naming requirements of identifiers as specified at
+     * https://cloud.google.com/spanner/docs/lexical#identifiers.
      * Parameters can appear anywhere that a literal value is expected.  The same
      * parameter name can be used more than once, for example:
      * `"WHERE id > @msg_id AND id < @msg_id + 100"`
@@ -2858,8 +2896,9 @@ public com.google.protobuf.StructOrBuilder getParamsOrBuilder() {
      * 
      * Parameter names and values that bind to placeholders in the SQL string.
      * A parameter placeholder consists of the `@` character followed by the
-     * parameter name (for example, `@firstName`). Parameter names can contain
-     * letters, numbers, and underscores.
+     * parameter name (for example, `@firstName`). Parameter names must conform
+     * to the naming requirements of identifiers as specified at
+     * https://cloud.google.com/spanner/docs/lexical#identifiers.
      * Parameters can appear anywhere that a literal value is expected.  The same
      * parameter name can be used more than once, for example:
      * `"WHERE id > @msg_id AND id < @msg_id + 100"`
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java
index 7971beeb49..d6af9b0ba6 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java
@@ -136,8 +136,9 @@ public interface ExecuteSqlRequestOrBuilder
    * 
    * Parameter names and values that bind to placeholders in the SQL string.
    * A parameter placeholder consists of the `@` character followed by the
-   * parameter name (for example, `@firstName`). Parameter names can contain
-   * letters, numbers, and underscores.
+   * parameter name (for example, `@firstName`). Parameter names must conform
+   * to the naming requirements of identifiers as specified at
+   * https://cloud.google.com/spanner/docs/lexical#identifiers.
    * Parameters can appear anywhere that a literal value is expected.  The same
    * parameter name can be used more than once, for example:
    * `"WHERE id > @msg_id AND id < @msg_id + 100"`
@@ -155,8 +156,9 @@ public interface ExecuteSqlRequestOrBuilder
    * 
    * Parameter names and values that bind to placeholders in the SQL string.
    * A parameter placeholder consists of the `@` character followed by the
-   * parameter name (for example, `@firstName`). Parameter names can contain
-   * letters, numbers, and underscores.
+   * parameter name (for example, `@firstName`). Parameter names must conform
+   * to the naming requirements of identifiers as specified at
+   * https://cloud.google.com/spanner/docs/lexical#identifiers.
    * Parameters can appear anywhere that a literal value is expected.  The same
    * parameter name can be used more than once, for example:
    * `"WHERE id > @msg_id AND id < @msg_id + 100"`
@@ -174,8 +176,9 @@ public interface ExecuteSqlRequestOrBuilder
    * 
    * Parameter names and values that bind to placeholders in the SQL string.
    * A parameter placeholder consists of the `@` character followed by the
-   * parameter name (for example, `@firstName`). Parameter names can contain
-   * letters, numbers, and underscores.
+   * parameter name (for example, `@firstName`). Parameter names must conform
+   * to the naming requirements of identifiers as specified at
+   * https://cloud.google.com/spanner/docs/lexical#identifiers.
    * Parameters can appear anywhere that a literal value is expected.  The same
    * parameter name can be used more than once, for example:
    * `"WHERE id > @msg_id AND id < @msg_id + 100"`
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Session.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Session.java
index 9fe4f10c7c..1b058eb621 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Session.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Session.java
@@ -170,11 +170,10 @@ protected com.google.protobuf.MapField internalGetMapField(int number) {
    *
    *
    * 
-   * The name of the session. This is always system-assigned; values provided
-   * when creating a session are ignored.
+   * Output only. The name of the session. This is always system-assigned.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The name. */ @@ -194,11 +193,10 @@ public java.lang.String getName() { * * *
-   * The name of the session. This is always system-assigned; values provided
-   * when creating a session are ignored.
+   * Output only. The name of the session. This is always system-assigned.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for name. */ @@ -346,7 +344,8 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * Output only. The timestamp when the session is created. *
* - * .google.protobuf.Timestamp create_time = 3; + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the createTime field is set. */ @@ -361,7 +360,8 @@ public boolean hasCreateTime() { * Output only. The timestamp when the session is created. *
* - * .google.protobuf.Timestamp create_time = 3; + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The createTime. */ @@ -376,7 +376,8 @@ public com.google.protobuf.Timestamp getCreateTime() { * Output only. The timestamp when the session is created. *
* - * .google.protobuf.Timestamp create_time = 3; + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { @@ -393,7 +394,9 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * typically earlier than the actual last use time. *
* - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the approximateLastUseTime field is set. */ @@ -409,7 +412,9 @@ public boolean hasApproximateLastUseTime() { * typically earlier than the actual last use time. *
* - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The approximateLastUseTime. */ @@ -427,7 +432,9 @@ public com.google.protobuf.Timestamp getApproximateLastUseTime() { * typically earlier than the actual last use time. *
* - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getApproximateLastUseTimeOrBuilder() { @@ -852,11 +859,10 @@ public Builder mergeFrom( * * *
-     * The name of the session. This is always system-assigned; values provided
-     * when creating a session are ignored.
+     * Output only. The name of the session. This is always system-assigned.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The name. */ @@ -875,11 +881,10 @@ public java.lang.String getName() { * * *
-     * The name of the session. This is always system-assigned; values provided
-     * when creating a session are ignored.
+     * Output only. The name of the session. This is always system-assigned.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for name. */ @@ -898,11 +903,10 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * The name of the session. This is always system-assigned; values provided
-     * when creating a session are ignored.
+     * Output only. The name of the session. This is always system-assigned.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The name to set. * @return This builder for chaining. @@ -920,11 +924,10 @@ public Builder setName(java.lang.String value) { * * *
-     * The name of the session. This is always system-assigned; values provided
-     * when creating a session are ignored.
+     * Output only. The name of the session. This is always system-assigned.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ @@ -938,11 +941,10 @@ public Builder clearName() { * * *
-     * The name of the session. This is always system-assigned; values provided
-     * when creating a session are ignored.
+     * Output only. The name of the session. This is always system-assigned.
      * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -1170,7 +1172,9 @@ public Builder putAllLabels(java.util.Map va * Output only. The timestamp when the session is created. *
* - * .google.protobuf.Timestamp create_time = 3; + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the createTime field is set. */ @@ -1184,7 +1188,9 @@ public boolean hasCreateTime() { * Output only. The timestamp when the session is created. *
* - * .google.protobuf.Timestamp create_time = 3; + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The createTime. */ @@ -1204,7 +1210,9 @@ public com.google.protobuf.Timestamp getCreateTime() { * Output only. The timestamp when the session is created. *
* - * .google.protobuf.Timestamp create_time = 3; + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { @@ -1226,7 +1234,9 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * Output only. The timestamp when the session is created. *
* - * .google.protobuf.Timestamp create_time = 3; + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { @@ -1245,7 +1255,9 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * Output only. The timestamp when the session is created. *
* - * .google.protobuf.Timestamp create_time = 3; + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { @@ -1269,7 +1281,9 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * Output only. The timestamp when the session is created. *
* - * .google.protobuf.Timestamp create_time = 3; + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder clearCreateTime() { if (createTimeBuilder_ == null) { @@ -1289,7 +1303,9 @@ public Builder clearCreateTime() { * Output only. The timestamp when the session is created. *
* - * .google.protobuf.Timestamp create_time = 3; + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { @@ -1303,7 +1319,9 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { * Output only. The timestamp when the session is created. *
* - * .google.protobuf.Timestamp create_time = 3; + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { @@ -1321,7 +1339,9 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * Output only. The timestamp when the session is created. *
* - * .google.protobuf.Timestamp create_time = 3; + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -1354,7 +1374,9 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * typically earlier than the actual last use time. * * - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the approximateLastUseTime field is set. */ @@ -1369,7 +1391,9 @@ public boolean hasApproximateLastUseTime() { * typically earlier than the actual last use time. * * - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The approximateLastUseTime. */ @@ -1390,7 +1414,9 @@ public com.google.protobuf.Timestamp getApproximateLastUseTime() { * typically earlier than the actual last use time. * * - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setApproximateLastUseTime(com.google.protobuf.Timestamp value) { if (approximateLastUseTimeBuilder_ == null) { @@ -1413,7 +1439,9 @@ public Builder setApproximateLastUseTime(com.google.protobuf.Timestamp value) { * typically earlier than the actual last use time. * * - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setApproximateLastUseTime( com.google.protobuf.Timestamp.Builder builderForValue) { @@ -1434,7 +1462,9 @@ public Builder setApproximateLastUseTime( * typically earlier than the actual last use time. * * - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder mergeApproximateLastUseTime(com.google.protobuf.Timestamp value) { if (approximateLastUseTimeBuilder_ == null) { @@ -1461,7 +1491,9 @@ public Builder mergeApproximateLastUseTime(com.google.protobuf.Timestamp value) * typically earlier than the actual last use time. * * - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder clearApproximateLastUseTime() { if (approximateLastUseTimeBuilder_ == null) { @@ -1482,7 +1514,9 @@ public Builder clearApproximateLastUseTime() { * typically earlier than the actual last use time. * * - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.Timestamp.Builder getApproximateLastUseTimeBuilder() { @@ -1497,7 +1531,9 @@ public com.google.protobuf.Timestamp.Builder getApproximateLastUseTimeBuilder() * typically earlier than the actual last use time. * * - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.TimestampOrBuilder getApproximateLastUseTimeOrBuilder() { if (approximateLastUseTimeBuilder_ != null) { @@ -1516,7 +1552,9 @@ public com.google.protobuf.TimestampOrBuilder getApproximateLastUseTimeOrBuilder * typically earlier than the actual last use time. * * - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionOrBuilder.java index 6b7fc5b822..556832d009 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionOrBuilder.java @@ -27,11 +27,10 @@ public interface SessionOrBuilder * * *
-   * The name of the session. This is always system-assigned; values provided
-   * when creating a session are ignored.
+   * Output only. The name of the session. This is always system-assigned.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The name. */ @@ -40,11 +39,10 @@ public interface SessionOrBuilder * * *
-   * The name of the session. This is always system-assigned; values provided
-   * when creating a session are ignored.
+   * Output only. The name of the session. This is always system-assigned.
    * 
* - * string name = 1; + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for name. */ @@ -141,7 +139,8 @@ public interface SessionOrBuilder * Output only. The timestamp when the session is created. * * - * .google.protobuf.Timestamp create_time = 3; + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the createTime field is set. */ @@ -153,7 +152,8 @@ public interface SessionOrBuilder * Output only. The timestamp when the session is created. * * - * .google.protobuf.Timestamp create_time = 3; + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The createTime. */ @@ -165,7 +165,8 @@ public interface SessionOrBuilder * Output only. The timestamp when the session is created. * * - * .google.protobuf.Timestamp create_time = 3; + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); @@ -177,7 +178,9 @@ public interface SessionOrBuilder * typically earlier than the actual last use time. * * - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the approximateLastUseTime field is set. */ @@ -190,7 +193,9 @@ public interface SessionOrBuilder * typically earlier than the actual last use time. * * - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The approximateLastUseTime. */ @@ -203,7 +208,9 @@ public interface SessionOrBuilder * typically earlier than the actual last use time. * * - * .google.protobuf.Timestamp approximate_last_use_time = 4; + * + * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ com.google.protobuf.TimestampOrBuilder getApproximateLastUseTimeOrBuilder(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java index 0932ab5d52..8458063ada 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java @@ -131,6 +131,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_spanner_v1_CommitResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_spanner_v1_CommitResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_CommitResponse_CommitStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_CommitResponse_CommitStats_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_RollbackRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -148,198 +152,202 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e.spanner.v1\032\034google/api/annotations.pro" + "to\032\027google/api/client.proto\032\037google/api/" + "field_behavior.proto\032\031google/api/resourc" - + "e.proto\032\033google/protobuf/empty.proto\032\034go" - + "ogle/protobuf/struct.proto\032\037google/proto" - + "buf/timestamp.proto\032\027google/rpc/status.p" - + "roto\032\034google/spanner/v1/keys.proto\032 goog" - + "le/spanner/v1/mutation.proto\032\"google/spa" - + "nner/v1/result_set.proto\032#google/spanner" - + "/v1/transaction.proto\032\034google/spanner/v1" - + "/type.proto\"~\n\024CreateSessionRequest\0229\n\010d" - + "atabase\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googleapi" - + "s.com/Database\022+\n\007session\030\002 \001(\0132\032.google" - + ".spanner.v1.Session\"\251\001\n\032BatchCreateSessi" - + "onsRequest\0229\n\010database\030\001 \001(\tB\'\340A\002\372A!\n\037sp" - + "anner.googleapis.com/Database\0224\n\020session" - + "_template\030\002 \001(\0132\032.google.spanner.v1.Sess" - + "ion\022\032\n\rsession_count\030\003 \001(\005B\003\340A\002\"J\n\033Batch" - + "CreateSessionsResponse\022+\n\007session\030\001 \003(\0132" - + "\032.google.spanner.v1.Session\"\344\002\n\007Session\022" - + "\014\n\004name\030\001 \001(\t\0226\n\006labels\030\002 \003(\0132&.google.s" - + "panner.v1.Session.LabelsEntry\022/\n\013create_" - + "time\030\003 \001(\0132\032.google.protobuf.Timestamp\022=" - + "\n\031approximate_last_use_time\030\004 \001(\0132\032.goog" - + "le.protobuf.Timestamp\032-\n\013LabelsEntry\022\013\n\003" - + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:t\352Aq\n\036spann" - + "er.googleapis.com/Session\022Oprojects/{pro" - + "ject}/instances/{instance}/databases/{da" - + "tabase}/sessions/{session}\"I\n\021GetSession" - + "Request\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036spanner.g" - + "oogleapis.com/Session\"\207\001\n\023ListSessionsRe" - + "quest\0229\n\010database\030\001 \001(\tB\'\340A\002\372A!\n\037spanner" - + ".googleapis.com/Database\022\021\n\tpage_size\030\002 " - + "\001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"" - + "]\n\024ListSessionsResponse\022,\n\010sessions\030\001 \003(" - + "\0132\032.google.spanner.v1.Session\022\027\n\017next_pa" - + "ge_token\030\002 \001(\t\"L\n\024DeleteSessionRequest\0224" - + "\n\004name\030\001 \001(\tB&\340A\002\372A \n\036spanner.googleapis" - + ".com/Session\"\202\005\n\021ExecuteSqlRequest\0227\n\007se" - + "ssion\030\001 \001(\tB&\340A\002\372A \n\036spanner.googleapis." - + "com/Session\022;\n\013transaction\030\002 \001(\0132&.googl" - + "e.spanner.v1.TransactionSelector\022\020\n\003sql\030" - + "\003 \001(\tB\003\340A\002\022\'\n\006params\030\004 \001(\0132\027.google.prot" - + "obuf.Struct\022I\n\013param_types\030\005 \003(\01324.googl" - + "e.spanner.v1.ExecuteSqlRequest.ParamType" - + "sEntry\022\024\n\014resume_token\030\006 \001(\014\022B\n\nquery_mo" - + "de\030\007 \001(\0162..google.spanner.v1.ExecuteSqlR" - + "equest.QueryMode\022\027\n\017partition_token\030\010 \001(" - + "\014\022\r\n\005seqno\030\t \001(\003\022H\n\rquery_options\030\n \001(\0132" - + "1.google.spanner.v1.ExecuteSqlRequest.Qu" - + "eryOptions\032)\n\014QueryOptions\022\031\n\021optimizer_" - + "version\030\001 \001(\t\032J\n\017ParamTypesEntry\022\013\n\003key\030" - + "\001 \001(\t\022&\n\005value\030\002 \001(\0132\027.google.spanner.v1" - + ".Type:\0028\001\".\n\tQueryMode\022\n\n\006NORMAL\020\000\022\010\n\004PL" - + "AN\020\001\022\013\n\007PROFILE\020\002\"\337\003\n\026ExecuteBatchDmlReq" - + "uest\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n\036spanner.g" - + "oogleapis.com/Session\022@\n\013transaction\030\002 \001" - + "(\0132&.google.spanner.v1.TransactionSelect" - + "orB\003\340A\002\022L\n\nstatements\030\003 \003(\01323.google.spa" - + "nner.v1.ExecuteBatchDmlRequest.Statement" - + "B\003\340A\002\022\022\n\005seqno\030\004 \001(\003B\003\340A\002\032\347\001\n\tStatement\022" - + "\013\n\003sql\030\001 \001(\t\022\'\n\006params\030\002 \001(\0132\027.google.pr" - + "otobuf.Struct\022X\n\013param_types\030\003 \003(\0132C.goo" + + "e.proto\032\036google/protobuf/duration.proto\032" + + "\033google/protobuf/empty.proto\032\034google/pro" + + "tobuf/struct.proto\032\037google/protobuf/time" + + "stamp.proto\032\027google/rpc/status.proto\032\034go" + + "ogle/spanner/v1/keys.proto\032 google/spann" + + "er/v1/mutation.proto\032\"google/spanner/v1/" + + "result_set.proto\032#google/spanner/v1/tran" + + "saction.proto\032\034google/spanner/v1/type.pr" + + "oto\"~\n\024CreateSessionRequest\0229\n\010database\030" + + "\001 \001(\tB\'\340A\002\372A!\n\037spanner.googleapis.com/Da" + + "tabase\022+\n\007session\030\002 \001(\0132\032.google.spanner" + + ".v1.Session\"\251\001\n\032BatchCreateSessionsReque" + + "st\0229\n\010database\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.go" + + "ogleapis.com/Database\0224\n\020session_templat" + + "e\030\002 \001(\0132\032.google.spanner.v1.Session\022\032\n\rs" + + "ession_count\030\003 \001(\005B\003\340A\002\"J\n\033BatchCreateSe" + + "ssionsResponse\022+\n\007session\030\001 \003(\0132\032.google" + + ".spanner.v1.Session\"\363\002\n\007Session\022\021\n\004name\030" + + "\001 \001(\tB\003\340A\003\0226\n\006labels\030\002 \003(\0132&.google.span" + + "ner.v1.Session.LabelsEntry\0224\n\013create_tim" + + "e\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\022B\n\031approximate_last_use_time\030\004 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003\032-\n\013LabelsEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:t\352Aq" + + "\n\036spanner.googleapis.com/Session\022Oprojec" + + "ts/{project}/instances/{instance}/databa" + + "ses/{database}/sessions/{session}\"I\n\021Get" + + "SessionRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036sp" + + "anner.googleapis.com/Session\"\207\001\n\023ListSes" + + "sionsRequest\0229\n\010database\030\001 \001(\tB\'\340A\002\372A!\n\037" + + "spanner.googleapis.com/Database\022\021\n\tpage_" + + "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter" + + "\030\004 \001(\t\"]\n\024ListSessionsResponse\022,\n\010sessio" + + "ns\030\001 \003(\0132\032.google.spanner.v1.Session\022\027\n\017" + + "next_page_token\030\002 \001(\t\"L\n\024DeleteSessionRe" + + "quest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036spanner.goo" + + "gleapis.com/Session\"\202\005\n\021ExecuteSqlReques" + + "t\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n\036spanner.goog" + + "leapis.com/Session\022;\n\013transaction\030\002 \001(\0132" + + "&.google.spanner.v1.TransactionSelector\022" + + "\020\n\003sql\030\003 \001(\tB\003\340A\002\022\'\n\006params\030\004 \001(\0132\027.goog" + + "le.protobuf.Struct\022I\n\013param_types\030\005 \003(\0132" + + "4.google.spanner.v1.ExecuteSqlRequest.Pa" + + "ramTypesEntry\022\024\n\014resume_token\030\006 \001(\014\022B\n\nq" + + "uery_mode\030\007 \001(\0162..google.spanner.v1.Exec" + + "uteSqlRequest.QueryMode\022\027\n\017partition_tok" + + "en\030\010 \001(\014\022\r\n\005seqno\030\t \001(\003\022H\n\rquery_options" + + "\030\n \001(\01321.google.spanner.v1.ExecuteSqlReq" + + "uest.QueryOptions\032)\n\014QueryOptions\022\031\n\021opt" + + "imizer_version\030\001 \001(\t\032J\n\017ParamTypesEntry\022" + + "\013\n\003key\030\001 \001(\t\022&\n\005value\030\002 \001(\0132\027.google.spa" + + "nner.v1.Type:\0028\001\".\n\tQueryMode\022\n\n\006NORMAL\020" + + "\000\022\010\n\004PLAN\020\001\022\013\n\007PROFILE\020\002\"\337\003\n\026ExecuteBatc" + + "hDmlRequest\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n\036sp" + + "anner.googleapis.com/Session\022@\n\013transact" + + "ion\030\002 \001(\0132&.google.spanner.v1.Transactio" + + "nSelectorB\003\340A\002\022L\n\nstatements\030\003 \003(\01323.goo" + "gle.spanner.v1.ExecuteBatchDmlRequest.St" - + "atement.ParamTypesEntry\032J\n\017ParamTypesEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022&\n\005value\030\002 \001(\0132\027.google." - + "spanner.v1.Type:\0028\001\"p\n\027ExecuteBatchDmlRe" - + "sponse\0221\n\013result_sets\030\001 \003(\0132\034.google.spa" - + "nner.v1.ResultSet\022\"\n\006status\030\002 \001(\0132\022.goog" - + "le.rpc.Status\"H\n\020PartitionOptions\022\034\n\024par" - + "tition_size_bytes\030\001 \001(\003\022\026\n\016max_partition" - + "s\030\002 \001(\003\"\243\003\n\025PartitionQueryRequest\0227\n\007ses" - + "sion\030\001 \001(\tB&\340A\002\372A \n\036spanner.googleapis.c" - + "om/Session\022;\n\013transaction\030\002 \001(\0132&.google" - + ".spanner.v1.TransactionSelector\022\020\n\003sql\030\003" - + " \001(\tB\003\340A\002\022\'\n\006params\030\004 \001(\0132\027.google.proto" - + "buf.Struct\022M\n\013param_types\030\005 \003(\01328.google" - + ".spanner.v1.PartitionQueryRequest.ParamT" - + "ypesEntry\022>\n\021partition_options\030\006 \001(\0132#.g" - + "oogle.spanner.v1.PartitionOptions\032J\n\017Par" - + "amTypesEntry\022\013\n\003key\030\001 \001(\t\022&\n\005value\030\002 \001(\013" - + "2\027.google.spanner.v1.Type:\0028\001\"\261\002\n\024Partit" - + "ionReadRequest\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n" - + "\036spanner.googleapis.com/Session\022;\n\013trans" - + "action\030\002 \001(\0132&.google.spanner.v1.Transac" - + "tionSelector\022\022\n\005table\030\003 \001(\tB\003\340A\002\022\r\n\005inde" - + "x\030\004 \001(\t\022\017\n\007columns\030\005 \003(\t\022/\n\007key_set\030\006 \001(" - + "\0132\031.google.spanner.v1.KeySetB\003\340A\002\022>\n\021par" - + "tition_options\030\t \001(\0132#.google.spanner.v1" - + ".PartitionOptions\"$\n\tPartition\022\027\n\017partit" - + "ion_token\030\001 \001(\014\"z\n\021PartitionResponse\0220\n\n" - + "partitions\030\001 \003(\0132\034.google.spanner.v1.Par" - + "tition\0223\n\013transaction\030\002 \001(\0132\036.google.spa" - + "nner.v1.Transaction\"\253\002\n\013ReadRequest\0227\n\007s" - + "ession\030\001 \001(\tB&\340A\002\372A \n\036spanner.googleapis" - + ".com/Session\022;\n\013transaction\030\002 \001(\0132&.goog" - + "le.spanner.v1.TransactionSelector\022\022\n\005tab" - + "le\030\003 \001(\tB\003\340A\002\022\r\n\005index\030\004 \001(\t\022\024\n\007columns\030" - + "\005 \003(\tB\003\340A\002\022/\n\007key_set\030\006 \001(\0132\031.google.spa" - + "nner.v1.KeySetB\003\340A\002\022\r\n\005limit\030\010 \001(\003\022\024\n\014re" - + "sume_token\030\t \001(\014\022\027\n\017partition_token\030\n \001(" - + "\014\"\217\001\n\027BeginTransactionRequest\0227\n\007session" - + "\030\001 \001(\tB&\340A\002\372A \n\036spanner.googleapis.com/S" - + "ession\022;\n\007options\030\002 \001(\0132%.google.spanner" - + ".v1.TransactionOptionsB\003\340A\002\"\352\001\n\rCommitRe" - + "quest\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n\036spanner." - + "googleapis.com/Session\022\030\n\016transaction_id" - + "\030\002 \001(\014H\000\022G\n\026single_use_transaction\030\003 \001(\013" - + "2%.google.spanner.v1.TransactionOptionsH" - + "\000\022.\n\tmutations\030\004 \003(\0132\033.google.spanner.v1" - + ".MutationB\r\n\013transaction\"F\n\016CommitRespon" - + "se\0224\n\020commit_timestamp\030\001 \001(\0132\032.google.pr" - + "otobuf.Timestamp\"g\n\017RollbackRequest\0227\n\007s" - + "ession\030\001 \001(\tB&\340A\002\372A \n\036spanner.googleapis" - + ".com/Session\022\033\n\016transaction_id\030\002 \001(\014B\003\340A" - + "\0022\300\026\n\007Spanner\022\246\001\n\rCreateSession\022\'.google" - + ".spanner.v1.CreateSessionRequest\032\032.googl" - + "e.spanner.v1.Session\"P\202\323\344\223\002?\":/v1/{datab" - + "ase=projects/*/instances/*/databases/*}/" - + "sessions:\001*\332A\010database\022\340\001\n\023BatchCreateSe" - + "ssions\022-.google.spanner.v1.BatchCreateSe" - + "ssionsRequest\032..google.spanner.v1.BatchC" - + "reateSessionsResponse\"j\202\323\344\223\002K\"F/v1/{data" - + "base=projects/*/instances/*/databases/*}" - + "/sessions:batchCreate:\001*\332A\026database,sess" - + "ion_count\022\227\001\n\nGetSession\022$.google.spanne" - + "r.v1.GetSessionRequest\032\032.google.spanner." - + "v1.Session\"G\202\323\344\223\002:\0228/v1/{name=projects/*" - + "/instances/*/databases/*/sessions/*}\332A\004n" - + "ame\022\256\001\n\014ListSessions\022&.google.spanner.v1" - + ".ListSessionsRequest\032\'.google.spanner.v1" - + ".ListSessionsResponse\"M\202\323\344\223\002<\022:/v1/{data" - + "base=projects/*/instances/*/databases/*}" - + "/sessions\332A\010database\022\231\001\n\rDeleteSession\022\'" - + ".google.spanner.v1.DeleteSessionRequest\032" - + "\026.google.protobuf.Empty\"G\202\323\344\223\002:*8/v1/{na" - + "me=projects/*/instances/*/databases/*/se" - + "ssions/*}\332A\004name\022\243\001\n\nExecuteSql\022$.google" - + ".spanner.v1.ExecuteSqlRequest\032\034.google.s" - + "panner.v1.ResultSet\"Q\202\323\344\223\002K\"F/v1/{sessio" - + "n=projects/*/instances/*/databases/*/ses" - + "sions/*}:executeSql:\001*\022\276\001\n\023ExecuteStream" - + "ingSql\022$.google.spanner.v1.ExecuteSqlReq" - + "uest\032#.google.spanner.v1.PartialResultSe" - + "t\"Z\202\323\344\223\002T\"O/v1/{session=projects/*/insta" - + "nces/*/databases/*/sessions/*}:executeSt" - + "reamingSql:\001*0\001\022\300\001\n\017ExecuteBatchDml\022).go" - + "ogle.spanner.v1.ExecuteBatchDmlRequest\032*" - + ".google.spanner.v1.ExecuteBatchDmlRespon" - + "se\"V\202\323\344\223\002P\"K/v1/{session=projects/*/inst" - + "ances/*/databases/*/sessions/*}:executeB" - + "atchDml:\001*\022\221\001\n\004Read\022\036.google.spanner.v1." - + "ReadRequest\032\034.google.spanner.v1.ResultSe" - + "t\"K\202\323\344\223\002E\"@/v1/{session=projects/*/insta" - + "nces/*/databases/*/sessions/*}:read:\001*\022\254" - + "\001\n\rStreamingRead\022\036.google.spanner.v1.Rea" - + "dRequest\032#.google.spanner.v1.PartialResu" - + "ltSet\"T\202\323\344\223\002N\"I/v1/{session=projects/*/i" - + "nstances/*/databases/*/sessions/*}:strea" - + "mingRead:\001*0\001\022\311\001\n\020BeginTransaction\022*.goo" - + "gle.spanner.v1.BeginTransactionRequest\032\036" - + ".google.spanner.v1.Transaction\"i\202\323\344\223\002Q\"L" + + "atementB\003\340A\002\022\022\n\005seqno\030\004 \001(\003B\003\340A\002\032\347\001\n\tSta" + + "tement\022\013\n\003sql\030\001 \001(\t\022\'\n\006params\030\002 \001(\0132\027.go" + + "ogle.protobuf.Struct\022X\n\013param_types\030\003 \003(" + + "\0132C.google.spanner.v1.ExecuteBatchDmlReq" + + "uest.Statement.ParamTypesEntry\032J\n\017ParamT" + + "ypesEntry\022\013\n\003key\030\001 \001(\t\022&\n\005value\030\002 \001(\0132\027." + + "google.spanner.v1.Type:\0028\001\"p\n\027ExecuteBat" + + "chDmlResponse\0221\n\013result_sets\030\001 \003(\0132\034.goo" + + "gle.spanner.v1.ResultSet\022\"\n\006status\030\002 \001(\013" + + "2\022.google.rpc.Status\"H\n\020PartitionOptions" + + "\022\034\n\024partition_size_bytes\030\001 \001(\003\022\026\n\016max_pa" + + "rtitions\030\002 \001(\003\"\243\003\n\025PartitionQueryRequest" + + "\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n\036spanner.googl" + + "eapis.com/Session\022;\n\013transaction\030\002 \001(\0132&" + + ".google.spanner.v1.TransactionSelector\022\020" + + "\n\003sql\030\003 \001(\tB\003\340A\002\022\'\n\006params\030\004 \001(\0132\027.googl" + + "e.protobuf.Struct\022M\n\013param_types\030\005 \003(\01328" + + ".google.spanner.v1.PartitionQueryRequest" + + ".ParamTypesEntry\022>\n\021partition_options\030\006 " + + "\001(\0132#.google.spanner.v1.PartitionOptions" + + "\032J\n\017ParamTypesEntry\022\013\n\003key\030\001 \001(\t\022&\n\005valu" + + "e\030\002 \001(\0132\027.google.spanner.v1.Type:\0028\001\"\261\002\n" + + "\024PartitionReadRequest\0227\n\007session\030\001 \001(\tB&" + + "\340A\002\372A \n\036spanner.googleapis.com/Session\022;" + + "\n\013transaction\030\002 \001(\0132&.google.spanner.v1." + + "TransactionSelector\022\022\n\005table\030\003 \001(\tB\003\340A\002\022" + + "\r\n\005index\030\004 \001(\t\022\017\n\007columns\030\005 \003(\t\022/\n\007key_s" + + "et\030\006 \001(\0132\031.google.spanner.v1.KeySetB\003\340A\002" + + "\022>\n\021partition_options\030\t \001(\0132#.google.spa" + + "nner.v1.PartitionOptions\"$\n\tPartition\022\027\n" + + "\017partition_token\030\001 \001(\014\"z\n\021PartitionRespo" + + "nse\0220\n\npartitions\030\001 \003(\0132\034.google.spanner" + + ".v1.Partition\0223\n\013transaction\030\002 \001(\0132\036.goo" + + "gle.spanner.v1.Transaction\"\253\002\n\013ReadReque" + + "st\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n\036spanner.goo" + + "gleapis.com/Session\022;\n\013transaction\030\002 \001(\013" + + "2&.google.spanner.v1.TransactionSelector" + + "\022\022\n\005table\030\003 \001(\tB\003\340A\002\022\r\n\005index\030\004 \001(\t\022\024\n\007c" + + "olumns\030\005 \003(\tB\003\340A\002\022/\n\007key_set\030\006 \001(\0132\031.goo" + + "gle.spanner.v1.KeySetB\003\340A\002\022\r\n\005limit\030\010 \001(" + + "\003\022\024\n\014resume_token\030\t \001(\014\022\027\n\017partition_tok" + + "en\030\n \001(\014\"\217\001\n\027BeginTransactionRequest\0227\n\007" + + "session\030\001 \001(\tB&\340A\002\372A \n\036spanner.googleapi" + + "s.com/Session\022;\n\007options\030\002 \001(\0132%.google." + + "spanner.v1.TransactionOptionsB\003\340A\002\"\207\002\n\rC" + + "ommitRequest\0227\n\007session\030\001 \001(\tB&\340A\002\372A \n\036s" + + "panner.googleapis.com/Session\022\030\n\016transac" + + "tion_id\030\002 \001(\014H\000\022G\n\026single_use_transactio" + + "n\030\003 \001(\0132%.google.spanner.v1.TransactionO" + + "ptionsH\000\022.\n\tmutations\030\004 \003(\0132\033.google.spa" + + "nner.v1.Mutation\022\033\n\023return_commit_stats\030" + + "\005 \001(\010B\r\n\013transaction\"\262\001\n\016CommitResponse\022" + + "4\n\020commit_timestamp\030\001 \001(\0132\032.google.proto" + + "buf.Timestamp\022C\n\014commit_stats\030\002 \001(\0132-.go" + + "ogle.spanner.v1.CommitResponse.CommitSta" + + "ts\032%\n\013CommitStats\022\026\n\016mutation_count\030\001 \001(" + + "\003\"g\n\017RollbackRequest\0227\n\007session\030\001 \001(\tB&\340" + + "A\002\372A \n\036spanner.googleapis.com/Session\022\033\n" + + "\016transaction_id\030\002 \001(\014B\003\340A\0022\300\026\n\007Spanner\022\246" + + "\001\n\rCreateSession\022\'.google.spanner.v1.Cre" + + "ateSessionRequest\032\032.google.spanner.v1.Se" + + "ssion\"P\202\323\344\223\002?\":/v1/{database=projects/*/" + + "instances/*/databases/*}/sessions:\001*\332A\010d" + + "atabase\022\340\001\n\023BatchCreateSessions\022-.google" + + ".spanner.v1.BatchCreateSessionsRequest\032." + + ".google.spanner.v1.BatchCreateSessionsRe" + + "sponse\"j\202\323\344\223\002K\"F/v1/{database=projects/*" + + "/instances/*/databases/*}/sessions:batch" + + "Create:\001*\332A\026database,session_count\022\227\001\n\nG" + + "etSession\022$.google.spanner.v1.GetSession" + + "Request\032\032.google.spanner.v1.Session\"G\202\323\344" + + "\223\002:\0228/v1/{name=projects/*/instances/*/da" + + "tabases/*/sessions/*}\332A\004name\022\256\001\n\014ListSes" + + "sions\022&.google.spanner.v1.ListSessionsRe" + + "quest\032\'.google.spanner.v1.ListSessionsRe" + + "sponse\"M\202\323\344\223\002<\022:/v1/{database=projects/*" + + "/instances/*/databases/*}/sessions\332A\010dat" + + "abase\022\231\001\n\rDeleteSession\022\'.google.spanner" + + ".v1.DeleteSessionRequest\032\026.google.protob" + + "uf.Empty\"G\202\323\344\223\002:*8/v1/{name=projects/*/i" + + "nstances/*/databases/*/sessions/*}\332A\004nam" + + "e\022\243\001\n\nExecuteSql\022$.google.spanner.v1.Exe" + + "cuteSqlRequest\032\034.google.spanner.v1.Resul" + + "tSet\"Q\202\323\344\223\002K\"F/v1/{session=projects/*/in" + + "stances/*/databases/*/sessions/*}:execut" + + "eSql:\001*\022\276\001\n\023ExecuteStreamingSql\022$.google" + + ".spanner.v1.ExecuteSqlRequest\032#.google.s" + + "panner.v1.PartialResultSet\"Z\202\323\344\223\002T\"O/v1/" + + "{session=projects/*/instances/*/database" + + "s/*/sessions/*}:executeStreamingSql:\001*0\001" + + "\022\300\001\n\017ExecuteBatchDml\022).google.spanner.v1" + + ".ExecuteBatchDmlRequest\032*.google.spanner" + + ".v1.ExecuteBatchDmlResponse\"V\202\323\344\223\002P\"K/v1" + + "/{session=projects/*/instances/*/databas" + + "es/*/sessions/*}:executeBatchDml:\001*\022\221\001\n\004" + + "Read\022\036.google.spanner.v1.ReadRequest\032\034.g" + + "oogle.spanner.v1.ResultSet\"K\202\323\344\223\002E\"@/v1/" + + "{session=projects/*/instances/*/database" + + "s/*/sessions/*}:read:\001*\022\254\001\n\rStreamingRea" + + "d\022\036.google.spanner.v1.ReadRequest\032#.goog" + + "le.spanner.v1.PartialResultSet\"T\202\323\344\223\002N\"I" + "/v1/{session=projects/*/instances/*/data" - + "bases/*/sessions/*}:beginTransaction:\001*\332" - + "A\017session,options\022\353\001\n\006Commit\022 .google.sp" - + "anner.v1.CommitRequest\032!.google.spanner." - + "v1.CommitResponse\"\233\001\202\323\344\223\002G\"B/v1/{session" - + "=projects/*/instances/*/databases/*/sess" - + "ions/*}:commit:\001*\332A session,transaction_" - + "id,mutations\332A(session,single_use_transa" - + "ction,mutations\022\260\001\n\010Rollback\022\".google.sp" - + "anner.v1.RollbackRequest\032\026.google.protob" - + "uf.Empty\"h\202\323\344\223\002I\"D/v1/{session=projects/" - + "*/instances/*/databases/*/sessions/*}:ro" - + "llback:\001*\332A\026session,transaction_id\022\267\001\n\016P" - + "artitionQuery\022(.google.spanner.v1.Partit" - + "ionQueryRequest\032$.google.spanner.v1.Part" - + "itionResponse\"U\202\323\344\223\002O\"J/v1/{session=proj" - + "ects/*/instances/*/databases/*/sessions/" - + "*}:partitionQuery:\001*\022\264\001\n\rPartitionRead\022\'" - + ".google.spanner.v1.PartitionReadRequest\032" - + "$.google.spanner.v1.PartitionResponse\"T\202" - + "\323\344\223\002N\"I/v1/{session=projects/*/instances" - + "/*/databases/*/sessions/*}:partitionRead" - + ":\001*\032w\312A\026spanner.googleapis.com\322A[https:/" - + "/www.googleapis.com/auth/cloud-platform," - + "https://www.googleapis.com/auth/spanner." - + "dataB\224\002\n\025com.google.spanner.v1B\014SpannerP" - + "rotoP\001Z8google.golang.org/genproto/googl" - + "eapis/spanner/v1;spanner\252\002\027Google.Cloud." - + "Spanner.V1\312\002\027Google\\Cloud\\Spanner\\V1\352\002\032G" - + "oogle::Cloud::Spanner::V1\352A_\n\037spanner.go" - + "ogleapis.com/Database\022 @@ -148,7 +148,7 @@ public interface FieldOrBuilder * SQL queries, it is the column alias (e.g., `"Word"` in the * query `"SELECT 'hello' AS Word"`), or the column name (e.g., * `"ColName"` in the query `"SELECT ColName FROM Table"`). Some - * columns might have an empty name (e.g., !"SELECT + * columns might have an empty name (e.g., `"SELECT * UPPER(ColName)"`). Note that a query result can contain * multiple fields with the same name. * @@ -311,7 +311,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * SQL queries, it is the column alias (e.g., `"Word"` in the * query `"SELECT 'hello' AS Word"`), or the column name (e.g., * `"ColName"` in the query `"SELECT ColName FROM Table"`). Some - * columns might have an empty name (e.g., !"SELECT + * columns might have an empty name (e.g., `"SELECT * UPPER(ColName)"`). Note that a query result can contain * multiple fields with the same name. * @@ -340,7 +340,7 @@ public java.lang.String getName() { * SQL queries, it is the column alias (e.g., `"Word"` in the * query `"SELECT 'hello' AS Word"`), or the column name (e.g., * `"ColName"` in the query `"SELECT ColName FROM Table"`). Some - * columns might have an empty name (e.g., !"SELECT + * columns might have an empty name (e.g., `"SELECT * UPPER(ColName)"`). Note that a query result can contain * multiple fields with the same name. * @@ -764,7 +764,7 @@ public Builder mergeFrom( * SQL queries, it is the column alias (e.g., `"Word"` in the * query `"SELECT 'hello' AS Word"`), or the column name (e.g., * `"ColName"` in the query `"SELECT ColName FROM Table"`). Some - * columns might have an empty name (e.g., !"SELECT + * columns might have an empty name (e.g., `"SELECT * UPPER(ColName)"`). Note that a query result can contain * multiple fields with the same name. * @@ -792,7 +792,7 @@ public java.lang.String getName() { * SQL queries, it is the column alias (e.g., `"Word"` in the * query `"SELECT 'hello' AS Word"`), or the column name (e.g., * `"ColName"` in the query `"SELECT ColName FROM Table"`). Some - * columns might have an empty name (e.g., !"SELECT + * columns might have an empty name (e.g., `"SELECT * UPPER(ColName)"`). Note that a query result can contain * multiple fields with the same name. * @@ -820,7 +820,7 @@ public com.google.protobuf.ByteString getNameBytes() { * SQL queries, it is the column alias (e.g., `"Word"` in the * query `"SELECT 'hello' AS Word"`), or the column name (e.g., * `"ColName"` in the query `"SELECT ColName FROM Table"`). Some - * columns might have an empty name (e.g., !"SELECT + * columns might have an empty name (e.g., `"SELECT * UPPER(ColName)"`). Note that a query result can contain * multiple fields with the same name. * @@ -847,7 +847,7 @@ public Builder setName(java.lang.String value) { * SQL queries, it is the column alias (e.g., `"Word"` in the * query `"SELECT 'hello' AS Word"`), or the column name (e.g., * `"ColName"` in the query `"SELECT ColName FROM Table"`). Some - * columns might have an empty name (e.g., !"SELECT + * columns might have an empty name (e.g., `"SELECT * UPPER(ColName)"`). Note that a query result can contain * multiple fields with the same name. * @@ -870,7 +870,7 @@ public Builder clearName() { * SQL queries, it is the column alias (e.g., `"Word"` in the * query `"SELECT 'hello' AS Word"`), or the column name (e.g., * `"ColName"` in the query `"SELECT ColName FROM Table"`). Some - * columns might have an empty name (e.g., !"SELECT + * columns might have an empty name (e.g., `"SELECT * UPPER(ColName)"`). Note that a query result can contain * multiple fields with the same name. * diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOptions.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOptions.java index 93de3f1b96..980f749f00 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOptions.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOptions.java @@ -23,10 +23,11 @@ * *
  * # Transactions
- * Each session can have at most one active transaction at a time. After the
- * active transaction is completed, the session can immediately be
- * re-used for the next transaction. It is not necessary to create a
- * new session for each transaction.
+ * Each session can have at most one active transaction at a time (note that
+ * standalone reads and queries use a transaction internally and do count
+ * towards the one transaction limit). After the active transaction is
+ * completed, the session can immediately be re-used for the next transaction.
+ * It is not necessary to create a new session for each transaction.
  * # Transaction Modes
  * Cloud Spanner supports three transaction modes:
  *   1. Locking read-write. This type of transaction is the only way
@@ -4312,10 +4313,11 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
    *
    * 
    * # Transactions
-   * Each session can have at most one active transaction at a time. After the
-   * active transaction is completed, the session can immediately be
-   * re-used for the next transaction. It is not necessary to create a
-   * new session for each transaction.
+   * Each session can have at most one active transaction at a time (note that
+   * standalone reads and queries use a transaction internally and do count
+   * towards the one transaction limit). After the active transaction is
+   * completed, the session can immediately be re-used for the next transaction.
+   * It is not necessary to create a new session for each transaction.
    * # Transaction Modes
    * Cloud Spanner supports three transaction modes:
    *   1. Locking read-write. This type of transaction is the only way
diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto
index 93e4987ed1..8f579e333d 100644
--- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto
+++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto
@@ -20,6 +20,7 @@ import "google/api/annotations.proto";
 import "google/api/client.proto";
 import "google/api/field_behavior.proto";
 import "google/api/resource.proto";
+import "google/protobuf/duration.proto";
 import "google/protobuf/empty.proto";
 import "google/protobuf/struct.proto";
 import "google/protobuf/timestamp.proto";
@@ -219,6 +220,12 @@ service Spanner {
   // transactions. However, it can also happen for a variety of other
   // reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
   // the transaction from the beginning, re-using the same session.
+  //
+  // On very rare occasions, `Commit` might return `UNKNOWN`. This can happen,
+  // for example, if the client job experiences a 1+ hour networking failure.
+  // At that point, Cloud Spanner has lost track of the transaction outcome and
+  // we recommend that you perform another read from the database to see the
+  // state of things as they are now.
   rpc Commit(CommitRequest) returns (CommitResponse) {
     option (google.api.http) = {
       post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:commit"
@@ -331,9 +338,8 @@ message Session {
     pattern: "projects/{project}/instances/{instance}/databases/{database}/sessions/{session}"
   };
 
-  // The name of the session. This is always system-assigned; values provided
-  // when creating a session are ignored.
-  string name = 1;
+  // Output only. The name of the session. This is always system-assigned.
+  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // The labels for the session.
   //
@@ -347,11 +353,11 @@ message Session {
   map labels = 2;
 
   // Output only. The timestamp when the session is created.
-  google.protobuf.Timestamp create_time = 3;
+  google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The approximate timestamp when the session is last used. It is
   // typically earlier than the actual last use time.
-  google.protobuf.Timestamp approximate_last_use_time = 4;
+  google.protobuf.Timestamp approximate_last_use_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
 }
 
 // The request for [GetSession][google.spanner.v1.Spanner.GetSession].
@@ -438,6 +444,9 @@ message ExecuteSqlRequest {
     // SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement
     // with an invalid optimizer version will fail with a syntax error
     // (`INVALID_ARGUMENT`) status.
+    // See
+    // https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
+    // for more information on managing the query optimizer.
     //
     // The `optimizer_version` statement hint has precedence over this setting.
     string optimizer_version = 1;
@@ -483,8 +492,9 @@ message ExecuteSqlRequest {
   // Parameter names and values that bind to placeholders in the SQL string.
   //
   // A parameter placeholder consists of the `@` character followed by the
-  // parameter name (for example, `@firstName`). Parameter names can contain
-  // letters, numbers, and underscores.
+  // parameter name (for example, `@firstName`). Parameter names must conform
+  // to the naming requirements of identifiers as specified at
+  // https://cloud.google.com/spanner/docs/lexical#identifiers.
   //
   // Parameters can appear anywhere that a literal value is expected.  The same
   // parameter name can be used more than once, for example:
@@ -884,12 +894,34 @@ message CommitRequest {
   // mutations are applied atomically, in the order they appear in
   // this list.
   repeated Mutation mutations = 4;
+
+  // If `true`, then statistics related to the transaction will be included in
+  // the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is
+  // `false`.
+  bool return_commit_stats = 5;
 }
 
 // The response for [Commit][google.spanner.v1.Spanner.Commit].
 message CommitResponse {
+  // Additional statistics about a commit.
+  message CommitStats {
+    // The total number of mutations for the transaction. Knowing the
+    // `mutation_count` value can help you maximize the number of mutations
+    // in a transaction and minimize the number of API round trips. You can
+    // also monitor this value to prevent transactions from exceeding the system
+    // [limit](http://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
+    // If the number of mutations exceeds the limit, the server returns
+    // [INVALID_ARGUMENT](http://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
+    int64 mutation_count = 1;
+  }
+
   // The Cloud Spanner timestamp at which the transaction committed.
   google.protobuf.Timestamp commit_timestamp = 1;
+
+  // The statistics about this Commit. Not returned by default.
+  // For more information, see
+  // [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
+  CommitStats commit_stats = 2;
 }
 
 // The request for [Rollback][google.spanner.v1.Spanner.Rollback].
diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/transaction.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/transaction.proto
index 0bcbfcf900..2cafefcb10 100644
--- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/transaction.proto
+++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/transaction.proto
@@ -31,10 +31,11 @@ option ruby_package = "Google::Cloud::Spanner::V1";
 // # Transactions
 //
 //
-// Each session can have at most one active transaction at a time. After the
-// active transaction is completed, the session can immediately be
-// re-used for the next transaction. It is not necessary to create a
-// new session for each transaction.
+// Each session can have at most one active transaction at a time (note that
+// standalone reads and queries use a transaction internally and do count
+// towards the one transaction limit). After the active transaction is
+// completed, the session can immediately be re-used for the next transaction.
+// It is not necessary to create a new session for each transaction.
 //
 // # Transaction Modes
 //
diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto
index 1e5e5ff313..1b863c0fdf 100644
--- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto
+++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto
@@ -50,7 +50,7 @@ message StructType {
     // SQL queries, it is the column alias (e.g., `"Word"` in the
     // query `"SELECT 'hello' AS Word"`), or the column name (e.g.,
     // `"ColName"` in the query `"SELECT ColName FROM Table"`). Some
-    // columns might have an empty name (e.g., !"SELECT
+    // columns might have an empty name (e.g., `"SELECT
     // UPPER(ColName)"`). Note that a query result can contain
     // multiple fields with the same name.
     string name = 1;
diff --git a/synth.metadata b/synth.metadata
index 0a94795849..554bb0a42c 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,15 +4,15 @@
       "git": {
         "name": ".",
         "remote": "https://github.com/googleapis/java-spanner.git",
-        "sha": "15052653993a3924037b2c4ba27e04f553493885"
+        "sha": "4aa770ce669404ad0eca542ae5bd32a421748c18"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "91e206bcfeaf8948ea03fe3cb1b7616108496cd3",
-        "internalRef": "350949863"
+        "sha": "8fa381b7138f1d72966ff20563efae1b2194d359",
+        "internalRef": "353145174"
       }
     },
     {