From 71b92d4095e34c496a8b8df055deded16e9e5bfe Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Fri, 23 Aug 2019 00:57:48 -0700 Subject: [PATCH] Regenerate spanner client --- .../com/google/spanner/v1/SpannerGrpc.java | 186 +++- .../v1/BatchCreateSessionsRequest.java | 963 ++++++++++++++++++ .../BatchCreateSessionsRequestOrBuilder.java | 78 ++ .../v1/BatchCreateSessionsResponse.java | 921 +++++++++++++++++ .../BatchCreateSessionsResponseOrBuilder.java | 61 ++ .../spanner/v1/ExecuteBatchDmlRequest.java | 64 +- .../spanner/v1/ExecuteBatchDmlResponse.java | 208 ++-- .../v1/ExecuteBatchDmlResponseOrBuilder.java | 40 +- .../google/spanner/v1/ExecuteSqlRequest.java | 24 - .../v1/ExecuteSqlRequestOrBuilder.java | 6 - .../com/google/spanner/v1/SpannerProto.java | 348 ++++--- .../proto/google/spanner/v1/spanner.proto | 74 +- .../cloud/spanner/v1/SpannerClient.java | 108 ++ .../cloud/spanner/v1/SpannerSettings.java | 14 + .../spanner/v1/stub/GrpcSpannerStub.java | 38 + .../cloud/spanner/v1/stub/SpannerStub.java | 7 + .../spanner/v1/stub/SpannerStubSettings.java | 29 + .../cloud/spanner/v1/MockSpannerImpl.java | 18 + .../cloud/spanner/v1/SpannerClientTest.java | 40 + .../google-cloud-spanner/synth.metadata | 10 +- 20 files changed, 2898 insertions(+), 339 deletions(-) create mode 100644 google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequest.java create mode 100644 google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponse.java create mode 100644 google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponseOrBuilder.java diff --git a/google-api-grpc/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java b/google-api-grpc/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java index b972e19f5dc4..d9e0e1c8bc28 100644 --- a/google-api-grpc/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java +++ b/google-api-grpc/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java @@ -78,6 +78,65 @@ private SpannerGrpc() {} return getCreateSessionMethod; } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getBatchCreateSessionsMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.spanner.v1.BatchCreateSessionsRequest, + com.google.spanner.v1.BatchCreateSessionsResponse> + METHOD_BATCH_CREATE_SESSIONS = getBatchCreateSessionsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.spanner.v1.BatchCreateSessionsRequest, + com.google.spanner.v1.BatchCreateSessionsResponse> + getBatchCreateSessionsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.spanner.v1.BatchCreateSessionsRequest, + com.google.spanner.v1.BatchCreateSessionsResponse> + getBatchCreateSessionsMethod() { + return getBatchCreateSessionsMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.spanner.v1.BatchCreateSessionsRequest, + com.google.spanner.v1.BatchCreateSessionsResponse> + getBatchCreateSessionsMethodHelper() { + io.grpc.MethodDescriptor< + com.google.spanner.v1.BatchCreateSessionsRequest, + com.google.spanner.v1.BatchCreateSessionsResponse> + getBatchCreateSessionsMethod; + if ((getBatchCreateSessionsMethod = SpannerGrpc.getBatchCreateSessionsMethod) == null) { + synchronized (SpannerGrpc.class) { + if ((getBatchCreateSessionsMethod = SpannerGrpc.getBatchCreateSessionsMethod) == null) { + SpannerGrpc.getBatchCreateSessionsMethod = + getBatchCreateSessionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.spanner.v1.Spanner", "BatchCreateSessions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.v1.BatchCreateSessionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.v1.BatchCreateSessionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SpannerMethodDescriptorSupplier("BatchCreateSessions")) + .build(); + } + } + } + return getBatchCreateSessionsMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getGetSessionMethod()} instead. public static final io.grpc.MethodDescriptor< @@ -780,6 +839,22 @@ public void createSession( asyncUnimplementedUnaryCall(getCreateSessionMethodHelper(), responseObserver); } + /** + * + * + *
+     * Creates multiple new sessions.
+     * This API can be used to initialize a session cache on the clients.
+     * See https://goo.gl/TgSFN2 for best practices on session cache management.
+     * 
+ */ + public void batchCreateSessions( + com.google.spanner.v1.BatchCreateSessionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getBatchCreateSessionsMethodHelper(), responseObserver); + } + /** * * @@ -872,8 +947,9 @@ public void executeStreamingSql( * [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. * Statements are executed in order, sequentially. * [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse] will contain a - * [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has successfully executed. If a - * statement fails, its error status will be returned as part of the + * [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has + * successfully executed. If a statement fails, its error status will be + * returned as part of the * [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse]. Execution will * stop at the first failed statement; the remaining statements will not run. * ExecuteBatchDml is expected to return an OK status with a response even if @@ -1046,6 +1122,13 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.spanner.v1.CreateSessionRequest, com.google.spanner.v1.Session>( this, METHODID_CREATE_SESSION))) + .addMethod( + getBatchCreateSessionsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.spanner.v1.BatchCreateSessionsRequest, + com.google.spanner.v1.BatchCreateSessionsResponse>( + this, METHODID_BATCH_CREATE_SESSIONS))) .addMethod( getGetSessionMethodHelper(), asyncUnaryCall( @@ -1184,6 +1267,25 @@ public void createSession( responseObserver); } + /** + * + * + *
+     * Creates multiple new sessions.
+     * This API can be used to initialize a session cache on the clients.
+     * See https://goo.gl/TgSFN2 for best practices on session cache management.
+     * 
+ */ + public void batchCreateSessions( + com.google.spanner.v1.BatchCreateSessionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBatchCreateSessionsMethodHelper(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1291,8 +1393,9 @@ public void executeStreamingSql( * [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. * Statements are executed in order, sequentially. * [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse] will contain a - * [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has successfully executed. If a - * statement fails, its error status will be returned as part of the + * [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has + * successfully executed. If a statement fails, its error status will be + * returned as part of the * [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse]. Execution will * stop at the first failed statement; the remaining statements will not run. * ExecuteBatchDml is expected to return an OK status with a response even if @@ -1531,6 +1634,21 @@ public com.google.spanner.v1.Session createSession( getChannel(), getCreateSessionMethodHelper(), getCallOptions(), request); } + /** + * + * + *
+     * Creates multiple new sessions.
+     * This API can be used to initialize a session cache on the clients.
+     * See https://goo.gl/TgSFN2 for best practices on session cache management.
+     * 
+ */ + public com.google.spanner.v1.BatchCreateSessionsResponse batchCreateSessions( + com.google.spanner.v1.BatchCreateSessionsRequest request) { + return blockingUnaryCall( + getChannel(), getBatchCreateSessionsMethodHelper(), getCallOptions(), request); + } + /** * * @@ -1623,8 +1741,9 @@ public java.util.Iterator executeStreami * [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. * Statements are executed in order, sequentially. * [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse] will contain a - * [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has successfully executed. If a - * statement fails, its error status will be returned as part of the + * [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has + * successfully executed. If a statement fails, its error status will be + * returned as part of the * [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse]. Execution will * stop at the first failed statement; the remaining statements will not run. * ExecuteBatchDml is expected to return an OK status with a response even if @@ -1834,6 +1953,22 @@ protected SpannerFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c getChannel().newCall(getCreateSessionMethodHelper(), getCallOptions()), request); } + /** + * + * + *
+     * Creates multiple new sessions.
+     * This API can be used to initialize a session cache on the clients.
+     * See https://goo.gl/TgSFN2 for best practices on session cache management.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.spanner.v1.BatchCreateSessionsResponse> + batchCreateSessions(com.google.spanner.v1.BatchCreateSessionsRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchCreateSessionsMethodHelper(), getCallOptions()), request); + } + /** * * @@ -1910,8 +2045,9 @@ protected SpannerFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c * [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. * Statements are executed in order, sequentially. * [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse] will contain a - * [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has successfully executed. If a - * statement fails, its error status will be returned as part of the + * [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has + * successfully executed. If a statement fails, its error status will be + * returned as part of the * [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse]. Execution will * stop at the first failed statement; the remaining statements will not run. * ExecuteBatchDml is expected to return an OK status with a response even if @@ -2062,19 +2198,20 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2098,6 +2235,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.spanner.v1.CreateSessionRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_BATCH_CREATE_SESSIONS: + serviceImpl.batchCreateSessions( + (com.google.spanner.v1.BatchCreateSessionsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_GET_SESSION: serviceImpl.getSession( (com.google.spanner.v1.GetSessionRequest) request, @@ -2232,6 +2375,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new SpannerFileDescriptorSupplier()) .addMethod(getCreateSessionMethodHelper()) + .addMethod(getBatchCreateSessionsMethodHelper()) .addMethod(getGetSessionMethodHelper()) .addMethod(getListSessionsMethodHelper()) .addMethod(getDeleteSessionMethodHelper()) diff --git a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequest.java b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequest.java new file mode 100644 index 000000000000..aed5cef16c97 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequest.java @@ -0,0 +1,963 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/spanner.proto + +package com.google.spanner.v1; + +/** + * + * + *
+ * The request for
+ * [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].
+ * 
+ * + * Protobuf type {@code google.spanner.v1.BatchCreateSessionsRequest} + */ +public final class BatchCreateSessionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.BatchCreateSessionsRequest) + BatchCreateSessionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchCreateSessionsRequest.newBuilder() to construct. + private BatchCreateSessionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchCreateSessionsRequest() { + database_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchCreateSessionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + database_ = s; + break; + } + case 18: + { + com.google.spanner.v1.Session.Builder subBuilder = null; + if (sessionTemplate_ != null) { + subBuilder = sessionTemplate_.toBuilder(); + } + sessionTemplate_ = + input.readMessage(com.google.spanner.v1.Session.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sessionTemplate_); + sessionTemplate_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + sessionCount_ = input.readInt32(); + 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_BatchCreateSessionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchCreateSessionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.BatchCreateSessionsRequest.class, + com.google.spanner.v1.BatchCreateSessionsRequest.Builder.class); + } + + public static final int DATABASE_FIELD_NUMBER = 1; + private volatile java.lang.Object database_; + /** + * + * + *
+   * Required. The database in which the new sessions are created.
+   * 
+ * + * string database = 1; + */ + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The database in which the new sessions are created.
+   * 
+ * + * string database = 1; + */ + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SESSION_TEMPLATE_FIELD_NUMBER = 2; + private com.google.spanner.v1.Session sessionTemplate_; + /** + * + * + *
+   * Parameters to be applied to each created session.
+   * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + public boolean hasSessionTemplate() { + return sessionTemplate_ != null; + } + /** + * + * + *
+   * Parameters to be applied to each created session.
+   * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + public com.google.spanner.v1.Session getSessionTemplate() { + return sessionTemplate_ == null + ? com.google.spanner.v1.Session.getDefaultInstance() + : sessionTemplate_; + } + /** + * + * + *
+   * Parameters to be applied to each created session.
+   * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + public com.google.spanner.v1.SessionOrBuilder getSessionTemplateOrBuilder() { + return getSessionTemplate(); + } + + public static final int SESSION_COUNT_FIELD_NUMBER = 3; + private int sessionCount_; + /** + * + * + *
+   * Required. The number of sessions to be created in this batch call.
+   * The API may return fewer than the requested number of sessions. If a
+   * specific number of sessions are desired, the client can make additional
+   * calls to BatchCreateSessions (adjusting
+   * [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
+   * as necessary).
+   * 
+ * + * int32 session_count = 3; + */ + public int getSessionCount() { + return sessionCount_; + } + + 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 (!getDatabaseBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + } + if (sessionTemplate_ != null) { + output.writeMessage(2, getSessionTemplate()); + } + if (sessionCount_ != 0) { + output.writeInt32(3, sessionCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatabaseBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + } + if (sessionTemplate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSessionTemplate()); + } + if (sessionCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, sessionCount_); + } + 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.BatchCreateSessionsRequest)) { + return super.equals(obj); + } + com.google.spanner.v1.BatchCreateSessionsRequest other = + (com.google.spanner.v1.BatchCreateSessionsRequest) obj; + + if (!getDatabase().equals(other.getDatabase())) return false; + if (hasSessionTemplate() != other.hasSessionTemplate()) return false; + if (hasSessionTemplate()) { + if (!getSessionTemplate().equals(other.getSessionTemplate())) return false; + } + if (getSessionCount() != other.getSessionCount()) 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) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + if (hasSessionTemplate()) { + hash = (37 * hash) + SESSION_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getSessionTemplate().hashCode(); + } + hash = (37 * hash) + SESSION_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getSessionCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.BatchCreateSessionsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchCreateSessionsRequest 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.BatchCreateSessionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchCreateSessionsRequest 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.BatchCreateSessionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchCreateSessionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.BatchCreateSessionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchCreateSessionsRequest 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.BatchCreateSessionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchCreateSessionsRequest 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.BatchCreateSessionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchCreateSessionsRequest 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.BatchCreateSessionsRequest 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; + } + /** + * + * + *
+   * The request for
+   * [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].
+   * 
+ * + * Protobuf type {@code google.spanner.v1.BatchCreateSessionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.BatchCreateSessionsRequest) + com.google.spanner.v1.BatchCreateSessionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchCreateSessionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchCreateSessionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.BatchCreateSessionsRequest.class, + com.google.spanner.v1.BatchCreateSessionsRequest.Builder.class); + } + + // Construct using com.google.spanner.v1.BatchCreateSessionsRequest.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(); + database_ = ""; + + if (sessionTemplateBuilder_ == null) { + sessionTemplate_ = null; + } else { + sessionTemplate_ = null; + sessionTemplateBuilder_ = null; + } + sessionCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchCreateSessionsRequest_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.BatchCreateSessionsRequest getDefaultInstanceForType() { + return com.google.spanner.v1.BatchCreateSessionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.BatchCreateSessionsRequest build() { + com.google.spanner.v1.BatchCreateSessionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.BatchCreateSessionsRequest buildPartial() { + com.google.spanner.v1.BatchCreateSessionsRequest result = + new com.google.spanner.v1.BatchCreateSessionsRequest(this); + result.database_ = database_; + if (sessionTemplateBuilder_ == null) { + result.sessionTemplate_ = sessionTemplate_; + } else { + result.sessionTemplate_ = sessionTemplateBuilder_.build(); + } + result.sessionCount_ = sessionCount_; + 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.BatchCreateSessionsRequest) { + return mergeFrom((com.google.spanner.v1.BatchCreateSessionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.BatchCreateSessionsRequest other) { + if (other == com.google.spanner.v1.BatchCreateSessionsRequest.getDefaultInstance()) + return this; + if (!other.getDatabase().isEmpty()) { + database_ = other.database_; + onChanged(); + } + if (other.hasSessionTemplate()) { + mergeSessionTemplate(other.getSessionTemplate()); + } + if (other.getSessionCount() != 0) { + setSessionCount(other.getSessionCount()); + } + 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.BatchCreateSessionsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.spanner.v1.BatchCreateSessionsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object database_ = ""; + /** + * + * + *
+     * Required. The database in which the new sessions are created.
+     * 
+ * + * string database = 1; + */ + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The database in which the new sessions are created.
+     * 
+ * + * string database = 1; + */ + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The database in which the new sessions are created.
+     * 
+ * + * string database = 1; + */ + public Builder setDatabase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + database_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The database in which the new sessions are created.
+     * 
+ * + * string database = 1; + */ + public Builder clearDatabase() { + + database_ = getDefaultInstance().getDatabase(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The database in which the new sessions are created.
+     * 
+ * + * string database = 1; + */ + public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + database_ = value; + onChanged(); + return this; + } + + private com.google.spanner.v1.Session sessionTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.Session, + com.google.spanner.v1.Session.Builder, + com.google.spanner.v1.SessionOrBuilder> + sessionTemplateBuilder_; + /** + * + * + *
+     * Parameters to be applied to each created session.
+     * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + public boolean hasSessionTemplate() { + return sessionTemplateBuilder_ != null || sessionTemplate_ != null; + } + /** + * + * + *
+     * Parameters to be applied to each created session.
+     * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + public com.google.spanner.v1.Session getSessionTemplate() { + if (sessionTemplateBuilder_ == null) { + return sessionTemplate_ == null + ? com.google.spanner.v1.Session.getDefaultInstance() + : sessionTemplate_; + } else { + return sessionTemplateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Parameters to be applied to each created session.
+     * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + public Builder setSessionTemplate(com.google.spanner.v1.Session value) { + if (sessionTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sessionTemplate_ = value; + onChanged(); + } else { + sessionTemplateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Parameters to be applied to each created session.
+     * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + public Builder setSessionTemplate(com.google.spanner.v1.Session.Builder builderForValue) { + if (sessionTemplateBuilder_ == null) { + sessionTemplate_ = builderForValue.build(); + onChanged(); + } else { + sessionTemplateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Parameters to be applied to each created session.
+     * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + public Builder mergeSessionTemplate(com.google.spanner.v1.Session value) { + if (sessionTemplateBuilder_ == null) { + if (sessionTemplate_ != null) { + sessionTemplate_ = + com.google.spanner.v1.Session.newBuilder(sessionTemplate_) + .mergeFrom(value) + .buildPartial(); + } else { + sessionTemplate_ = value; + } + onChanged(); + } else { + sessionTemplateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Parameters to be applied to each created session.
+     * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + public Builder clearSessionTemplate() { + if (sessionTemplateBuilder_ == null) { + sessionTemplate_ = null; + onChanged(); + } else { + sessionTemplate_ = null; + sessionTemplateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Parameters to be applied to each created session.
+     * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + public com.google.spanner.v1.Session.Builder getSessionTemplateBuilder() { + + onChanged(); + return getSessionTemplateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Parameters to be applied to each created session.
+     * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + public com.google.spanner.v1.SessionOrBuilder getSessionTemplateOrBuilder() { + if (sessionTemplateBuilder_ != null) { + return sessionTemplateBuilder_.getMessageOrBuilder(); + } else { + return sessionTemplate_ == null + ? com.google.spanner.v1.Session.getDefaultInstance() + : sessionTemplate_; + } + } + /** + * + * + *
+     * Parameters to be applied to each created session.
+     * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.Session, + com.google.spanner.v1.Session.Builder, + com.google.spanner.v1.SessionOrBuilder> + getSessionTemplateFieldBuilder() { + if (sessionTemplateBuilder_ == null) { + sessionTemplateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.Session, + com.google.spanner.v1.Session.Builder, + com.google.spanner.v1.SessionOrBuilder>( + getSessionTemplate(), getParentForChildren(), isClean()); + sessionTemplate_ = null; + } + return sessionTemplateBuilder_; + } + + private int sessionCount_; + /** + * + * + *
+     * Required. The number of sessions to be created in this batch call.
+     * The API may return fewer than the requested number of sessions. If a
+     * specific number of sessions are desired, the client can make additional
+     * calls to BatchCreateSessions (adjusting
+     * [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
+     * as necessary).
+     * 
+ * + * int32 session_count = 3; + */ + public int getSessionCount() { + return sessionCount_; + } + /** + * + * + *
+     * Required. The number of sessions to be created in this batch call.
+     * The API may return fewer than the requested number of sessions. If a
+     * specific number of sessions are desired, the client can make additional
+     * calls to BatchCreateSessions (adjusting
+     * [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
+     * as necessary).
+     * 
+ * + * int32 session_count = 3; + */ + public Builder setSessionCount(int value) { + + sessionCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The number of sessions to be created in this batch call.
+     * The API may return fewer than the requested number of sessions. If a
+     * specific number of sessions are desired, the client can make additional
+     * calls to BatchCreateSessions (adjusting
+     * [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
+     * as necessary).
+     * 
+ * + * int32 session_count = 3; + */ + public Builder clearSessionCount() { + + sessionCount_ = 0; + 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.BatchCreateSessionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.BatchCreateSessionsRequest) + private static final com.google.spanner.v1.BatchCreateSessionsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.BatchCreateSessionsRequest(); + } + + public static com.google.spanner.v1.BatchCreateSessionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateSessionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchCreateSessionsRequest(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.BatchCreateSessionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequestOrBuilder.java new file mode 100644 index 000000000000..64c54e21bbe1 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequestOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/spanner.proto + +package com.google.spanner.v1; + +public interface BatchCreateSessionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.BatchCreateSessionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The database in which the new sessions are created.
+   * 
+ * + * string database = 1; + */ + java.lang.String getDatabase(); + /** + * + * + *
+   * Required. The database in which the new sessions are created.
+   * 
+ * + * string database = 1; + */ + com.google.protobuf.ByteString getDatabaseBytes(); + + /** + * + * + *
+   * Parameters to be applied to each created session.
+   * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + boolean hasSessionTemplate(); + /** + * + * + *
+   * Parameters to be applied to each created session.
+   * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + com.google.spanner.v1.Session getSessionTemplate(); + /** + * + * + *
+   * Parameters to be applied to each created session.
+   * 
+ * + * .google.spanner.v1.Session session_template = 2; + */ + com.google.spanner.v1.SessionOrBuilder getSessionTemplateOrBuilder(); + + /** + * + * + *
+   * Required. The number of sessions to be created in this batch call.
+   * The API may return fewer than the requested number of sessions. If a
+   * specific number of sessions are desired, the client can make additional
+   * calls to BatchCreateSessions (adjusting
+   * [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
+   * as necessary).
+   * 
+ * + * int32 session_count = 3; + */ + int getSessionCount(); +} diff --git a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponse.java b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponse.java new file mode 100644 index 000000000000..acb48fdc617f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponse.java @@ -0,0 +1,921 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/spanner.proto + +package com.google.spanner.v1; + +/** + * + * + *
+ * The response for
+ * [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].
+ * 
+ * + * Protobuf type {@code google.spanner.v1.BatchCreateSessionsResponse} + */ +public final class BatchCreateSessionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.BatchCreateSessionsResponse) + BatchCreateSessionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchCreateSessionsResponse.newBuilder() to construct. + private BatchCreateSessionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchCreateSessionsResponse() { + session_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchCreateSessionsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + session_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + session_.add( + input.readMessage(com.google.spanner.v1.Session.parser(), extensionRegistry)); + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + session_ = java.util.Collections.unmodifiableList(session_); + } + 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_BatchCreateSessionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchCreateSessionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.BatchCreateSessionsResponse.class, + com.google.spanner.v1.BatchCreateSessionsResponse.Builder.class); + } + + public static final int SESSION_FIELD_NUMBER = 1; + private java.util.List session_; + /** + * + * + *
+   * The freshly created sessions.
+   * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public java.util.List getSessionList() { + return session_; + } + /** + * + * + *
+   * The freshly created sessions.
+   * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public java.util.List + getSessionOrBuilderList() { + return session_; + } + /** + * + * + *
+   * The freshly created sessions.
+   * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public int getSessionCount() { + return session_.size(); + } + /** + * + * + *
+   * The freshly created sessions.
+   * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public com.google.spanner.v1.Session getSession(int index) { + return session_.get(index); + } + /** + * + * + *
+   * The freshly created sessions.
+   * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public com.google.spanner.v1.SessionOrBuilder getSessionOrBuilder(int index) { + return session_.get(index); + } + + 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 { + for (int i = 0; i < session_.size(); i++) { + output.writeMessage(1, session_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < session_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, session_.get(i)); + } + 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.BatchCreateSessionsResponse)) { + return super.equals(obj); + } + com.google.spanner.v1.BatchCreateSessionsResponse other = + (com.google.spanner.v1.BatchCreateSessionsResponse) obj; + + if (!getSessionList().equals(other.getSessionList())) 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(); + if (getSessionCount() > 0) { + hash = (37 * hash) + SESSION_FIELD_NUMBER; + hash = (53 * hash) + getSessionList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.BatchCreateSessionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchCreateSessionsResponse 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.BatchCreateSessionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchCreateSessionsResponse 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.BatchCreateSessionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchCreateSessionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.BatchCreateSessionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchCreateSessionsResponse 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.BatchCreateSessionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchCreateSessionsResponse 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.BatchCreateSessionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchCreateSessionsResponse 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.BatchCreateSessionsResponse 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; + } + /** + * + * + *
+   * The response for
+   * [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].
+   * 
+ * + * Protobuf type {@code google.spanner.v1.BatchCreateSessionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.BatchCreateSessionsResponse) + com.google.spanner.v1.BatchCreateSessionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchCreateSessionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchCreateSessionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.BatchCreateSessionsResponse.class, + com.google.spanner.v1.BatchCreateSessionsResponse.Builder.class); + } + + // Construct using com.google.spanner.v1.BatchCreateSessionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSessionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (sessionBuilder_ == null) { + session_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + sessionBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchCreateSessionsResponse_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.BatchCreateSessionsResponse getDefaultInstanceForType() { + return com.google.spanner.v1.BatchCreateSessionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.BatchCreateSessionsResponse build() { + com.google.spanner.v1.BatchCreateSessionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.BatchCreateSessionsResponse buildPartial() { + com.google.spanner.v1.BatchCreateSessionsResponse result = + new com.google.spanner.v1.BatchCreateSessionsResponse(this); + int from_bitField0_ = bitField0_; + if (sessionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + session_ = java.util.Collections.unmodifiableList(session_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.session_ = session_; + } else { + result.session_ = sessionBuilder_.build(); + } + 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.BatchCreateSessionsResponse) { + return mergeFrom((com.google.spanner.v1.BatchCreateSessionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.BatchCreateSessionsResponse other) { + if (other == com.google.spanner.v1.BatchCreateSessionsResponse.getDefaultInstance()) + return this; + if (sessionBuilder_ == null) { + if (!other.session_.isEmpty()) { + if (session_.isEmpty()) { + session_ = other.session_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSessionIsMutable(); + session_.addAll(other.session_); + } + onChanged(); + } + } else { + if (!other.session_.isEmpty()) { + if (sessionBuilder_.isEmpty()) { + sessionBuilder_.dispose(); + sessionBuilder_ = null; + session_ = other.session_; + bitField0_ = (bitField0_ & ~0x00000001); + sessionBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSessionFieldBuilder() + : null; + } else { + sessionBuilder_.addAllMessages(other.session_); + } + } + } + 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.BatchCreateSessionsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.spanner.v1.BatchCreateSessionsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List session_ = + java.util.Collections.emptyList(); + + private void ensureSessionIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + session_ = new java.util.ArrayList(session_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.Session, + com.google.spanner.v1.Session.Builder, + com.google.spanner.v1.SessionOrBuilder> + sessionBuilder_; + + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public java.util.List getSessionList() { + if (sessionBuilder_ == null) { + return java.util.Collections.unmodifiableList(session_); + } else { + return sessionBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public int getSessionCount() { + if (sessionBuilder_ == null) { + return session_.size(); + } else { + return sessionBuilder_.getCount(); + } + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public com.google.spanner.v1.Session getSession(int index) { + if (sessionBuilder_ == null) { + return session_.get(index); + } else { + return sessionBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public Builder setSession(int index, com.google.spanner.v1.Session value) { + if (sessionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSessionIsMutable(); + session_.set(index, value); + onChanged(); + } else { + sessionBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public Builder setSession(int index, com.google.spanner.v1.Session.Builder builderForValue) { + if (sessionBuilder_ == null) { + ensureSessionIsMutable(); + session_.set(index, builderForValue.build()); + onChanged(); + } else { + sessionBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public Builder addSession(com.google.spanner.v1.Session value) { + if (sessionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSessionIsMutable(); + session_.add(value); + onChanged(); + } else { + sessionBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public Builder addSession(int index, com.google.spanner.v1.Session value) { + if (sessionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSessionIsMutable(); + session_.add(index, value); + onChanged(); + } else { + sessionBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public Builder addSession(com.google.spanner.v1.Session.Builder builderForValue) { + if (sessionBuilder_ == null) { + ensureSessionIsMutable(); + session_.add(builderForValue.build()); + onChanged(); + } else { + sessionBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public Builder addSession(int index, com.google.spanner.v1.Session.Builder builderForValue) { + if (sessionBuilder_ == null) { + ensureSessionIsMutable(); + session_.add(index, builderForValue.build()); + onChanged(); + } else { + sessionBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public Builder addAllSession( + java.lang.Iterable values) { + if (sessionBuilder_ == null) { + ensureSessionIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, session_); + onChanged(); + } else { + sessionBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public Builder clearSession() { + if (sessionBuilder_ == null) { + session_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sessionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public Builder removeSession(int index) { + if (sessionBuilder_ == null) { + ensureSessionIsMutable(); + session_.remove(index); + onChanged(); + } else { + sessionBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public com.google.spanner.v1.Session.Builder getSessionBuilder(int index) { + return getSessionFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public com.google.spanner.v1.SessionOrBuilder getSessionOrBuilder(int index) { + if (sessionBuilder_ == null) { + return session_.get(index); + } else { + return sessionBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public java.util.List + getSessionOrBuilderList() { + if (sessionBuilder_ != null) { + return sessionBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(session_); + } + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public com.google.spanner.v1.Session.Builder addSessionBuilder() { + return getSessionFieldBuilder() + .addBuilder(com.google.spanner.v1.Session.getDefaultInstance()); + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public com.google.spanner.v1.Session.Builder addSessionBuilder(int index) { + return getSessionFieldBuilder() + .addBuilder(index, com.google.spanner.v1.Session.getDefaultInstance()); + } + /** + * + * + *
+     * The freshly created sessions.
+     * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + public java.util.List getSessionBuilderList() { + return getSessionFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.Session, + com.google.spanner.v1.Session.Builder, + com.google.spanner.v1.SessionOrBuilder> + getSessionFieldBuilder() { + if (sessionBuilder_ == null) { + sessionBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.Session, + com.google.spanner.v1.Session.Builder, + com.google.spanner.v1.SessionOrBuilder>( + session_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + session_ = null; + } + return sessionBuilder_; + } + + @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.BatchCreateSessionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.BatchCreateSessionsResponse) + private static final com.google.spanner.v1.BatchCreateSessionsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.BatchCreateSessionsResponse(); + } + + public static com.google.spanner.v1.BatchCreateSessionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchCreateSessionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchCreateSessionsResponse(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.BatchCreateSessionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponseOrBuilder.java new file mode 100644 index 000000000000..24207b8e17a1 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponseOrBuilder.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/spanner.proto + +package com.google.spanner.v1; + +public interface BatchCreateSessionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.BatchCreateSessionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The freshly created sessions.
+   * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + java.util.List getSessionList(); + /** + * + * + *
+   * The freshly created sessions.
+   * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + com.google.spanner.v1.Session getSession(int index); + /** + * + * + *
+   * The freshly created sessions.
+   * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + int getSessionCount(); + /** + * + * + *
+   * The freshly created sessions.
+   * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + java.util.List getSessionOrBuilderList(); + /** + * + * + *
+   * The freshly created sessions.
+   * 
+ * + * repeated .google.spanner.v1.Session session = 1; + */ + com.google.spanner.v1.SessionOrBuilder getSessionOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java index c490eca6a52c..3ed9ce94db64 100644 --- a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java +++ b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java @@ -223,7 +223,9 @@ public interface StatementOrBuilder *
      * It is not always possible for Cloud Spanner to infer the right SQL type
      * from a JSON value.  For example, values of type `BYTES` and values
-     * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+     * of type `STRING` both appear in
+     * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+     * JSON strings.
      * In these cases, `param_types` can be used to specify the exact
      * SQL type for some or all of the SQL statement parameters. See the
      * definition of [Type][google.spanner.v1.Type] for more information
@@ -239,7 +241,9 @@ public interface StatementOrBuilder
      * 
      * It is not always possible for Cloud Spanner to infer the right SQL type
      * from a JSON value.  For example, values of type `BYTES` and values
-     * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+     * of type `STRING` both appear in
+     * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+     * JSON strings.
      * In these cases, `param_types` can be used to specify the exact
      * SQL type for some or all of the SQL statement parameters. See the
      * definition of [Type][google.spanner.v1.Type] for more information
@@ -258,7 +262,9 @@ public interface StatementOrBuilder
      * 
      * It is not always possible for Cloud Spanner to infer the right SQL type
      * from a JSON value.  For example, values of type `BYTES` and values
-     * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+     * of type `STRING` both appear in
+     * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+     * JSON strings.
      * In these cases, `param_types` can be used to specify the exact
      * SQL type for some or all of the SQL statement parameters. See the
      * definition of [Type][google.spanner.v1.Type] for more information
@@ -274,7 +280,9 @@ public interface StatementOrBuilder
      * 
      * It is not always possible for Cloud Spanner to infer the right SQL type
      * from a JSON value.  For example, values of type `BYTES` and values
-     * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+     * of type `STRING` both appear in
+     * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+     * JSON strings.
      * In these cases, `param_types` can be used to specify the exact
      * SQL type for some or all of the SQL statement parameters. See the
      * definition of [Type][google.spanner.v1.Type] for more information
@@ -291,7 +299,9 @@ com.google.spanner.v1.Type getParamTypesOrDefault(
      * 
      * It is not always possible for Cloud Spanner to infer the right SQL type
      * from a JSON value.  For example, values of type `BYTES` and values
-     * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+     * of type `STRING` both appear in
+     * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+     * JSON strings.
      * In these cases, `param_types` can be used to specify the exact
      * SQL type for some or all of the SQL statement parameters. See the
      * definition of [Type][google.spanner.v1.Type] for more information
@@ -579,7 +589,9 @@ public int getParamTypesCount() {
      * 
      * It is not always possible for Cloud Spanner to infer the right SQL type
      * from a JSON value.  For example, values of type `BYTES` and values
-     * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+     * of type `STRING` both appear in
+     * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+     * JSON strings.
      * In these cases, `param_types` can be used to specify the exact
      * SQL type for some or all of the SQL statement parameters. See the
      * definition of [Type][google.spanner.v1.Type] for more information
@@ -605,7 +617,9 @@ public java.util.Map getParamTypes
      * 
      * It is not always possible for Cloud Spanner to infer the right SQL type
      * from a JSON value.  For example, values of type `BYTES` and values
-     * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+     * of type `STRING` both appear in
+     * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+     * JSON strings.
      * In these cases, `param_types` can be used to specify the exact
      * SQL type for some or all of the SQL statement parameters. See the
      * definition of [Type][google.spanner.v1.Type] for more information
@@ -623,7 +637,9 @@ public java.util.Map getParamTypes
      * 
      * It is not always possible for Cloud Spanner to infer the right SQL type
      * from a JSON value.  For example, values of type `BYTES` and values
-     * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+     * of type `STRING` both appear in
+     * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+     * JSON strings.
      * In these cases, `param_types` can be used to specify the exact
      * SQL type for some or all of the SQL statement parameters. See the
      * definition of [Type][google.spanner.v1.Type] for more information
@@ -647,7 +663,9 @@ public com.google.spanner.v1.Type getParamTypesOrDefault(
      * 
      * It is not always possible for Cloud Spanner to infer the right SQL type
      * from a JSON value.  For example, values of type `BYTES` and values
-     * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+     * of type `STRING` both appear in
+     * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+     * JSON strings.
      * In these cases, `param_types` can be used to specify the exact
      * SQL type for some or all of the SQL statement parameters. See the
      * definition of [Type][google.spanner.v1.Type] for more information
@@ -1459,7 +1477,9 @@ public int getParamTypesCount() {
        * 
        * It is not always possible for Cloud Spanner to infer the right SQL type
        * from a JSON value.  For example, values of type `BYTES` and values
-       * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+       * of type `STRING` both appear in
+       * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+       * JSON strings.
        * In these cases, `param_types` can be used to specify the exact
        * SQL type for some or all of the SQL statement parameters. See the
        * definition of [Type][google.spanner.v1.Type] for more information
@@ -1485,7 +1505,9 @@ public java.util.Map getParamTypes
        * 
        * It is not always possible for Cloud Spanner to infer the right SQL type
        * from a JSON value.  For example, values of type `BYTES` and values
-       * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+       * of type `STRING` both appear in
+       * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+       * JSON strings.
        * In these cases, `param_types` can be used to specify the exact
        * SQL type for some or all of the SQL statement parameters. See the
        * definition of [Type][google.spanner.v1.Type] for more information
@@ -1503,7 +1525,9 @@ public java.util.Map getParamTypes
        * 
        * It is not always possible for Cloud Spanner to infer the right SQL type
        * from a JSON value.  For example, values of type `BYTES` and values
-       * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+       * of type `STRING` both appear in
+       * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+       * JSON strings.
        * In these cases, `param_types` can be used to specify the exact
        * SQL type for some or all of the SQL statement parameters. See the
        * definition of [Type][google.spanner.v1.Type] for more information
@@ -1527,7 +1551,9 @@ public com.google.spanner.v1.Type getParamTypesOrDefault(
        * 
        * It is not always possible for Cloud Spanner to infer the right SQL type
        * from a JSON value.  For example, values of type `BYTES` and values
-       * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+       * of type `STRING` both appear in
+       * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+       * JSON strings.
        * In these cases, `param_types` can be used to specify the exact
        * SQL type for some or all of the SQL statement parameters. See the
        * definition of [Type][google.spanner.v1.Type] for more information
@@ -1558,7 +1584,9 @@ public Builder clearParamTypes() {
        * 
        * It is not always possible for Cloud Spanner to infer the right SQL type
        * from a JSON value.  For example, values of type `BYTES` and values
-       * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+       * of type `STRING` both appear in
+       * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+       * JSON strings.
        * In these cases, `param_types` can be used to specify the exact
        * SQL type for some or all of the SQL statement parameters. See the
        * definition of [Type][google.spanner.v1.Type] for more information
@@ -1585,7 +1613,9 @@ public java.util.Map getMutablePar
        * 
        * It is not always possible for Cloud Spanner to infer the right SQL type
        * from a JSON value.  For example, values of type `BYTES` and values
-       * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+       * of type `STRING` both appear in
+       * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+       * JSON strings.
        * In these cases, `param_types` can be used to specify the exact
        * SQL type for some or all of the SQL statement parameters. See the
        * definition of [Type][google.spanner.v1.Type] for more information
@@ -1610,7 +1640,9 @@ public Builder putParamTypes(java.lang.String key, com.google.spanner.v1.Type va
        * 
        * It is not always possible for Cloud Spanner to infer the right SQL type
        * from a JSON value.  For example, values of type `BYTES` and values
-       * of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+       * of type `STRING` both appear in
+       * [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+       * JSON strings.
        * In these cases, `param_types` can be used to specify the exact
        * SQL type for some or all of the SQL statement parameters. See the
        * definition of [Type][google.spanner.v1.Type] for more information
diff --git a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponse.java b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponse.java
index fe7ec065e240..ed979606bfea 100644
--- a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponse.java
+++ b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponse.java
@@ -7,11 +7,13 @@
  *
  *
  * 
- * The response for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a list
- * of [ResultSet][google.spanner.v1.ResultSet], one for each DML statement that has successfully executed.
- * If a statement fails, the error is returned as part of the response payload.
- * Clients can determine whether all DML statements have run successfully, or if
- * a statement failed, using one of the following approaches:
+ * The response for
+ * [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a list
+ * of [ResultSet][google.spanner.v1.ResultSet], one for each DML statement that
+ * has successfully executed. If a statement fails, the error is returned as
+ * part of the response payload. Clients can determine whether all DML
+ * statements have run successfully, or if a statement failed, using one of the
+ * following approaches:
  *   1. Check if 'status' field is OkStatus.
  *   2. Check if result_sets_size() equals the number of statements in
  *      [ExecuteBatchDmlRequest][Spanner.ExecuteBatchDmlRequest].
@@ -134,9 +136,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    * 
    * ResultSets, one for each statement in the request that ran successfully, in
-   * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-   * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-   * contain the number of rows modified by the statement.
+   * the same order as the statements in the request. Each
+   * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+   * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+   * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+   * modified by the statement.
    * Only the first ResultSet in the response contains a valid
    * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
    * 
@@ -151,9 +155,11 @@ public java.util.List getResultSetsList() { * *
    * ResultSets, one for each statement in the request that ran successfully, in
-   * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-   * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-   * contain the number of rows modified by the statement.
+   * the same order as the statements in the request. Each
+   * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+   * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+   * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+   * modified by the statement.
    * Only the first ResultSet in the response contains a valid
    * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
    * 
@@ -169,9 +175,11 @@ public java.util.List getResultSetsList() { * *
    * ResultSets, one for each statement in the request that ran successfully, in
-   * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-   * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-   * contain the number of rows modified by the statement.
+   * the same order as the statements in the request. Each
+   * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+   * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+   * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+   * modified by the statement.
    * Only the first ResultSet in the response contains a valid
    * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
    * 
@@ -186,9 +194,11 @@ public int getResultSetsCount() { * *
    * ResultSets, one for each statement in the request that ran successfully, in
-   * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-   * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-   * contain the number of rows modified by the statement.
+   * the same order as the statements in the request. Each
+   * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+   * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+   * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+   * modified by the statement.
    * Only the first ResultSet in the response contains a valid
    * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
    * 
@@ -203,9 +213,11 @@ public com.google.spanner.v1.ResultSet getResultSets(int index) { * *
    * ResultSets, one for each statement in the request that ran successfully, in
-   * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-   * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-   * contain the number of rows modified by the statement.
+   * the same order as the statements in the request. Each
+   * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+   * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+   * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+   * modified by the statement.
    * Only the first ResultSet in the response contains a valid
    * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
    * 
@@ -437,11 +449,13 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The response for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a list
-   * of [ResultSet][google.spanner.v1.ResultSet], one for each DML statement that has successfully executed.
-   * If a statement fails, the error is returned as part of the response payload.
-   * Clients can determine whether all DML statements have run successfully, or if
-   * a statement failed, using one of the following approaches:
+   * The response for
+   * [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a list
+   * of [ResultSet][google.spanner.v1.ResultSet], one for each DML statement that
+   * has successfully executed. If a statement fails, the error is returned as
+   * part of the response payload. Clients can determine whether all DML
+   * statements have run successfully, or if a statement failed, using one of the
+   * following approaches:
    *   1. Check if 'status' field is OkStatus.
    *   2. Check if result_sets_size() equals the number of statements in
    *      [ExecuteBatchDmlRequest][Spanner.ExecuteBatchDmlRequest].
@@ -682,9 +696,11 @@ private void ensureResultSetsIsMutable() {
      *
      * 
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -703,9 +719,11 @@ public java.util.List getResultSetsList() { * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -724,9 +742,11 @@ public int getResultSetsCount() { * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -745,9 +765,11 @@ public com.google.spanner.v1.ResultSet getResultSets(int index) { * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -772,9 +794,11 @@ public Builder setResultSets(int index, com.google.spanner.v1.ResultSet value) { * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -797,9 +821,11 @@ public Builder setResultSets( * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -824,9 +850,11 @@ public Builder addResultSets(com.google.spanner.v1.ResultSet value) { * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -851,9 +879,11 @@ public Builder addResultSets(int index, com.google.spanner.v1.ResultSet value) { * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -875,9 +905,11 @@ public Builder addResultSets(com.google.spanner.v1.ResultSet.Builder builderForV * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -900,9 +932,11 @@ public Builder addResultSets( * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -925,9 +959,11 @@ public Builder addAllResultSets( * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -949,9 +985,11 @@ public Builder clearResultSets() { * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -973,9 +1011,11 @@ public Builder removeResultSets(int index) { * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -990,9 +1030,11 @@ public com.google.spanner.v1.ResultSet.Builder getResultSetsBuilder(int index) { * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -1011,9 +1053,11 @@ public com.google.spanner.v1.ResultSetOrBuilder getResultSetsOrBuilder(int index * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -1033,9 +1077,11 @@ public com.google.spanner.v1.ResultSetOrBuilder getResultSetsOrBuilder(int index * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -1051,9 +1097,11 @@ public com.google.spanner.v1.ResultSet.Builder addResultSetsBuilder() { * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
@@ -1069,9 +1117,11 @@ public com.google.spanner.v1.ResultSet.Builder addResultSetsBuilder(int index) { * *
      * ResultSets, one for each statement in the request that ran successfully, in
-     * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-     * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-     * contain the number of rows modified by the statement.
+     * the same order as the statements in the request. Each
+     * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+     * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+     * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+     * modified by the statement.
      * Only the first ResultSet in the response contains a valid
      * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
      * 
diff --git a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponseOrBuilder.java index 70ee20ca9fa5..f6aadf358c9c 100644 --- a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponseOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponseOrBuilder.java @@ -13,9 +13,11 @@ public interface ExecuteBatchDmlResponseOrBuilder * *
    * ResultSets, one for each statement in the request that ran successfully, in
-   * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-   * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-   * contain the number of rows modified by the statement.
+   * the same order as the statements in the request. Each
+   * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+   * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+   * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+   * modified by the statement.
    * Only the first ResultSet in the response contains a valid
    * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
    * 
@@ -28,9 +30,11 @@ public interface ExecuteBatchDmlResponseOrBuilder * *
    * ResultSets, one for each statement in the request that ran successfully, in
-   * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-   * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-   * contain the number of rows modified by the statement.
+   * the same order as the statements in the request. Each
+   * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+   * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+   * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+   * modified by the statement.
    * Only the first ResultSet in the response contains a valid
    * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
    * 
@@ -43,9 +47,11 @@ public interface ExecuteBatchDmlResponseOrBuilder * *
    * ResultSets, one for each statement in the request that ran successfully, in
-   * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-   * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-   * contain the number of rows modified by the statement.
+   * the same order as the statements in the request. Each
+   * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+   * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+   * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+   * modified by the statement.
    * Only the first ResultSet in the response contains a valid
    * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
    * 
@@ -58,9 +64,11 @@ public interface ExecuteBatchDmlResponseOrBuilder * *
    * ResultSets, one for each statement in the request that ran successfully, in
-   * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-   * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-   * contain the number of rows modified by the statement.
+   * the same order as the statements in the request. Each
+   * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+   * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+   * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+   * modified by the statement.
    * Only the first ResultSet in the response contains a valid
    * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
    * 
@@ -73,9 +81,11 @@ public interface ExecuteBatchDmlResponseOrBuilder * *
    * ResultSets, one for each statement in the request that ran successfully, in
-   * the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-   * not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-   * contain the number of rows modified by the statement.
+   * the same order as the statements in the request. Each
+   * [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+   * [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+   * [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+   * modified by the statement.
    * Only the first ResultSet in the response contains a valid
    * [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
    * 
diff --git a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java index 51c4ff16f00d..10ecb16886c1 100644 --- a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java +++ b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java @@ -381,8 +381,6 @@ public com.google.protobuf.ByteString getSessionBytes() { * * *
-   * The transaction to use. If none is provided, the default is a
-   * temporary read-only transaction with strong concurrency.
    * The transaction to use.
    * For queries, if none is provided, the default is a temporary read-only
    * transaction with strong concurrency.
@@ -401,8 +399,6 @@ public boolean hasTransaction() {
    *
    *
    * 
-   * The transaction to use. If none is provided, the default is a
-   * temporary read-only transaction with strong concurrency.
    * The transaction to use.
    * For queries, if none is provided, the default is a temporary read-only
    * transaction with strong concurrency.
@@ -423,8 +419,6 @@ public com.google.spanner.v1.TransactionSelector getTransaction() {
    *
    *
    * 
-   * The transaction to use. If none is provided, the default is a
-   * temporary read-only transaction with strong concurrency.
    * The transaction to use.
    * For queries, if none is provided, the default is a temporary read-only
    * transaction with strong concurrency.
@@ -1377,8 +1371,6 @@ public Builder setSessionBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * The transaction to use. If none is provided, the default is a
-     * temporary read-only transaction with strong concurrency.
      * The transaction to use.
      * For queries, if none is provided, the default is a temporary read-only
      * transaction with strong concurrency.
@@ -1397,8 +1389,6 @@ public boolean hasTransaction() {
      *
      *
      * 
-     * The transaction to use. If none is provided, the default is a
-     * temporary read-only transaction with strong concurrency.
      * The transaction to use.
      * For queries, if none is provided, the default is a temporary read-only
      * transaction with strong concurrency.
@@ -1423,8 +1413,6 @@ public com.google.spanner.v1.TransactionSelector getTransaction() {
      *
      *
      * 
-     * The transaction to use. If none is provided, the default is a
-     * temporary read-only transaction with strong concurrency.
      * The transaction to use.
      * For queries, if none is provided, the default is a temporary read-only
      * transaction with strong concurrency.
@@ -1453,8 +1441,6 @@ public Builder setTransaction(com.google.spanner.v1.TransactionSelector value) {
      *
      *
      * 
-     * The transaction to use. If none is provided, the default is a
-     * temporary read-only transaction with strong concurrency.
      * The transaction to use.
      * For queries, if none is provided, the default is a temporary read-only
      * transaction with strong concurrency.
@@ -1481,8 +1467,6 @@ public Builder setTransaction(
      *
      *
      * 
-     * The transaction to use. If none is provided, the default is a
-     * temporary read-only transaction with strong concurrency.
      * The transaction to use.
      * For queries, if none is provided, the default is a temporary read-only
      * transaction with strong concurrency.
@@ -1515,8 +1499,6 @@ public Builder mergeTransaction(com.google.spanner.v1.TransactionSelector value)
      *
      *
      * 
-     * The transaction to use. If none is provided, the default is a
-     * temporary read-only transaction with strong concurrency.
      * The transaction to use.
      * For queries, if none is provided, the default is a temporary read-only
      * transaction with strong concurrency.
@@ -1543,8 +1525,6 @@ public Builder clearTransaction() {
      *
      *
      * 
-     * The transaction to use. If none is provided, the default is a
-     * temporary read-only transaction with strong concurrency.
      * The transaction to use.
      * For queries, if none is provided, the default is a temporary read-only
      * transaction with strong concurrency.
@@ -1565,8 +1545,6 @@ public com.google.spanner.v1.TransactionSelector.Builder getTransactionBuilder()
      *
      *
      * 
-     * The transaction to use. If none is provided, the default is a
-     * temporary read-only transaction with strong concurrency.
      * The transaction to use.
      * For queries, if none is provided, the default is a temporary read-only
      * transaction with strong concurrency.
@@ -1591,8 +1569,6 @@ public com.google.spanner.v1.TransactionSelectorOrBuilder getTransactionOrBuilde
      *
      *
      * 
-     * The transaction to use. If none is provided, the default is a
-     * temporary read-only transaction with strong concurrency.
      * The transaction to use.
      * For queries, if none is provided, the default is a temporary read-only
      * transaction with strong concurrency.
diff --git a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java
index 215fc8f9a374..999a22b91d39 100644
--- a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java
+++ b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java
@@ -33,8 +33,6 @@ public interface ExecuteSqlRequestOrBuilder
    *
    *
    * 
-   * The transaction to use. If none is provided, the default is a
-   * temporary read-only transaction with strong concurrency.
    * The transaction to use.
    * For queries, if none is provided, the default is a temporary read-only
    * transaction with strong concurrency.
@@ -51,8 +49,6 @@ public interface ExecuteSqlRequestOrBuilder
    *
    *
    * 
-   * The transaction to use. If none is provided, the default is a
-   * temporary read-only transaction with strong concurrency.
    * The transaction to use.
    * For queries, if none is provided, the default is a temporary read-only
    * transaction with strong concurrency.
@@ -69,8 +65,6 @@ public interface ExecuteSqlRequestOrBuilder
    *
    *
    * 
-   * The transaction to use. If none is provided, the default is a
-   * temporary read-only transaction with strong concurrency.
    * The transaction to use.
    * For queries, if none is provided, the default is a temporary read-only
    * transaction with strong concurrency.
diff --git a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java
index b20abf2efdf4..282cb446f777 100644
--- a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java
+++ b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java
@@ -16,6 +16,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
       internal_static_google_spanner_v1_CreateSessionRequest_descriptor;
   static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internal_static_google_spanner_v1_CreateSessionRequest_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_spanner_v1_BatchCreateSessionsRequest_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_spanner_v1_BatchCreateSessionsRequest_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_spanner_v1_BatchCreateSessionsResponse_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_spanner_v1_BatchCreateSessionsResponse_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_Session_descriptor;
   static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -128,147 +136,157 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "ransaction.proto\032\034google/spanner/v1/type"
           + ".proto\"U\n\024CreateSessionRequest\022\020\n\010databa"
           + "se\030\001 \001(\t\022+\n\007session\030\002 \001(\0132\032.google.spann"
-          + "er.v1.Session\"\356\001\n\007Session\022\014\n\004name\030\001 \001(\t\022"
-          + "6\n\006labels\030\002 \003(\0132&.google.spanner.v1.Sess"
-          + "ion.LabelsEntry\022/\n\013create_time\030\003 \001(\0132\032.g"
-          + "oogle.protobuf.Timestamp\022=\n\031approximate_"
-          + "last_use_time\030\004 \001(\0132\032.google.protobuf.Ti"
-          + "mestamp\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v"
-          + "alue\030\002 \001(\t:\0028\001\"!\n\021GetSessionRequest\022\014\n\004n"
-          + "ame\030\001 \001(\t\"^\n\023ListSessionsRequest\022\020\n\010data"
-          + "base\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_to"
-          + "ken\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"]\n\024ListSession"
-          + "sResponse\022,\n\010sessions\030\001 \003(\0132\032.google.spa"
-          + "nner.v1.Session\022\027\n\017next_page_token\030\002 \001(\t"
-          + "\"$\n\024DeleteSessionRequest\022\014\n\004name\030\001 \001(\t\"\340"
-          + "\003\n\021ExecuteSqlRequest\022\017\n\007session\030\001 \001(\t\022;\n"
-          + "\013transaction\030\002 \001(\0132&.google.spanner.v1.T"
-          + "ransactionSelector\022\013\n\003sql\030\003 \001(\t\022\'\n\006param"
-          + "s\030\004 \001(\0132\027.google.protobuf.Struct\022I\n\013para"
-          + "m_types\030\005 \003(\01324.google.spanner.v1.Execut"
-          + "eSqlRequest.ParamTypesEntry\022\024\n\014resume_to"
-          + "ken\030\006 \001(\014\022B\n\nquery_mode\030\007 \001(\0162..google.s"
-          + "panner.v1.ExecuteSqlRequest.QueryMode\022\027\n"
-          + "\017partition_token\030\010 \001(\014\022\r\n\005seqno\030\t \001(\003\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\tQue"
-          + "ryMode\022\n\n\006NORMAL\020\000\022\010\n\004PLAN\020\001\022\013\n\007PROFILE\020"
-          + "\002\"\250\003\n\026ExecuteBatchDmlRequest\022\017\n\007session\030"
-          + "\001 \001(\t\022;\n\013transaction\030\002 \001(\0132&.google.span"
-          + "ner.v1.TransactionSelector\022G\n\nstatements"
-          + "\030\003 \003(\01323.google.spanner.v1.ExecuteBatchD"
-          + "mlRequest.Statement\022\r\n\005seqno\030\004 \001(\003\032\347\001\n\tS"
-          + "tatement\022\013\n\003sql\030\001 \001(\t\022\'\n\006params\030\002 \001(\0132\027."
-          + "google.protobuf.Struct\022X\n\013param_types\030\003 "
-          + "\003(\0132C.google.spanner.v1.ExecuteBatchDmlR"
-          + "equest.Statement.ParamTypesEntry\032J\n\017Para"
-          + "mTypesEntry\022\013\n\003key\030\001 \001(\t\022&\n\005value\030\002 \001(\0132"
-          + "\027.google.spanner.v1.Type:\0028\001\"p\n\027ExecuteB"
-          + "atchDmlResponse\0221\n\013result_sets\030\001 \003(\0132\034.g"
-          + "oogle.spanner.v1.ResultSet\022\"\n\006status\030\002 \001"
-          + "(\0132\022.google.rpc.Status\"H\n\020PartitionOptio"
-          + "ns\022\034\n\024partition_size_bytes\030\001 \001(\003\022\026\n\016max_"
-          + "partitions\030\002 \001(\003\"\366\002\n\025PartitionQueryReque"
-          + "st\022\017\n\007session\030\001 \001(\t\022;\n\013transaction\030\002 \001(\013"
-          + "2&.google.spanner.v1.TransactionSelector"
-          + "\022\013\n\003sql\030\003 \001(\t\022\'\n\006params\030\004 \001(\0132\027.google.p"
-          + "rotobuf.Struct\022M\n\013param_types\030\005 \003(\01328.go"
-          + "ogle.spanner.v1.PartitionQueryRequest.Pa"
-          + "ramTypesEntry\022>\n\021partition_options\030\006 \001(\013"
-          + "2#.google.spanner.v1.PartitionOptions\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\"\377\001\n\024Pa"
-          + "rtitionReadRequest\022\017\n\007session\030\001 \001(\t\022;\n\013t"
-          + "ransaction\030\002 \001(\0132&.google.spanner.v1.Tra"
-          + "nsactionSelector\022\r\n\005table\030\003 \001(\t\022\r\n\005index"
-          + "\030\004 \001(\t\022\017\n\007columns\030\005 \003(\t\022*\n\007key_set\030\006 \001(\013"
-          + "2\031.google.spanner.v1.KeySet\022>\n\021partition"
-          + "_options\030\t \001(\0132#.google.spanner.v1.Parti"
-          + "tionOptions\"$\n\tPartition\022\027\n\017partition_to"
-          + "ken\030\001 \001(\014\"z\n\021PartitionResponse\0220\n\npartit"
-          + "ions\030\001 \003(\0132\034.google.spanner.v1.Partition"
-          + "\0223\n\013transaction\030\002 \001(\0132\036.google.spanner.v"
-          + "1.Transaction\"\364\001\n\013ReadRequest\022\017\n\007session"
+          + "er.v1.Session\"{\n\032BatchCreateSessionsRequ"
+          + "est\022\020\n\010database\030\001 \001(\t\0224\n\020session_templat"
+          + "e\030\002 \001(\0132\032.google.spanner.v1.Session\022\025\n\rs"
+          + "ession_count\030\003 \001(\005\"J\n\033BatchCreateSession"
+          + "sResponse\022+\n\007session\030\001 \003(\0132\032.google.span"
+          + "ner.v1.Session\"\356\001\n\007Session\022\014\n\004name\030\001 \001(\t"
+          + "\0226\n\006labels\030\002 \003(\0132&.google.spanner.v1.Ses"
+          + "sion.LabelsEntry\022/\n\013create_time\030\003 \001(\0132\032."
+          + "google.protobuf.Timestamp\022=\n\031approximate"
+          + "_last_use_time\030\004 \001(\0132\032.google.protobuf.T"
+          + "imestamp\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005"
+          + "value\030\002 \001(\t:\0028\001\"!\n\021GetSessionRequest\022\014\n\004"
+          + "name\030\001 \001(\t\"^\n\023ListSessionsRequest\022\020\n\010dat"
+          + "abase\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_t"
+          + "oken\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"]\n\024ListSessio"
+          + "nsResponse\022,\n\010sessions\030\001 \003(\0132\032.google.sp"
+          + "anner.v1.Session\022\027\n\017next_page_token\030\002 \001("
+          + "\t\"$\n\024DeleteSessionRequest\022\014\n\004name\030\001 \001(\t\""
+          + "\340\003\n\021ExecuteSqlRequest\022\017\n\007session\030\001 \001(\t\022;"
+          + "\n\013transaction\030\002 \001(\0132&.google.spanner.v1."
+          + "TransactionSelector\022\013\n\003sql\030\003 \001(\t\022\'\n\006para"
+          + "ms\030\004 \001(\0132\027.google.protobuf.Struct\022I\n\013par"
+          + "am_types\030\005 \003(\01324.google.spanner.v1.Execu"
+          + "teSqlRequest.ParamTypesEntry\022\024\n\014resume_t"
+          + "oken\030\006 \001(\014\022B\n\nquery_mode\030\007 \001(\0162..google."
+          + "spanner.v1.ExecuteSqlRequest.QueryMode\022\027"
+          + "\n\017partition_token\030\010 \001(\014\022\r\n\005seqno\030\t \001(\003\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\tQu"
+          + "eryMode\022\n\n\006NORMAL\020\000\022\010\n\004PLAN\020\001\022\013\n\007PROFILE"
+          + "\020\002\"\250\003\n\026ExecuteBatchDmlRequest\022\017\n\007session"
           + "\030\001 \001(\t\022;\n\013transaction\030\002 \001(\0132&.google.spa"
-          + "nner.v1.TransactionSelector\022\r\n\005table\030\003 \001"
-          + "(\t\022\r\n\005index\030\004 \001(\t\022\017\n\007columns\030\005 \003(\t\022*\n\007ke"
-          + "y_set\030\006 \001(\0132\031.google.spanner.v1.KeySet\022\r"
-          + "\n\005limit\030\010 \001(\003\022\024\n\014resume_token\030\t \001(\014\022\027\n\017p"
-          + "artition_token\030\n \001(\014\"b\n\027BeginTransaction"
-          + "Request\022\017\n\007session\030\001 \001(\t\0226\n\007options\030\002 \001("
-          + "\0132%.google.spanner.v1.TransactionOptions"
-          + "\"\302\001\n\rCommitRequest\022\017\n\007session\030\001 \001(\t\022\030\n\016t"
-          + "ransaction_id\030\002 \001(\014H\000\022G\n\026single_use_tran"
-          + "saction\030\003 \001(\0132%.google.spanner.v1.Transa"
-          + "ctionOptionsH\000\022.\n\tmutations\030\004 \003(\0132\033.goog"
-          + "le.spanner.v1.MutationB\r\n\013transaction\"F\n"
-          + "\016CommitResponse\0224\n\020commit_timestamp\030\001 \001("
-          + "\0132\032.google.protobuf.Timestamp\":\n\017Rollbac"
-          + "kRequest\022\017\n\007session\030\001 \001(\t\022\026\n\016transaction"
-          + "_id\030\002 \001(\0142\306\022\n\007Spanner\022\233\001\n\rCreateSession\022"
-          + "\'.google.spanner.v1.CreateSessionRequest"
-          + "\032\032.google.spanner.v1.Session\"E\202\323\344\223\002?\":/v"
-          + "1/{database=projects/*/instances/*/datab"
-          + "ases/*}/sessions:\001*\022\220\001\n\nGetSession\022$.goo"
-          + "gle.spanner.v1.GetSessionRequest\032\032.googl"
-          + "e.spanner.v1.Session\"@\202\323\344\223\002:\0228/v1/{name="
-          + "projects/*/instances/*/databases/*/sessi"
-          + "ons/*}\022\243\001\n\014ListSessions\022&.google.spanner"
-          + ".v1.ListSessionsRequest\032\'.google.spanner"
-          + ".v1.ListSessionsResponse\"B\202\323\344\223\002<\022:/v1/{d"
-          + "atabase=projects/*/instances/*/databases"
-          + "/*}/sessions\022\222\001\n\rDeleteSession\022\'.google."
-          + "spanner.v1.DeleteSessionRequest\032\026.google"
-          + ".protobuf.Empty\"@\202\323\344\223\002:*8/v1/{name=proje"
-          + "cts/*/instances/*/databases/*/sessions/*"
-          + "}\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/*}:streamingRead:\001*0\001\022\267"
-          + "\001\n\020BeginTransaction\022*.google.spanner.v1."
-          + "BeginTransactionRequest\032\036.google.spanner"
-          + ".v1.Transaction\"W\202\323\344\223\002Q\"L/v1/{session=pr"
+          + "nner.v1.TransactionSelector\022G\n\nstatement"
+          + "s\030\003 \003(\01323.google.spanner.v1.ExecuteBatch"
+          + "DmlRequest.Statement\022\r\n\005seqno\030\004 \001(\003\032\347\001\n\t"
+          + "Statement\022\013\n\003sql\030\001 \001(\t\022\'\n\006params\030\002 \001(\0132\027"
+          + ".google.protobuf.Struct\022X\n\013param_types\030\003"
+          + " \003(\0132C.google.spanner.v1.ExecuteBatchDml"
+          + "Request.Statement.ParamTypesEntry\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\"p\n\027Execute"
+          + "BatchDmlResponse\0221\n\013result_sets\030\001 \003(\0132\034."
+          + "google.spanner.v1.ResultSet\022\"\n\006status\030\002 "
+          + "\001(\0132\022.google.rpc.Status\"H\n\020PartitionOpti"
+          + "ons\022\034\n\024partition_size_bytes\030\001 \001(\003\022\026\n\016max"
+          + "_partitions\030\002 \001(\003\"\366\002\n\025PartitionQueryRequ"
+          + "est\022\017\n\007session\030\001 \001(\t\022;\n\013transaction\030\002 \001("
+          + "\0132&.google.spanner.v1.TransactionSelecto"
+          + "r\022\013\n\003sql\030\003 \001(\t\022\'\n\006params\030\004 \001(\0132\027.google."
+          + "protobuf.Struct\022M\n\013param_types\030\005 \003(\01328.g"
+          + "oogle.spanner.v1.PartitionQueryRequest.P"
+          + "aramTypesEntry\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\005value\030"
+          + "\002 \001(\0132\027.google.spanner.v1.Type:\0028\001\"\377\001\n\024P"
+          + "artitionReadRequest\022\017\n\007session\030\001 \001(\t\022;\n\013"
+          + "transaction\030\002 \001(\0132&.google.spanner.v1.Tr"
+          + "ansactionSelector\022\r\n\005table\030\003 \001(\t\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.KeySet\022>\n\021partitio"
+          + "n_options\030\t \001(\0132#.google.spanner.v1.Part"
+          + "itionOptions\"$\n\tPartition\022\027\n\017partition_t"
+          + "oken\030\001 \001(\014\"z\n\021PartitionResponse\0220\n\nparti"
+          + "tions\030\001 \003(\0132\034.google.spanner.v1.Partitio"
+          + "n\0223\n\013transaction\030\002 \001(\0132\036.google.spanner."
+          + "v1.Transaction\"\364\001\n\013ReadRequest\022\017\n\007sessio"
+          + "n\030\001 \001(\t\022;\n\013transaction\030\002 \001(\0132&.google.sp"
+          + "anner.v1.TransactionSelector\022\r\n\005table\030\003 "
+          + "\001(\t\022\r\n\005index\030\004 \001(\t\022\017\n\007columns\030\005 \003(\t\022*\n\007k"
+          + "ey_set\030\006 \001(\0132\031.google.spanner.v1.KeySet\022"
+          + "\r\n\005limit\030\010 \001(\003\022\024\n\014resume_token\030\t \001(\014\022\027\n\017"
+          + "partition_token\030\n \001(\014\"b\n\027BeginTransactio"
+          + "nRequest\022\017\n\007session\030\001 \001(\t\0226\n\007options\030\002 \001"
+          + "(\0132%.google.spanner.v1.TransactionOption"
+          + "s\"\302\001\n\rCommitRequest\022\017\n\007session\030\001 \001(\t\022\030\n\016"
+          + "transaction_id\030\002 \001(\014H\000\022G\n\026single_use_tra"
+          + "nsaction\030\003 \001(\0132%.google.spanner.v1.Trans"
+          + "actionOptionsH\000\022.\n\tmutations\030\004 \003(\0132\033.goo"
+          + "gle.spanner.v1.MutationB\r\n\013transaction\"F"
+          + "\n\016CommitResponse\0224\n\020commit_timestamp\030\001 \001"
+          + "(\0132\032.google.protobuf.Timestamp\":\n\017Rollba"
+          + "ckRequest\022\017\n\007session\030\001 \001(\t\022\026\n\016transactio"
+          + "n_id\030\002 \001(\0142\220\024\n\007Spanner\022\233\001\n\rCreateSession"
+          + "\022\'.google.spanner.v1.CreateSessionReques"
+          + "t\032\032.google.spanner.v1.Session\"E\202\323\344\223\002?\":/"
+          + "v1/{database=projects/*/instances/*/data"
+          + "bases/*}/sessions:\001*\022\307\001\n\023BatchCreateSess"
+          + "ions\022-.google.spanner.v1.BatchCreateSess"
+          + "ionsRequest\032..google.spanner.v1.BatchCre"
+          + "ateSessionsResponse\"Q\202\323\344\223\002K\"F/v1/{databa"
+          + "se=projects/*/instances/*/databases/*}/s"
+          + "essions:batchCreate:\001*\022\220\001\n\nGetSession\022$."
+          + "google.spanner.v1.GetSessionRequest\032\032.go"
+          + "ogle.spanner.v1.Session\"@\202\323\344\223\002:\0228/v1/{na"
+          + "me=projects/*/instances/*/databases/*/se"
+          + "ssions/*}\022\243\001\n\014ListSessions\022&.google.span"
+          + "ner.v1.ListSessionsRequest\032\'.google.span"
+          + "ner.v1.ListSessionsResponse\"B\202\323\344\223\002<\022:/v1"
+          + "/{database=projects/*/instances/*/databa"
+          + "ses/*}/sessions\022\222\001\n\rDeleteSession\022\'.goog"
+          + "le.spanner.v1.DeleteSessionRequest\032\026.goo"
+          + "gle.protobuf.Empty\"@\202\323\344\223\002:*8/v1/{name=pr"
           + "ojects/*/instances/*/databases/*/session"
-          + "s/*}:beginTransaction:\001*\022\234\001\n\006Commit\022 .go"
-          + "ogle.spanner.v1.CommitRequest\032!.google.s"
-          + "panner.v1.CommitResponse\"M\202\323\344\223\002G\"B/v1/{s"
-          + "ession=projects/*/instances/*/databases/"
-          + "*/sessions/*}:commit:\001*\022\227\001\n\010Rollback\022\".g"
-          + "oogle.spanner.v1.RollbackRequest\032\026.googl"
-          + "e.protobuf.Empty\"O\202\323\344\223\002I\"D/v1/{session=p"
-          + "rojects/*/instances/*/databases/*/sessio"
-          + "ns/*}:rollback:\001*\022\267\001\n\016PartitionQuery\022(.g"
-          + "oogle.spanner.v1.PartitionQueryRequest\032$"
-          + ".google.spanner.v1.PartitionResponse\"U\202\323"
-          + "\344\223\002O\"J/v1/{session=projects/*/instances/"
-          + "*/databases/*/sessions/*}:partitionQuery"
-          + ":\001*\022\264\001\n\rPartitionRead\022\'.google.spanner.v"
-          + "1.PartitionReadRequest\032$.google.spanner."
-          + "v1.PartitionResponse\"T\202\323\344\223\002N\"I/v1/{sessi"
-          + "on=projects/*/instances/*/databases/*/se"
-          + "ssions/*}:partitionRead:\001*B\225\001\n\025com.googl"
-          + "e.spanner.v1B\014SpannerProtoP\001Z8google.gol"
-          + "ang.org/genproto/googleapis/spanner/v1;s"
-          + "panner\252\002\027Google.Cloud.Spanner.V1\312\002\027Googl"
-          + "e\\Cloud\\Spanner\\V1b\006proto3"
+          + "s/*}\022\243\001\n\nExecuteSql\022$.google.spanner.v1."
+          + "ExecuteSqlRequest\032\034.google.spanner.v1.Re"
+          + "sultSet\"Q\202\323\344\223\002K\"F/v1/{session=projects/*"
+          + "/instances/*/databases/*/sessions/*}:exe"
+          + "cuteSql:\001*\022\276\001\n\023ExecuteStreamingSql\022$.goo"
+          + "gle.spanner.v1.ExecuteSqlRequest\032#.googl"
+          + "e.spanner.v1.PartialResultSet\"Z\202\323\344\223\002T\"O/"
+          + "v1/{session=projects/*/instances/*/datab"
+          + "ases/*/sessions/*}:executeStreamingSql:\001"
+          + "*0\001\022\300\001\n\017ExecuteBatchDml\022).google.spanner"
+          + ".v1.ExecuteBatchDmlRequest\032*.google.span"
+          + "ner.v1.ExecuteBatchDmlResponse\"V\202\323\344\223\002P\"K"
+          + "/v1/{session=projects/*/instances/*/data"
+          + "bases/*/sessions/*}:executeBatchDml:\001*\022\221"
+          + "\001\n\004Read\022\036.google.spanner.v1.ReadRequest\032"
+          + "\034.google.spanner.v1.ResultSet\"K\202\323\344\223\002E\"@/"
+          + "v1/{session=projects/*/instances/*/datab"
+          + "ases/*/sessions/*}:read:\001*\022\254\001\n\rStreaming"
+          + "Read\022\036.google.spanner.v1.ReadRequest\032#.g"
+          + "oogle.spanner.v1.PartialResultSet\"T\202\323\344\223\002"
+          + "N\"I/v1/{session=projects/*/instances/*/d"
+          + "atabases/*/sessions/*}:streamingRead:\001*0"
+          + "\001\022\267\001\n\020BeginTransaction\022*.google.spanner."
+          + "v1.BeginTransactionRequest\032\036.google.span"
+          + "ner.v1.Transaction\"W\202\323\344\223\002Q\"L/v1/{session"
+          + "=projects/*/instances/*/databases/*/sess"
+          + "ions/*}:beginTransaction:\001*\022\234\001\n\006Commit\022 "
+          + ".google.spanner.v1.CommitRequest\032!.googl"
+          + "e.spanner.v1.CommitResponse\"M\202\323\344\223\002G\"B/v1"
+          + "/{session=projects/*/instances/*/databas"
+          + "es/*/sessions/*}:commit:\001*\022\227\001\n\010Rollback\022"
+          + "\".google.spanner.v1.RollbackRequest\032\026.go"
+          + "ogle.protobuf.Empty\"O\202\323\344\223\002I\"D/v1/{sessio"
+          + "n=projects/*/instances/*/databases/*/ses"
+          + "sions/*}:rollback:\001*\022\267\001\n\016PartitionQuery\022"
+          + "(.google.spanner.v1.PartitionQueryReques"
+          + "t\032$.google.spanner.v1.PartitionResponse\""
+          + "U\202\323\344\223\002O\"J/v1/{session=projects/*/instanc"
+          + "es/*/databases/*/sessions/*}:partitionQu"
+          + "ery:\001*\022\264\001\n\rPartitionRead\022\'.google.spanne"
+          + "r.v1.PartitionReadRequest\032$.google.spann"
+          + "er.v1.PartitionResponse\"T\202\323\344\223\002N\"I/v1/{se"
+          + "ssion=projects/*/instances/*/databases/*"
+          + "/sessions/*}:partitionRead:\001*B\225\001\n\025com.go"
+          + "ogle.spanner.v1B\014SpannerProtoP\001Z8google."
+          + "golang.org/genproto/googleapis/spanner/v"
+          + "1;spanner\252\002\027Google.Cloud.Spanner.V1\312\002\027Go"
+          + "ogle\\Cloud\\Spanner\\V1b\006proto3"
     };
     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
         new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -301,7 +319,23 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
             new java.lang.String[] {
               "Database", "Session",
             });
-    internal_static_google_spanner_v1_Session_descriptor = getDescriptor().getMessageTypes().get(1);
+    internal_static_google_spanner_v1_BatchCreateSessionsRequest_descriptor =
+        getDescriptor().getMessageTypes().get(1);
+    internal_static_google_spanner_v1_BatchCreateSessionsRequest_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_spanner_v1_BatchCreateSessionsRequest_descriptor,
+            new java.lang.String[] {
+              "Database", "SessionTemplate", "SessionCount",
+            });
+    internal_static_google_spanner_v1_BatchCreateSessionsResponse_descriptor =
+        getDescriptor().getMessageTypes().get(2);
+    internal_static_google_spanner_v1_BatchCreateSessionsResponse_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_spanner_v1_BatchCreateSessionsResponse_descriptor,
+            new java.lang.String[] {
+              "Session",
+            });
+    internal_static_google_spanner_v1_Session_descriptor = getDescriptor().getMessageTypes().get(3);
     internal_static_google_spanner_v1_Session_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_Session_descriptor,
@@ -317,7 +351,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "Key", "Value",
             });
     internal_static_google_spanner_v1_GetSessionRequest_descriptor =
-        getDescriptor().getMessageTypes().get(2);
+        getDescriptor().getMessageTypes().get(4);
     internal_static_google_spanner_v1_GetSessionRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_GetSessionRequest_descriptor,
@@ -325,7 +359,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "Name",
             });
     internal_static_google_spanner_v1_ListSessionsRequest_descriptor =
-        getDescriptor().getMessageTypes().get(3);
+        getDescriptor().getMessageTypes().get(5);
     internal_static_google_spanner_v1_ListSessionsRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_ListSessionsRequest_descriptor,
@@ -333,7 +367,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "Database", "PageSize", "PageToken", "Filter",
             });
     internal_static_google_spanner_v1_ListSessionsResponse_descriptor =
-        getDescriptor().getMessageTypes().get(4);
+        getDescriptor().getMessageTypes().get(6);
     internal_static_google_spanner_v1_ListSessionsResponse_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_ListSessionsResponse_descriptor,
@@ -341,7 +375,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "Sessions", "NextPageToken",
             });
     internal_static_google_spanner_v1_DeleteSessionRequest_descriptor =
-        getDescriptor().getMessageTypes().get(5);
+        getDescriptor().getMessageTypes().get(7);
     internal_static_google_spanner_v1_DeleteSessionRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_DeleteSessionRequest_descriptor,
@@ -349,7 +383,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "Name",
             });
     internal_static_google_spanner_v1_ExecuteSqlRequest_descriptor =
-        getDescriptor().getMessageTypes().get(6);
+        getDescriptor().getMessageTypes().get(8);
     internal_static_google_spanner_v1_ExecuteSqlRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_ExecuteSqlRequest_descriptor,
@@ -373,7 +407,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "Key", "Value",
             });
     internal_static_google_spanner_v1_ExecuteBatchDmlRequest_descriptor =
-        getDescriptor().getMessageTypes().get(7);
+        getDescriptor().getMessageTypes().get(9);
     internal_static_google_spanner_v1_ExecuteBatchDmlRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_ExecuteBatchDmlRequest_descriptor,
@@ -399,7 +433,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "Key", "Value",
             });
     internal_static_google_spanner_v1_ExecuteBatchDmlResponse_descriptor =
-        getDescriptor().getMessageTypes().get(8);
+        getDescriptor().getMessageTypes().get(10);
     internal_static_google_spanner_v1_ExecuteBatchDmlResponse_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_ExecuteBatchDmlResponse_descriptor,
@@ -407,7 +441,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "ResultSets", "Status",
             });
     internal_static_google_spanner_v1_PartitionOptions_descriptor =
-        getDescriptor().getMessageTypes().get(9);
+        getDescriptor().getMessageTypes().get(11);
     internal_static_google_spanner_v1_PartitionOptions_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_PartitionOptions_descriptor,
@@ -415,7 +449,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "PartitionSizeBytes", "MaxPartitions",
             });
     internal_static_google_spanner_v1_PartitionQueryRequest_descriptor =
-        getDescriptor().getMessageTypes().get(10);
+        getDescriptor().getMessageTypes().get(12);
     internal_static_google_spanner_v1_PartitionQueryRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_PartitionQueryRequest_descriptor,
@@ -431,7 +465,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "Key", "Value",
             });
     internal_static_google_spanner_v1_PartitionReadRequest_descriptor =
-        getDescriptor().getMessageTypes().get(11);
+        getDescriptor().getMessageTypes().get(13);
     internal_static_google_spanner_v1_PartitionReadRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_PartitionReadRequest_descriptor,
@@ -439,7 +473,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "Session", "Transaction", "Table", "Index", "Columns", "KeySet", "PartitionOptions",
             });
     internal_static_google_spanner_v1_Partition_descriptor =
-        getDescriptor().getMessageTypes().get(12);
+        getDescriptor().getMessageTypes().get(14);
     internal_static_google_spanner_v1_Partition_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_Partition_descriptor,
@@ -447,7 +481,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "PartitionToken",
             });
     internal_static_google_spanner_v1_PartitionResponse_descriptor =
-        getDescriptor().getMessageTypes().get(13);
+        getDescriptor().getMessageTypes().get(15);
     internal_static_google_spanner_v1_PartitionResponse_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_PartitionResponse_descriptor,
@@ -455,7 +489,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "Partitions", "Transaction",
             });
     internal_static_google_spanner_v1_ReadRequest_descriptor =
-        getDescriptor().getMessageTypes().get(14);
+        getDescriptor().getMessageTypes().get(16);
     internal_static_google_spanner_v1_ReadRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_ReadRequest_descriptor,
@@ -471,7 +505,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "PartitionToken",
             });
     internal_static_google_spanner_v1_BeginTransactionRequest_descriptor =
-        getDescriptor().getMessageTypes().get(15);
+        getDescriptor().getMessageTypes().get(17);
     internal_static_google_spanner_v1_BeginTransactionRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_BeginTransactionRequest_descriptor,
@@ -479,7 +513,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "Session", "Options",
             });
     internal_static_google_spanner_v1_CommitRequest_descriptor =
-        getDescriptor().getMessageTypes().get(16);
+        getDescriptor().getMessageTypes().get(18);
     internal_static_google_spanner_v1_CommitRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_CommitRequest_descriptor,
@@ -487,7 +521,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "Session", "TransactionId", "SingleUseTransaction", "Mutations", "Transaction",
             });
     internal_static_google_spanner_v1_CommitResponse_descriptor =
-        getDescriptor().getMessageTypes().get(17);
+        getDescriptor().getMessageTypes().get(19);
     internal_static_google_spanner_v1_CommitResponse_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_CommitResponse_descriptor,
@@ -495,7 +529,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
               "CommitTimestamp",
             });
     internal_static_google_spanner_v1_RollbackRequest_descriptor =
-        getDescriptor().getMessageTypes().get(18);
+        getDescriptor().getMessageTypes().get(20);
     internal_static_google_spanner_v1_RollbackRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_spanner_v1_RollbackRequest_descriptor,
diff --git a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto
index b2091c92f7e1..a643e7a6c1a1 100644
--- a/google-api-grpc/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto
+++ b/google-api-grpc/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google LLC.
+// Copyright 2019 Google LLC.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -66,6 +66,18 @@ service Spanner {
     };
   }
 
+  // Creates multiple new sessions.
+  //
+  // This API can be used to initialize a session cache on the clients.
+  // See https://goo.gl/TgSFN2 for best practices on session cache management.
+  rpc BatchCreateSessions(BatchCreateSessionsRequest)
+      returns (BatchCreateSessionsResponse) {
+    option (google.api.http) = {
+      post: "/v1/{database=projects/*/instances/*/databases/*}/sessions:batchCreate"
+      body: "*"
+    };
+  }
+
   // Gets a session. Returns `NOT_FOUND` if the session does not exist.
   // This is mainly useful for determining whether a session is still
   // alive.
@@ -129,8 +141,9 @@ service Spanner {
   //
   // Statements are executed in order, sequentially.
   // [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse] will contain a
-  // [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has successfully executed. If a
-  // statement fails, its error status will be returned as part of the
+  // [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has
+  // successfully executed. If a statement fails, its error status will be
+  // returned as part of the
   // [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse]. Execution will
   // stop at the first failed statement; the remaining statements will not run.
   //
@@ -142,7 +155,8 @@ service Spanner {
   // See more details in
   // [ExecuteBatchDmlRequest][Spanner.ExecuteBatchDmlRequest] and
   // [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse].
-  rpc ExecuteBatchDml(ExecuteBatchDmlRequest) returns (ExecuteBatchDmlResponse) {
+  rpc ExecuteBatchDml(ExecuteBatchDmlRequest)
+      returns (ExecuteBatchDmlResponse) {
     option (google.api.http) = {
       post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeBatchDml"
       body: "*"
@@ -275,6 +289,31 @@ message CreateSessionRequest {
   Session session = 2;
 }
 
+// The request for
+// [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].
+message BatchCreateSessionsRequest {
+  // Required. The database in which the new sessions are created.
+  string database = 1;
+
+  // Parameters to be applied to each created session.
+  Session session_template = 2;
+
+  // Required. The number of sessions to be created in this batch call.
+  // The API may return fewer than the requested number of sessions. If a
+  // specific number of sessions are desired, the client can make additional
+  // calls to BatchCreateSessions (adjusting
+  // [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
+  // as necessary).
+  int32 session_count = 3;
+}
+
+// The response for
+// [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].
+message BatchCreateSessionsResponse {
+  // The freshly created sessions.
+  repeated Session session = 1;
+}
+
 // A session in the Cloud Spanner API.
 message Session {
   // The name of the session. This is always system-assigned; values provided
@@ -371,9 +410,6 @@ message ExecuteSqlRequest {
   // Required. The session in which the SQL query should be performed.
   string session = 1;
 
-  // The transaction to use. If none is provided, the default is a
-  // temporary read-only transaction with strong concurrency.
-  //
   // The transaction to use.
   //
   // For queries, if none is provided, the default is a temporary read-only
@@ -476,7 +512,9 @@ message ExecuteBatchDmlRequest {
 
     // It is not always possible for Cloud Spanner to infer the right SQL type
     // from a JSON value.  For example, values of type `BYTES` and values
-    // of type `STRING` both appear in [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as JSON strings.
+    // of type `STRING` both appear in
+    // [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
+    // JSON strings.
     //
     // In these cases, `param_types` can be used to specify the exact
     // SQL type for some or all of the SQL statement parameters. See the
@@ -508,11 +546,13 @@ message ExecuteBatchDmlRequest {
   int64 seqno = 4;
 }
 
-// The response for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a list
-// of [ResultSet][google.spanner.v1.ResultSet], one for each DML statement that has successfully executed.
-// If a statement fails, the error is returned as part of the response payload.
-// Clients can determine whether all DML statements have run successfully, or if
-// a statement failed, using one of the following approaches:
+// The response for
+// [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. Contains a list
+// of [ResultSet][google.spanner.v1.ResultSet], one for each DML statement that
+// has successfully executed. If a statement fails, the error is returned as
+// part of the response payload. Clients can determine whether all DML
+// statements have run successfully, or if a statement failed, using one of the
+// following approaches:
 //
 //   1. Check if 'status' field is OkStatus.
 //   2. Check if result_sets_size() equals the number of statements in
@@ -529,9 +569,11 @@ message ExecuteBatchDmlRequest {
 // result_set_size() client can determine that the 3rd statement has failed.
 message ExecuteBatchDmlResponse {
   // ResultSets, one for each statement in the request that ran successfully, in
-  // the same order as the statements in the request. Each [ResultSet][google.spanner.v1.ResultSet] will
-  // not contain any rows. The [ResultSetStats][google.spanner.v1.ResultSetStats] in each [ResultSet][google.spanner.v1.ResultSet] will
-  // contain the number of rows modified by the statement.
+  // the same order as the statements in the request. Each
+  // [ResultSet][google.spanner.v1.ResultSet] will not contain any rows. The
+  // [ResultSetStats][google.spanner.v1.ResultSetStats] in each
+  // [ResultSet][google.spanner.v1.ResultSet] will contain the number of rows
+  // modified by the statement.
   //
   // Only the first ResultSet in the response contains a valid
   // [ResultSetMetadata][google.spanner.v1.ResultSetMetadata].
diff --git a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java
index 8979209d9c6d..a0693caf2d88 100644
--- a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java
+++ b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java
@@ -31,6 +31,8 @@
 import com.google.common.util.concurrent.MoreExecutors;
 import com.google.protobuf.ByteString;
 import com.google.protobuf.Empty;
+import com.google.spanner.v1.BatchCreateSessionsRequest;
+import com.google.spanner.v1.BatchCreateSessionsResponse;
 import com.google.spanner.v1.BeginTransactionRequest;
 import com.google.spanner.v1.CommitRequest;
 import com.google.spanner.v1.CommitResponse;
@@ -328,6 +330,112 @@ public final UnaryCallable createSessionCallable(
     return stub.createSessionCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Creates multiple new sessions.
+   *
+   * 

This API can be used to initialize a session cache on the clients. See https://goo.gl/TgSFN2 + * for best practices on session cache management. + * + *

Sample code: + * + *


+   * try (SpannerClient spannerClient = SpannerClient.create()) {
+   *   DatabaseName database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]");
+   *   BatchCreateSessionsResponse response = spannerClient.batchCreateSessions(database);
+   * }
+   * 
+ * + * @param database Required. The database in which the new sessions are created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateSessionsResponse batchCreateSessions(DatabaseName database) { + + BatchCreateSessionsRequest request = + BatchCreateSessionsRequest.newBuilder() + .setDatabase(database == null ? null : database.toString()) + .build(); + return batchCreateSessions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates multiple new sessions. + * + *

This API can be used to initialize a session cache on the clients. See https://goo.gl/TgSFN2 + * for best practices on session cache management. + * + *

Sample code: + * + *


+   * try (SpannerClient spannerClient = SpannerClient.create()) {
+   *   DatabaseName database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]");
+   *   BatchCreateSessionsResponse response = spannerClient.batchCreateSessions(database.toString());
+   * }
+   * 
+ * + * @param database Required. The database in which the new sessions are created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchCreateSessionsResponse batchCreateSessions(String database) { + + BatchCreateSessionsRequest request = + BatchCreateSessionsRequest.newBuilder().setDatabase(database).build(); + return batchCreateSessions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates multiple new sessions. + * + *

This API can be used to initialize a session cache on the clients. See https://goo.gl/TgSFN2 + * for best practices on session cache management. + * + *

Sample code: + * + *


+   * try (SpannerClient spannerClient = SpannerClient.create()) {
+   *   DatabaseName database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]");
+   *   BatchCreateSessionsRequest request = BatchCreateSessionsRequest.newBuilder()
+   *     .setDatabase(database.toString())
+   *     .build();
+   *   BatchCreateSessionsResponse response = spannerClient.batchCreateSessions(request);
+   * }
+   * 
+ * + * @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 + */ + public final BatchCreateSessionsResponse batchCreateSessions(BatchCreateSessionsRequest request) { + return batchCreateSessionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates multiple new sessions. + * + *

This API can be used to initialize a session cache on the clients. See https://goo.gl/TgSFN2 + * for best practices on session cache management. + * + *

Sample code: + * + *


+   * try (SpannerClient spannerClient = SpannerClient.create()) {
+   *   DatabaseName database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]");
+   *   BatchCreateSessionsRequest request = BatchCreateSessionsRequest.newBuilder()
+   *     .setDatabase(database.toString())
+   *     .build();
+   *   ApiFuture<BatchCreateSessionsResponse> future = spannerClient.batchCreateSessionsCallable().futureCall(request);
+   *   // Do something
+   *   BatchCreateSessionsResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + batchCreateSessionsCallable() { + return stub.batchCreateSessionsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Gets a session. Returns `NOT_FOUND` if the session does not exist. This is mainly useful for diff --git a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java index 6b1760a64384..ea9a05119ba5 100644 --- a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java +++ b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java @@ -31,6 +31,8 @@ import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.spanner.v1.stub.SpannerStubSettings; import com.google.protobuf.Empty; +import com.google.spanner.v1.BatchCreateSessionsRequest; +import com.google.spanner.v1.BatchCreateSessionsResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -89,6 +91,12 @@ public UnaryCallSettings createSessionSettings() return ((SpannerStubSettings) getStubSettings()).createSessionSettings(); } + /** Returns the object with the settings used for calls to batchCreateSessions. */ + public UnaryCallSettings + batchCreateSessionsSettings() { + return ((SpannerStubSettings) getStubSettings()).batchCreateSessionsSettings(); + } + /** Returns the object with the settings used for calls to getSession. */ public UnaryCallSettings getSessionSettings() { return ((SpannerStubSettings) getStubSettings()).getSessionSettings(); @@ -258,6 +266,12 @@ public UnaryCallSettings.Builder createSessionSet return getStubSettingsBuilder().createSessionSettings(); } + /** Returns the builder for the settings used for calls to batchCreateSessions. */ + public UnaryCallSettings.Builder + batchCreateSessionsSettings() { + return getStubSettingsBuilder().batchCreateSessionsSettings(); + } + /** Returns the builder for the settings used for calls to getSession. */ public UnaryCallSettings.Builder getSessionSettings() { return getStubSettingsBuilder().getSessionSettings(); diff --git a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java index f38dd404abf8..e88a2c341407 100644 --- a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java +++ b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java @@ -28,6 +28,8 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.common.collect.ImmutableMap; import com.google.protobuf.Empty; +import com.google.spanner.v1.BatchCreateSessionsRequest; +import com.google.spanner.v1.BatchCreateSessionsResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -74,6 +76,16 @@ public class GrpcSpannerStub extends SpannerStub { ProtoUtils.marshaller(CreateSessionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Session.getDefaultInstance())) .build(); + private static final MethodDescriptor + batchCreateSessionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.spanner.v1.Spanner/BatchCreateSessions") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchCreateSessionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchCreateSessionsResponse.getDefaultInstance())) + .build(); private static final MethodDescriptor getSessionMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -182,6 +194,8 @@ public class GrpcSpannerStub extends SpannerStub { private final BackgroundResource backgroundResources; private final UnaryCallable createSessionCallable; + private final UnaryCallable + batchCreateSessionsCallable; private final UnaryCallable getSessionCallable; private final UnaryCallable listSessionsCallable; private final UnaryCallable @@ -249,6 +263,20 @@ public Map extract(CreateSessionRequest request) { } }) .build(); + GrpcCallSettings + batchCreateSessionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchCreateSessionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchCreateSessionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("database", String.valueOf(request.getDatabase())); + return params.build(); + } + }) + .build(); GrpcCallSettings getSessionTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getSessionMethodDescriptor) @@ -423,6 +451,11 @@ public Map extract(PartitionReadRequest request) { this.createSessionCallable = callableFactory.createUnaryCallable( createSessionTransportSettings, settings.createSessionSettings(), clientContext); + this.batchCreateSessionsCallable = + callableFactory.createUnaryCallable( + batchCreateSessionsTransportSettings, + settings.batchCreateSessionsSettings(), + clientContext); this.getSessionCallable = callableFactory.createUnaryCallable( getSessionTransportSettings, settings.getSessionSettings(), clientContext); @@ -475,6 +508,11 @@ public UnaryCallable createSessionCallable() { return createSessionCallable; } + public UnaryCallable + batchCreateSessionsCallable() { + return batchCreateSessionsCallable; + } + public UnaryCallable getSessionCallable() { return getSessionCallable; } diff --git a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java index 0b72ec8200d2..b02d74d57eb6 100644 --- a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java +++ b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java @@ -22,6 +22,8 @@ import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.protobuf.Empty; +import com.google.spanner.v1.BatchCreateSessionsRequest; +import com.google.spanner.v1.BatchCreateSessionsResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -58,6 +60,11 @@ public UnaryCallable createSessionCallable() { throw new UnsupportedOperationException("Not implemented: createSessionCallable()"); } + public UnaryCallable + batchCreateSessionsCallable() { + throw new UnsupportedOperationException("Not implemented: batchCreateSessionsCallable()"); + } + public UnaryCallable getSessionCallable() { throw new UnsupportedOperationException("Not implemented: getSessionCallable()"); } diff --git a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java index efa32b84a399..8a3e67d22662 100644 --- a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java +++ b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java @@ -45,6 +45,8 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import com.google.protobuf.Empty; +import com.google.spanner.v1.BatchCreateSessionsRequest; +import com.google.spanner.v1.BatchCreateSessionsResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -107,6 +109,8 @@ public class SpannerStubSettings extends StubSettings { .build(); private final UnaryCallSettings createSessionSettings; + private final UnaryCallSettings + batchCreateSessionsSettings; private final UnaryCallSettings getSessionSettings; private final PagedCallSettings< ListSessionsRequest, ListSessionsResponse, ListSessionsPagedResponse> @@ -130,6 +134,12 @@ public UnaryCallSettings createSessionSettings() return createSessionSettings; } + /** Returns the object with the settings used for calls to batchCreateSessions. */ + public UnaryCallSettings + batchCreateSessionsSettings() { + return batchCreateSessionsSettings; + } + /** Returns the object with the settings used for calls to getSession. */ public UnaryCallSettings getSessionSettings() { return getSessionSettings; @@ -267,6 +277,7 @@ protected SpannerStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); createSessionSettings = settingsBuilder.createSessionSettings().build(); + batchCreateSessionsSettings = settingsBuilder.batchCreateSessionsSettings().build(); getSessionSettings = settingsBuilder.getSessionSettings().build(); listSessionsSettings = settingsBuilder.listSessionsSettings().build(); deleteSessionSettings = settingsBuilder.deleteSessionSettings().build(); @@ -340,6 +351,8 @@ public static class Builder extends StubSettings.Builder> unaryMethodSettingsBuilders; private final UnaryCallSettings.Builder createSessionSettings; + private final UnaryCallSettings.Builder + batchCreateSessionsSettings; private final UnaryCallSettings.Builder getSessionSettings; private final PagedCallSettings.Builder< ListSessionsRequest, ListSessionsResponse, ListSessionsPagedResponse> @@ -428,6 +441,8 @@ protected Builder(ClientContext clientContext) { createSessionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchCreateSessionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getSessionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listSessionsSettings = PagedCallSettings.newBuilder(LIST_SESSIONS_PAGE_STR_FACT); @@ -457,6 +472,7 @@ protected Builder(ClientContext clientContext) { unaryMethodSettingsBuilders = ImmutableList.>of( createSessionSettings, + batchCreateSessionsSettings, getSessionSettings, listSessionsSettings, deleteSessionSettings, @@ -488,6 +504,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .batchCreateSessionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .getSessionSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) @@ -560,6 +581,7 @@ protected Builder(SpannerStubSettings settings) { super(settings); createSessionSettings = settings.createSessionSettings.toBuilder(); + batchCreateSessionsSettings = settings.batchCreateSessionsSettings.toBuilder(); getSessionSettings = settings.getSessionSettings.toBuilder(); listSessionsSettings = settings.listSessionsSettings.toBuilder(); deleteSessionSettings = settings.deleteSessionSettings.toBuilder(); @@ -577,6 +599,7 @@ protected Builder(SpannerStubSettings settings) { unaryMethodSettingsBuilders = ImmutableList.>of( createSessionSettings, + batchCreateSessionsSettings, getSessionSettings, listSessionsSettings, deleteSessionSettings, @@ -611,6 +634,12 @@ public UnaryCallSettings.Builder createSessionSet return createSessionSettings; } + /** Returns the builder for the settings used for calls to batchCreateSessions. */ + public UnaryCallSettings.Builder + batchCreateSessionsSettings() { + return batchCreateSessionsSettings; + } + /** Returns the builder for the settings used for calls to getSession. */ public UnaryCallSettings.Builder getSessionSettings() { return getSessionSettings; diff --git a/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java b/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java index 7a1465d9ac97..18402ea132fc 100644 --- a/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java +++ b/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java @@ -18,6 +18,8 @@ import com.google.api.core.BetaApi; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; +import com.google.spanner.v1.BatchCreateSessionsRequest; +import com.google.spanner.v1.BatchCreateSessionsResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -92,6 +94,22 @@ public void createSession( } } + @Override + public void batchCreateSessions( + BatchCreateSessionsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof BatchCreateSessionsResponse) { + requests.add(request); + responseObserver.onNext((BatchCreateSessionsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + @Override public void getSession(GetSessionRequest request, StreamObserver responseObserver) { Object response = responses.remove(); diff --git a/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java b/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java index bce486411815..de62de2c5fd8 100644 --- a/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java +++ b/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java @@ -31,6 +31,8 @@ import com.google.protobuf.AbstractMessage; import com.google.protobuf.ByteString; import com.google.protobuf.Empty; +import com.google.spanner.v1.BatchCreateSessionsRequest; +import com.google.spanner.v1.BatchCreateSessionsResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -140,6 +142,44 @@ public void createSessionExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void batchCreateSessionsTest() { + BatchCreateSessionsResponse expectedResponse = BatchCreateSessionsResponse.newBuilder().build(); + mockSpanner.addResponse(expectedResponse); + + DatabaseName database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + + BatchCreateSessionsResponse actualResponse = client.batchCreateSessions(database); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSpanner.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateSessionsRequest actualRequest = (BatchCreateSessionsRequest) actualRequests.get(0); + + Assert.assertEquals(database, DatabaseName.parse(actualRequest.getDatabase())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void batchCreateSessionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockSpanner.addException(exception); + + try { + DatabaseName database = DatabaseName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"); + + client.batchCreateSessions(database); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void getSessionTest() { diff --git a/google-cloud-clients/google-cloud-spanner/synth.metadata b/google-cloud-clients/google-cloud-spanner/synth.metadata index a099574460ed..8a85adcad907 100644 --- a/google-cloud-clients/google-cloud-spanner/synth.metadata +++ b/google-cloud-clients/google-cloud-spanner/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-08-13T07:56:28.091034Z", + "updateTime": "2019-08-23T07:57:47.645515Z", "sources": [ { "generator": { "name": "artman", - "version": "0.33.0", - "dockerImage": "googleapis/artman@sha256:c6231efb525569736226b1f7af7565dbc84248efafb3692a5bb1d2d8a7975d53" + "version": "0.34.0", + "dockerImage": "googleapis/artman@sha256:38a27ba6245f96c3e86df7acb2ebcc33b4f186d9e475efe2d64303aec3d4e0ea" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "db02bc9c107268372f256dd72ebeecfa20c06007", - "internalRef": "263073419" + "sha": "9c9f778aedde02f9826d2ae5d0f9c96409ba0f25", + "internalRef": "264996596" } } ],