diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 44801b1f9f5..765034b4548 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,7 +27,7 @@ jobs: matrix: java: [11, 17] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: temurin @@ -41,7 +41,7 @@ jobs: name: "units (8)" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: java-version: 8 @@ -58,7 +58,7 @@ jobs: windows: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: java-version: 8 @@ -81,7 +81,7 @@ jobs: matrix: java: [17] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: temurin @@ -91,7 +91,7 @@ jobs: javadoc: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: temurin @@ -103,7 +103,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: temurin @@ -115,7 +115,7 @@ jobs: clirr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: temurin diff --git a/.github/workflows/integration-tests-against-emulator.yaml b/.github/workflows/integration-tests-against-emulator.yaml index c7918cdd0f7..87a143a7dfd 100644 --- a/.github/workflows/integration-tests-against-emulator.yaml +++ b/.github/workflows/integration-tests-against-emulator.yaml @@ -16,7 +16,7 @@ jobs: - 9020:9020 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index 5bfeb995425..36e725f6aa2 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -5,7 +5,7 @@ jobs: checkstyle: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-java@v1 with: java-version: 8 @@ -16,7 +16,7 @@ jobs: name: "compile (8)" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: # Java 11 to generate class file targeting Java 8 @@ -38,7 +38,7 @@ jobs: matrix: java: [11, 17] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: java-version: ${{matrix.java}} diff --git a/CHANGELOG.md b/CHANGELOG.md index 91ffdf41128..e5b320d8883 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [6.48.0](https://github.com/googleapis/java-spanner/compare/v6.47.0...v6.48.0) (2023-09-26) + + +### Features + +* Add support for BatchWriteAtLeastOnce ([#2520](https://github.com/googleapis/java-spanner/issues/2520)) ([8ea7bd1](https://github.com/googleapis/java-spanner/commit/8ea7bd18e92a7c5547d8a33bf46c1e322326447b)) + + +### Bug Fixes + +* Retry aborted errors for writeAtLeastOnce ([#2627](https://github.com/googleapis/java-spanner/issues/2627)) ([2addb19](https://github.com/googleapis/java-spanner/commit/2addb1930a7b9ada4a4304a44a36d8ff1397cf9e)) + + +### Dependencies + +* Update actions/checkout action to v4 ([#2608](https://github.com/googleapis/java-spanner/issues/2608)) ([59f3e70](https://github.com/googleapis/java-spanner/commit/59f3e7047a0a9578350b37b46395377d7e014763)) +* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.27 ([#2574](https://github.com/googleapis/java-spanner/issues/2574)) ([e804a4c](https://github.com/googleapis/java-spanner/commit/e804a4c60f369ca88b804fef182b5afae44bd05e)) +* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.27 ([#2575](https://github.com/googleapis/java-spanner/issues/2575)) ([6fe132a](https://github.com/googleapis/java-spanner/commit/6fe132a7c1458da4fc28c950009d152643ced038)) + ## [6.47.0](https://github.com/googleapis/java-spanner/compare/v6.46.0...v6.47.0) (2023-09-12) diff --git a/README.md b/README.md index 1e9cfcc7777..7628327dae8 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.22.0 + 26.23.0 pom import @@ -42,7 +42,7 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-spanner - 6.44.0 + 6.47.0 ``` @@ -50,20 +50,20 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.22.0') +implementation platform('com.google.cloud:libraries-bom:26.23.0') implementation 'com.google.cloud:google-cloud-spanner' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-spanner:6.46.0' +implementation 'com.google.cloud:google-cloud-spanner:6.47.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.46.0" +libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.47.0" ``` @@ -431,7 +431,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-spanner.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.46.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.47.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/google-cloud-spanner-bom/pom.xml b/google-cloud-spanner-bom/pom.xml index f5eb2533fa3..656d156a2cb 100644 --- a/google-cloud-spanner-bom/pom.xml +++ b/google-cloud-spanner-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-spanner-bom - 6.47.0 + 6.48.0 pom com.google.cloud @@ -53,48 +53,48 @@ com.google.cloud google-cloud-spanner - 6.47.0 + 6.48.0 com.google.cloud google-cloud-spanner-executor - 6.47.0 + 6.48.0 com.google.cloud google-cloud-spanner test-jar - 6.47.0 + 6.48.0 com.google.api.grpc grpc-google-cloud-spanner-v1 - 6.47.0 + 6.48.0 com.google.api.grpc grpc-google-cloud-spanner-admin-instance-v1 - 6.47.0 + 6.48.0 com.google.api.grpc grpc-google-cloud-spanner-admin-database-v1 - 6.47.0 + 6.48.0 com.google.api.grpc proto-google-cloud-spanner-admin-instance-v1 - 6.47.0 + 6.48.0 com.google.api.grpc proto-google-cloud-spanner-v1 - 6.47.0 + 6.48.0 com.google.api.grpc proto-google-cloud-spanner-admin-database-v1 - 6.47.0 + 6.48.0 diff --git a/google-cloud-spanner-executor/pom.xml b/google-cloud-spanner-executor/pom.xml index 77cfa3836f2..1e0ba46105d 100644 --- a/google-cloud-spanner-executor/pom.xml +++ b/google-cloud-spanner-executor/pom.xml @@ -5,14 +5,14 @@ 4.0.0 com.google.cloud google-cloud-spanner-executor - 6.47.0 + 6.48.0 jar Google Cloud Spanner Executor com.google.cloud google-cloud-spanner-parent - 6.47.0 + 6.48.0 diff --git a/google-cloud-spanner/pom.xml b/google-cloud-spanner/pom.xml index 200d1b9407d..560093de60f 100644 --- a/google-cloud-spanner/pom.xml +++ b/google-cloud-spanner/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-spanner - 6.47.0 + 6.48.0 jar Google Cloud Spanner https://github.com/googleapis/java-spanner @@ -11,7 +11,7 @@ com.google.cloud google-cloud-spanner-parent - 6.47.0 + 6.48.0 google-cloud-spanner diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java index f6acf04b6ca..06237131458 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java @@ -16,10 +16,12 @@ package com.google.cloud.spanner; +import com.google.api.gax.rpc.ServerStream; import com.google.cloud.Timestamp; import com.google.cloud.spanner.Options.RpcPriority; import com.google.cloud.spanner.Options.TransactionOption; import com.google.cloud.spanner.Options.UpdateOption; +import com.google.spanner.v1.BatchWriteResponse; /** * Interface for all the APIs that are used to read/write data into a Cloud Spanner database. An @@ -191,6 +193,56 @@ CommitResponse writeWithOptions(Iterable mutations, TransactionOption. CommitResponse writeAtLeastOnceWithOptions( Iterable mutations, TransactionOption... options) throws SpannerException; + /** + * Applies batch of mutation groups in a collection of efficient transactions. The mutation groups + * are applied non-atomically in an unspecified order and thus, they must be independent of each + * other. Partial failure is possible, i.e., some mutation groups may have been applied + * successfully, while some may have failed. The results of individual batches are streamed into + * the response as and when the batches are applied. + * + *

One BatchWriteResponse can contain the results for multiple MutationGroups. Inspect the + * indexes field to determine the MutationGroups that the BatchWriteResponse is for. + * + *

The mutation groups may be applied more than once. This can lead to failures if the mutation + * groups are non-idempotent. For example, an insert that is replayed can return an {@link + * ErrorCode#ALREADY_EXISTS} error. For this reason, users of the library may prefer to use {@link + * #write(Iterable)} instead. However, {@code batchWriteAtLeastOnce()} method may be appropriate + * for non-atomically committing multiple mutation groups in a single RPC with low latency. + * + *

Example of BatchWriteAtLeastOnce + * + *

{@code
+   * Iterable mutationGroups =
+   *     ImmutableList.of(
+   *         MutationGroup.of(
+   *             Mutation.newInsertBuilder("FOO1").set("ID").to(1L).set("NAME").to("Bar1").build(),
+   *             Mutation.newInsertBuilder("FOO2").set("ID").to(2L).set("NAME").to("Bar2").build()),
+   *         MutationGroup.of(
+   *             Mutation.newInsertBuilder("FOO3").set("ID").to(3L).set("NAME").to("Bar3").build(),
+   *             Mutation.newInsertBuilder("FOO4").set("ID").to(4L).set("NAME").to("Bar4").build()),
+   *         MutationGroup.of(
+   *             Mutation.newInsertBuilder("FOO4").set("ID").to(4L).set("NAME").to("Bar4").build(),
+   *             Mutation.newInsertBuilder("FOO5").set("ID").to(5L).set("NAME").to("Bar5").build()),
+   *         MutationGroup.of(
+   *             Mutation.newInsertBuilder("FOO6").set("ID").to(6L).set("NAME").to("Bar6").build()));
+   * ServerStream responses =
+   *     dbClient.batchWriteAtLeastOnce(mutationGroups, Options.tag("batch-write-tag"));
+   * for (BatchWriteResponse response : responses) {
+   *   // Do something when a response is received.
+   * }
+   * }
+ * + * Options for a transaction can include: + * + *
    + *
  • {@link Options#priority(com.google.cloud.spanner.Options.RpcPriority)}: The {@link + * RpcPriority} to use for the batch write request. + *
  • {@link Options#tag(String)}: The transaction tag to use for the batch write request. + *
+ */ + ServerStream batchWriteAtLeastOnce( + Iterable mutationGroups, TransactionOption... options) throws SpannerException; + /** * Returns a context in which a single read can be performed using {@link TimestampBound#strong()} * concurrency. This method will return a {@link ReadContext} that will not return the read diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java index a2a46b5a198..3835cb1f338 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java @@ -16,6 +16,7 @@ package com.google.cloud.spanner; +import com.google.api.gax.rpc.ServerStream; import com.google.cloud.Timestamp; import com.google.cloud.spanner.Options.TransactionOption; import com.google.cloud.spanner.Options.UpdateOption; @@ -24,6 +25,7 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; import com.google.common.util.concurrent.ListenableFuture; +import com.google.spanner.v1.BatchWriteResponse; import io.opencensus.common.Scope; import io.opencensus.trace.Span; import io.opencensus.trace.Tracer; @@ -106,6 +108,21 @@ public CommitResponse writeAtLeastOnceWithOptions( } } + @Override + public ServerStream batchWriteAtLeastOnce( + final Iterable mutationGroups, final TransactionOption... options) + throws SpannerException { + Span span = tracer.spanBuilder(READ_WRITE_TRANSACTION).startSpan(); + try (Scope s = tracer.withSpan(span)) { + return runWithSessionRetry(session -> session.batchWriteAtLeastOnce(mutationGroups, options)); + } catch (RuntimeException e) { + TraceUtil.setWithFailure(span, e); + throw e; + } finally { + span.end(TraceUtil.END_SPAN_OPTIONS); + } + } + @Override public ReadContext singleUse() { Span span = tracer.spanBuilder(READ_ONLY_TRANSACTION).startSpan(); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MutationGroup.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MutationGroup.java new file mode 100644 index 00000000000..101ffe48349 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MutationGroup.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner; + +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableList; +import com.google.spanner.v1.BatchWriteRequest; +import java.util.ArrayList; +import java.util.List; + +/** Represents a group of Cloud Spanner mutations to be committed together. */ +public class MutationGroup { + private final ImmutableList mutations; + + private MutationGroup(ImmutableList mutations) { + this.mutations = mutations; + } + + /** Creates a {@code MutationGroup} given a vararg of mutations. */ + public static MutationGroup of(Mutation... mutations) { + Preconditions.checkArgument(mutations.length > 0, "Should pass in at least one mutation."); + return new MutationGroup(ImmutableList.copyOf(mutations)); + } + + /** Creates a {@code MutationGroup} given an iterable of mutations. */ + public static MutationGroup of(Iterable mutations) { + return new MutationGroup(ImmutableList.copyOf(mutations)); + } + + /** Returns corresponding mutations for this MutationGroup. */ + public ImmutableList getMutations() { + return mutations; + } + + static BatchWriteRequest.MutationGroup toProto(final MutationGroup mutationGroup) { + List mutationsProto = new ArrayList<>(); + Mutation.toProto(mutationGroup.getMutations(), mutationsProto); + return BatchWriteRequest.MutationGroup.newBuilder().addAllMutations(mutationsProto).build(); + } + + static List toListProto( + final Iterable mutationGroups) { + List mutationGroupsProto = new ArrayList<>(); + for (MutationGroup group : mutationGroups) { + mutationGroupsProto.add(toProto(group)); + } + return mutationGroupsProto; + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java index 2bef8e3ada4..002a00134f6 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java @@ -21,6 +21,7 @@ import com.google.api.core.ApiFuture; import com.google.api.core.SettableApiFuture; +import com.google.api.gax.rpc.ServerStream; import com.google.cloud.Timestamp; import com.google.cloud.spanner.AbstractReadContext.MultiUseReadOnlyTransaction; import com.google.cloud.spanner.AbstractReadContext.SingleReadContext; @@ -35,6 +36,8 @@ import com.google.common.util.concurrent.MoreExecutors; import com.google.protobuf.ByteString; import com.google.protobuf.Empty; +import com.google.spanner.v1.BatchWriteRequest; +import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.RequestOptions; @@ -160,7 +163,6 @@ public CommitResponse writeAtLeastOnceWithOptions( Iterable mutations, TransactionOption... transactionOptions) throws SpannerException { setActive(null); - Options commitRequestOptions = Options.fromTransactionOptions(transactionOptions); List mutationsProto = new ArrayList<>(); Mutation.toProto(mutations, mutationsProto); final CommitRequest.Builder requestBuilder = @@ -172,21 +174,15 @@ public CommitResponse writeAtLeastOnceWithOptions( .setSingleUseTransaction( TransactionOptions.newBuilder() .setReadWrite(TransactionOptions.ReadWrite.getDefaultInstance())); - if (commitRequestOptions.hasPriority() || commitRequestOptions.hasTag()) { - RequestOptions.Builder requestOptionsBuilder = RequestOptions.newBuilder(); - if (commitRequestOptions.hasPriority()) { - requestOptionsBuilder.setPriority(commitRequestOptions.priority()); - } - if (commitRequestOptions.hasTag()) { - requestOptionsBuilder.setTransactionTag(commitRequestOptions.tag()); - } - requestBuilder.setRequestOptions(requestOptionsBuilder.build()); + RequestOptions commitRequestOptions = getRequestOptions(transactionOptions); + if (commitRequestOptions != null) { + requestBuilder.setRequestOptions(commitRequestOptions); } + CommitRequest request = requestBuilder.build(); Span span = tracer.spanBuilder(SpannerImpl.COMMIT).startSpan(); try (Scope s = tracer.withSpan(span)) { - com.google.spanner.v1.CommitResponse response = - spanner.getRpc().commit(requestBuilder.build(), this.options); - return new CommitResponse(response); + return SpannerRetryHelper.runTxWithRetriesOnAborted( + () -> new CommitResponse(spanner.getRpc().commit(request, this.options))); } catch (RuntimeException e) { TraceUtil.setWithFailure(span, e); throw e; @@ -195,6 +191,45 @@ public CommitResponse writeAtLeastOnceWithOptions( } } + private RequestOptions getRequestOptions(TransactionOption... transactionOptions) { + Options requestOptions = Options.fromTransactionOptions(transactionOptions); + if (requestOptions.hasPriority() || requestOptions.hasTag()) { + RequestOptions.Builder requestOptionsBuilder = RequestOptions.newBuilder(); + if (requestOptions.hasPriority()) { + requestOptionsBuilder.setPriority(requestOptions.priority()); + } + if (requestOptions.hasTag()) { + requestOptionsBuilder.setTransactionTag(requestOptions.tag()); + } + return requestOptionsBuilder.build(); + } + return null; + } + + @Override + public ServerStream batchWriteAtLeastOnce( + Iterable mutationGroups, TransactionOption... transactionOptions) + throws SpannerException { + setActive(null); + List mutationGroupsProto = + MutationGroup.toListProto(mutationGroups); + final BatchWriteRequest.Builder requestBuilder = + BatchWriteRequest.newBuilder().setSession(name).addAllMutationGroups(mutationGroupsProto); + RequestOptions batchWriteRequestOptions = getRequestOptions(transactionOptions); + if (batchWriteRequestOptions != null) { + requestBuilder.setRequestOptions(batchWriteRequestOptions); + } + Span span = tracer.spanBuilder(SpannerImpl.BATCH_WRITE).startSpan(); + try (Scope s = tracer.withSpan(span)) { + return spanner.getRpc().batchWriteAtLeastOnce(requestBuilder.build(), this.options); + } catch (Throwable e) { + TraceUtil.setWithFailure(span, e); + throw SpannerExceptionFactory.newSpannerException(e); + } finally { + span.end(TraceUtil.END_SPAN_OPTIONS); + } + } + @Override public ReadContext singleUse() { return singleUse(TimestampBound.strong()); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java index c97fbf9b643..eb9b365f345 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java @@ -43,6 +43,7 @@ import com.google.api.core.ApiFutures; import com.google.api.core.SettableApiFuture; import com.google.api.gax.core.ExecutorProvider; +import com.google.api.gax.rpc.ServerStream; import com.google.cloud.Timestamp; import com.google.cloud.grpc.GrpcTransportOptions; import com.google.cloud.grpc.GrpcTransportOptions.ExecutorFactory; @@ -69,6 +70,7 @@ import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.SettableFuture; import com.google.protobuf.Empty; +import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.ResultSetStats; import io.opencensus.common.Scope; import io.opencensus.metrics.DerivedLongCumulative; @@ -1172,6 +1174,17 @@ public CommitResponse writeAtLeastOnceWithOptions( } } + @Override + public ServerStream batchWriteAtLeastOnce( + Iterable mutationGroups, TransactionOption... options) + throws SpannerException { + try { + return get().batchWriteAtLeastOnce(mutationGroups, options); + } finally { + close(); + } + } + @Override public ReadContext singleUse() { try { @@ -1465,6 +1478,18 @@ public CommitResponse writeAtLeastOnceWithOptions( } } + @Override + public ServerStream batchWriteAtLeastOnce( + Iterable mutationGroups, TransactionOption... options) + throws SpannerException { + try { + markUsed(); + return delegate.batchWriteAtLeastOnce(mutationGroups, options); + } catch (SpannerException e) { + throw lastException = e; + } + } + @Override public long executePartitionedUpdate(Statement stmt, UpdateOption... options) throws SpannerException { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java index 721be9cd762..5ff916bbe93 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java @@ -66,6 +66,7 @@ class SpannerImpl extends BaseService implements Spanner { static final String COMMIT = "CloudSpannerOperation.Commit"; static final String QUERY = "CloudSpannerOperation.ExecuteStreamingQuery"; static final String READ = "CloudSpannerOperation.ExecuteStreamingRead"; + static final String BATCH_WRITE = "CloudSpannerOperation.BatchWrite"; private static final Object CLIENT_ID_LOCK = new Object(); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java index 3e6fc5fbcb8..bdf038f0be7 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java @@ -157,6 +157,8 @@ import com.google.spanner.admin.instance.v1.UpdateInstanceMetadata; import com.google.spanner.admin.instance.v1.UpdateInstanceRequest; import com.google.spanner.v1.BatchCreateSessionsRequest; +import com.google.spanner.v1.BatchWriteRequest; +import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -1684,6 +1686,14 @@ public ServerStream executeStreamingPartitionedDml( return partitionedDmlStub.executeStreamingSqlCallable().call(request, context); } + @Override + public ServerStream batchWriteAtLeastOnce( + BatchWriteRequest request, @Nullable Map options) { + GrpcCallContext context = + newCallContext(options, request.getSession(), request, SpannerGrpc.getBatchWriteMethod()); + return spannerStub.batchWriteCallable().call(request, context); + } + @Override public StreamingCall executeQuery( ExecuteSqlRequest request, diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerRpc.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerRpc.java index 53b4b97764f..39f798e0113 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerRpc.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerRpc.java @@ -403,6 +403,9 @@ ApiFuture executeQueryAsync( ServerStream executeStreamingPartitionedDml( ExecuteSqlRequest request, @Nullable Map options, Duration timeout); + ServerStream batchWriteAtLeastOnce( + BatchWriteRequest request, @Nullable Map options); + /** * Executes a query with streaming result. * diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java index 0eb07bc1e81..4f7266a0cee 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java @@ -32,6 +32,8 @@ import com.google.protobuf.Empty; import com.google.spanner.v1.BatchCreateSessionsRequest; import com.google.spanner.v1.BatchCreateSessionsResponse; +import com.google.spanner.v1.BatchWriteRequest; +import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -2011,6 +2013,49 @@ public final UnaryCallable partitionRea return stub.partitionReadCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Batches the supplied mutation groups in a collection of efficient transactions. All mutations + * in a group are committed atomically. However, mutations across groups can be committed + * non-atomically in an unspecified order and thus, they must be independent of each other. + * Partial failure is possible, i.e., some groups may have been committed successfully, while some + * may have failed. The results of individual batches are streamed into the response as the + * batches are applied. + * + *

BatchWrite requests are not replay protected, meaning that each mutation group may be + * applied more than once. Replays of non-idempotent mutations may have undesirable effects. For + * example, replays of an insert mutation may produce an already exists error or if you use + * generated or commit timestamp-based keys, it may result in additional rows being added to the + * mutation's table. We recommend structuring your mutation groups to be idempotent to avoid this + * issue. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (SpannerClient spannerClient = SpannerClient.create()) {
+   *   BatchWriteRequest request =
+   *       BatchWriteRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]").toString())
+   *           .setRequestOptions(RequestOptions.newBuilder().build())
+   *           .addAllMutationGroups(new ArrayList())
+   *           .build();
+   *   ServerStream stream = spannerClient.batchWriteCallable().call(request);
+   *   for (BatchWriteResponse response : stream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final ServerStreamingCallable batchWriteCallable() { + return stub.batchWriteCallable(); + } + @Override public final void close() { stub.close(); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java index d76625776fd..f83cee51475 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java @@ -35,6 +35,8 @@ import com.google.protobuf.Empty; import com.google.spanner.v1.BatchCreateSessionsRequest; import com.google.spanner.v1.BatchCreateSessionsResponse; +import com.google.spanner.v1.BatchWriteRequest; +import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -177,6 +179,11 @@ public UnaryCallSettings partitionReadS return ((SpannerStubSettings) getStubSettings()).partitionReadSettings(); } + /** Returns the object with the settings used for calls to batchWrite. */ + public ServerStreamingCallSettings batchWriteSettings() { + return ((SpannerStubSettings) getStubSettings()).batchWriteSettings(); + } + public static final SpannerSettings create(SpannerStubSettings stub) throws IOException { return new SpannerSettings.Builder(stub.toBuilder()).build(); } @@ -375,6 +382,12 @@ public UnaryCallSettings.Builder rollbackSettings() { return getStubSettingsBuilder().partitionReadSettings(); } + /** Returns the builder for the settings used for calls to batchWrite. */ + public ServerStreamingCallSettings.Builder + batchWriteSettings() { + return getStubSettingsBuilder().batchWriteSettings(); + } + @Override public SpannerSettings build() throws IOException { return new SpannerSettings(this); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/gapic_metadata.json b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/gapic_metadata.json index 26711916dbb..a44723b0730 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/gapic_metadata.json +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/gapic_metadata.json @@ -13,6 +13,9 @@ "BatchCreateSessions": { "methods": ["batchCreateSessions", "batchCreateSessions", "batchCreateSessions", "batchCreateSessionsCallable"] }, + "BatchWrite": { + "methods": ["batchWriteCallable"] + }, "BeginTransaction": { "methods": ["beginTransaction", "beginTransaction", "beginTransaction", "beginTransactionCallable"] }, diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java index a4b04339013..7b527bb272c 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java @@ -30,6 +30,8 @@ import com.google.protobuf.Empty; import com.google.spanner.v1.BatchCreateSessionsRequest; import com.google.spanner.v1.BatchCreateSessionsResponse; +import com.google.spanner.v1.BatchWriteRequest; +import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -202,6 +204,15 @@ public class GrpcSpannerStub extends SpannerStub { .setResponseMarshaller(ProtoUtils.marshaller(PartitionResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + batchWriteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName("google.spanner.v1.Spanner/BatchWrite") + .setRequestMarshaller(ProtoUtils.marshaller(BatchWriteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(BatchWriteResponse.getDefaultInstance())) + .build(); + private final UnaryCallable createSessionCallable; private final UnaryCallable batchCreateSessionsCallable; @@ -222,6 +233,7 @@ public class GrpcSpannerStub extends SpannerStub { private final UnaryCallable rollbackCallable; private final UnaryCallable partitionQueryCallable; private final UnaryCallable partitionReadCallable; + private final ServerStreamingCallable batchWriteCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -414,6 +426,16 @@ protected GrpcSpannerStub( return builder.build(); }) .build(); + GrpcCallSettings batchWriteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchWriteMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("session", String.valueOf(request.getSession())); + return builder.build(); + }) + .build(); this.createSessionCallable = callableFactory.createUnaryCallable( @@ -467,6 +489,9 @@ protected GrpcSpannerStub( this.partitionReadCallable = callableFactory.createUnaryCallable( partitionReadTransportSettings, settings.partitionReadSettings(), clientContext); + this.batchWriteCallable = + callableFactory.createServerStreamingCallable( + batchWriteTransportSettings, settings.batchWriteSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -558,6 +583,11 @@ public UnaryCallable partitionReadCalla return partitionReadCallable; } + @Override + public ServerStreamingCallable batchWriteCallable() { + return batchWriteCallable; + } + @Override public final void close() { try { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerStub.java index 10e20e619e4..babe01e361d 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerStub.java @@ -36,6 +36,8 @@ import com.google.protobuf.TypeRegistry; import com.google.spanner.v1.BatchCreateSessionsRequest; import com.google.spanner.v1.BatchCreateSessionsResponse; +import com.google.spanner.v1.BatchWriteRequest; +import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -618,6 +620,43 @@ public class HttpJsonSpannerStub extends SpannerStub { .build()) .build(); + private static final ApiMethodDescriptor + batchWriteMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.spanner.v1.Spanner/BatchWrite") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.SERVER_STREAMING) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:batchWrite", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "session", request.getSession()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearSession().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchWriteResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable createSessionCallable; private final UnaryCallable batchCreateSessionsCallable; @@ -638,6 +677,7 @@ public class HttpJsonSpannerStub extends SpannerStub { private final UnaryCallable rollbackCallable; private final UnaryCallable partitionQueryCallable; private final UnaryCallable partitionReadCallable; + private final ServerStreamingCallable batchWriteCallable; private final BackgroundResource backgroundResources; private final HttpJsonStubCallableFactory callableFactory; @@ -846,6 +886,17 @@ protected HttpJsonSpannerStub( return builder.build(); }) .build(); + HttpJsonCallSettings batchWriteTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(batchWriteMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("session", String.valueOf(request.getSession())); + return builder.build(); + }) + .build(); this.createSessionCallable = callableFactory.createUnaryCallable( @@ -899,6 +950,9 @@ protected HttpJsonSpannerStub( this.partitionReadCallable = callableFactory.createUnaryCallable( partitionReadTransportSettings, settings.partitionReadSettings(), clientContext); + this.batchWriteCallable = + callableFactory.createServerStreamingCallable( + batchWriteTransportSettings, settings.batchWriteSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -922,6 +976,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(rollbackMethodDescriptor); methodDescriptors.add(partitionQueryMethodDescriptor); methodDescriptors.add(partitionReadMethodDescriptor); + methodDescriptors.add(batchWriteMethodDescriptor); return methodDescriptors; } @@ -1007,6 +1062,11 @@ public UnaryCallable partitionReadCalla return partitionReadCallable; } + @Override + public ServerStreamingCallable batchWriteCallable() { + return batchWriteCallable; + } + @Override public final void close() { try { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java index 4a5886cdc5b..3280b0b6bbd 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java @@ -24,6 +24,8 @@ import com.google.protobuf.Empty; import com.google.spanner.v1.BatchCreateSessionsRequest; import com.google.spanner.v1.BatchCreateSessionsResponse; +import com.google.spanner.v1.BatchWriteRequest; +import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -121,6 +123,10 @@ public UnaryCallable partitionReadCalla throw new UnsupportedOperationException("Not implemented: partitionReadCallable()"); } + public ServerStreamingCallable batchWriteCallable() { + throw new UnsupportedOperationException("Not implemented: batchWriteCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java index c330f39e58f..ac47e6177e1 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java @@ -51,6 +51,8 @@ import com.google.protobuf.Empty; import com.google.spanner.v1.BatchCreateSessionsRequest; import com.google.spanner.v1.BatchCreateSessionsResponse; +import com.google.spanner.v1.BatchWriteRequest; +import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -141,6 +143,8 @@ public class SpannerStubSettings extends StubSettings { private final UnaryCallSettings rollbackSettings; private final UnaryCallSettings partitionQuerySettings; private final UnaryCallSettings partitionReadSettings; + private final ServerStreamingCallSettings + batchWriteSettings; private static final PagedListDescriptor LIST_SESSIONS_PAGE_STR_DESC = @@ -274,6 +278,11 @@ public UnaryCallSettings partitionReadS return partitionReadSettings; } + /** Returns the object with the settings used for calls to batchWrite. */ + public ServerStreamingCallSettings batchWriteSettings() { + return batchWriteSettings; + } + public SpannerStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -393,6 +402,7 @@ protected SpannerStubSettings(Builder settingsBuilder) throws IOException { rollbackSettings = settingsBuilder.rollbackSettings().build(); partitionQuerySettings = settingsBuilder.partitionQuerySettings().build(); partitionReadSettings = settingsBuilder.partitionReadSettings().build(); + batchWriteSettings = settingsBuilder.batchWriteSettings().build(); } /** Builder for SpannerStubSettings. */ @@ -422,6 +432,8 @@ public static class Builder extends StubSettings.Builder partitionReadSettings; + private final ServerStreamingCallSettings.Builder + batchWriteSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -513,6 +525,7 @@ protected Builder(ClientContext clientContext) { rollbackSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); partitionQuerySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); partitionReadSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchWriteSettings = ServerStreamingCallSettings.newBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -550,6 +563,7 @@ protected Builder(SpannerStubSettings settings) { rollbackSettings = settings.rollbackSettings.toBuilder(); partitionQuerySettings = settings.partitionQuerySettings.toBuilder(); partitionReadSettings = settings.partitionReadSettings.toBuilder(); + batchWriteSettings = settings.batchWriteSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -670,6 +684,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + builder + .batchWriteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + return builder; } @@ -772,6 +791,12 @@ public UnaryCallSettings.Builder rollbackSettings() { return partitionReadSettings; } + /** Returns the builder for the settings used for calls to batchWrite. */ + public ServerStreamingCallSettings.Builder + batchWriteSettings() { + return batchWriteSettings; + } + @Override public SpannerStubSettings build() throws IOException { return new SpannerStubSettings(this); diff --git a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.v1/reflect-config.json b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.v1/reflect-config.json index a7aab1356f6..85f59304a2e 100644 --- a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.v1/reflect-config.json +++ b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.v1/reflect-config.json @@ -1160,6 +1160,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.BatchWriteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.BatchWriteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.BatchWriteRequest$MutationGroup", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.BatchWriteRequest$MutationGroup$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.BatchWriteResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.BatchWriteResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.BeginTransactionRequest", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner/reflect-config.json b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner/reflect-config.json index ddb6ab0a676..b734ec5c1a4 100644 --- a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner/reflect-config.json +++ b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner/reflect-config.json @@ -1,4 +1,5 @@ -[ { +[ + { "name": "com.google.rpc.LocalizedMessage", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, @@ -6,7 +7,7 @@ "allPublicMethods": true, "allDeclaredClasses": true, "allPublicClasses": true -}, + }, { "name": "com.google.rpc.LocalizedMessage$Builder", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java index 250864f0baf..686efd3aff4 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java @@ -40,6 +40,7 @@ import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ServerStream; import com.google.api.gax.rpc.StatusCode; import com.google.cloud.ByteArray; import com.google.cloud.NoCredentials; @@ -71,6 +72,8 @@ import com.google.protobuf.ListValue; import com.google.protobuf.NullValue; import com.google.rpc.RetryInfo; +import com.google.spanner.v1.BatchWriteRequest; +import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.DeleteSessionRequest; import com.google.spanner.v1.ExecuteBatchDmlRequest; @@ -142,6 +145,31 @@ public class DatabaseClientImplTest { private static final Statement INVALID_UPDATE_STATEMENT = Statement.of("UPDATE NON_EXISTENT_TABLE SET BAR=1 WHERE BAZ=2"); private static final long UPDATE_COUNT = 1L; + private static final com.google.rpc.Status STATUS_OK = + com.google.rpc.Status.newBuilder().setCode(com.google.rpc.Code.OK_VALUE).build(); + private static final Iterable MUTATION_GROUPS = + ImmutableList.of( + MutationGroup.of( + Mutation.newInsertBuilder("FOO1").set("ID").to(1L).set("NAME").to("Bar1").build(), + Mutation.newInsertBuilder("FOO2").set("ID").to(2L).set("NAME").to("Bar2").build()), + MutationGroup.of( + Mutation.newInsertBuilder("FOO3").set("ID").to(3L).set("NAME").to("Bar3").build(), + Mutation.newInsertBuilder("FOO4").set("ID").to(4L).set("NAME").to("Bar4").build()), + MutationGroup.of( + Mutation.newInsertBuilder("FOO4").set("ID").to(4L).set("NAME").to("Bar4").build(), + Mutation.newInsertBuilder("FOO5").set("ID").to(5L).set("NAME").to("Bar5").build()), + MutationGroup.of( + Mutation.newInsertBuilder("FOO6").set("ID").to(6L).set("NAME").to("Bar6").build())); + private static final Iterable BATCH_WRITE_RESPONSES = + ImmutableList.of( + BatchWriteResponse.newBuilder() + .setStatus(STATUS_OK) + .addAllIndexes(ImmutableList.of(0, 1)) + .build(), + BatchWriteResponse.newBuilder() + .setStatus(STATUS_OK) + .addAllIndexes(ImmutableList.of(2, 3)) + .build()); private Spanner spanner; private Spanner spannerWithEmptySessionPool; private static ExecutorService executor; @@ -159,6 +187,7 @@ public static void startStaticServer() throws IOException { StatementResult.exception( INVALID_UPDATE_STATEMENT, Status.INVALID_ARGUMENT.withDescription("invalid statement").asRuntimeException())); + mockSpanner.setBatchWriteResult(BATCH_WRITE_RESPONSES); executor = Executors.newSingleThreadExecutor(); String uniqueName = InProcessServerBuilder.generateName(); @@ -525,6 +554,44 @@ public void testWrite() { assertEquals(Priority.PRIORITY_UNSPECIFIED, commit.getRequestOptions().getPriority()); } + @Test + public void testWriteAborted() { + DatabaseClient client = + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + // Force the Commit RPC to return Aborted the first time it is called. The exception is cleared + // after the first call, so the retry should succeed. + mockSpanner.setCommitExecutionTime( + SimulatedExecutionTime.ofException( + mockSpanner.createAbortedException(ByteString.copyFromUtf8("test")))); + Timestamp timestamp = + client.write( + Collections.singletonList( + Mutation.newInsertBuilder("FOO").set("ID").to(1L).set("NAME").to("Bar").build())); + assertNotNull(timestamp); + + List commitRequests = mockSpanner.getRequestsOfType(CommitRequest.class); + assertEquals(2, commitRequests.size()); + } + + @Test + public void testWriteAtLeastOnceAborted() { + DatabaseClient client = + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + // Force the Commit RPC to return Aborted the first time it is called. The exception is cleared + // after the first call, so the retry should succeed. + mockSpanner.setCommitExecutionTime( + SimulatedExecutionTime.ofException( + mockSpanner.createAbortedException(ByteString.copyFromUtf8("test")))); + Timestamp timestamp = + client.writeAtLeastOnce( + Collections.singletonList( + Mutation.newInsertBuilder("FOO").set("ID").to(1L).set("NAME").to("Bar").build())); + assertNotNull(timestamp); + + List commitRequests = mockSpanner.getRequestsOfType(CommitRequest.class); + assertEquals(2, commitRequests.size()); + } + @Test public void testWriteWithOptions() { DatabaseClient client = @@ -607,7 +674,7 @@ public void testWriteAtLeastOnceWithOptions() { } @Test - public void writeAtLeastOnceWithTagOptions() { + public void testWriteAtLeastOnceWithTagOptions() { DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); client.writeAtLeastOnceWithOptions( @@ -625,6 +692,62 @@ public void writeAtLeastOnceWithTagOptions() { assertThat(commit.getRequestOptions().getRequestTag()).isEmpty(); } + @Test + public void testBatchWriteAtLeastOnceWithoutOptions() { + DatabaseClient client = + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + + ServerStream responseStream = client.batchWriteAtLeastOnce(MUTATION_GROUPS); + int idx = 0; + for (BatchWriteResponse response : responseStream) { + assertEquals( + response.getStatus(), + com.google.rpc.Status.newBuilder().setCode(com.google.rpc.Code.OK_VALUE).build()); + assertEquals(response.getIndexesList(), ImmutableList.of(idx, idx + 1)); + idx += 2; + } + + assertNotNull(responseStream); + List requests = mockSpanner.getRequestsOfType(BatchWriteRequest.class); + assertEquals(requests.size(), 1); + BatchWriteRequest request = requests.get(0); + assertEquals(request.getMutationGroupsCount(), 4); + assertEquals(request.getRequestOptions().getPriority(), Priority.PRIORITY_UNSPECIFIED); + } + + @Test + public void testBatchWriteAtLeastOnceWithOptions() { + DatabaseClient client = + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + ServerStream responseStream = + client.batchWriteAtLeastOnce(MUTATION_GROUPS, Options.priority(RpcPriority.LOW)); + for (BatchWriteResponse response : responseStream) {} + + assertNotNull(responseStream); + List requests = mockSpanner.getRequestsOfType(BatchWriteRequest.class); + assertEquals(requests.size(), 1); + BatchWriteRequest request = requests.get(0); + assertEquals(request.getMutationGroupsCount(), 4); + assertEquals(request.getRequestOptions().getPriority(), Priority.PRIORITY_LOW); + } + + @Test + public void testBatchWriteAtLeastOnceWithTagOptions() { + DatabaseClient client = + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + ServerStream responseStream = + client.batchWriteAtLeastOnce(MUTATION_GROUPS, Options.tag("app=spanner,env=test")); + for (BatchWriteResponse response : responseStream) {} + + assertNotNull(responseStream); + List requests = mockSpanner.getRequestsOfType(BatchWriteRequest.class); + assertEquals(requests.size(), 1); + BatchWriteRequest request = requests.get(0); + assertEquals(request.getMutationGroupsCount(), 4); + assertEquals(request.getRequestOptions().getTransactionTag(), "app=spanner,env=test"); + assertThat(request.getRequestOptions().getRequestTag()).isEmpty(); + } + @Test public void testExecuteQueryWithTag() { DatabaseClient client = diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java index 4edc2e2bf77..7bf9f51a4ea 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java @@ -42,6 +42,8 @@ import com.google.rpc.RetryInfo; import com.google.spanner.v1.BatchCreateSessionsRequest; import com.google.spanner.v1.BatchCreateSessionsResponse; +import com.google.spanner.v1.BatchWriteRequest; +import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -260,7 +262,7 @@ public static StatementResult query(Statement statement, ResultSet resultSet) { */ public static StatementResult queryAndThen( Statement statement, ResultSet resultSet, ResultSet next) { - return new StatementResult(statement, resultSet); + return new StatementResult(statement, resultSet, next); } /** Creates a {@link StatementResult} for a read request. */ @@ -598,6 +600,7 @@ private static void checkStreamException( private ConcurrentMap transactionLastUsed = new ConcurrentHashMap<>(); private int maxNumSessionsInOneBatch = 100; private int maxTotalSessions = Integer.MAX_VALUE; + private Iterable batchWriteResult = new ArrayList<>(); private AtomicInteger numSessionsCreated = new AtomicInteger(); private SimulatedExecutionTime beginTransactionExecutionTime = NO_EXECUTION_TIME; private SimulatedExecutionTime commitExecutionTime = NO_EXECUTION_TIME; @@ -678,6 +681,12 @@ public void putPartialStatementResult(StatementResult result) { } } + public void setBatchWriteResult(final Iterable responses) { + synchronized (lock) { + this.batchWriteResult = responses; + } + } + private StatementResult getResult(Statement statement) { StatementResult res; synchronized (lock) { @@ -1962,6 +1971,29 @@ public void commit(CommitRequest request, StreamObserver respons } } + @Override + public void batchWrite( + BatchWriteRequest request, StreamObserver responseObserver) { + requests.add(request); + Preconditions.checkNotNull(request.getSession()); + Session session = sessions.get(request.getSession()); + if (session == null) { + setSessionNotFound(request.getSession(), responseObserver); + return; + } + sessionLastUsed.put(session.getName(), Instant.now()); + try { + for (BatchWriteResponse response : batchWriteResult) { + responseObserver.onNext(response); + } + responseObserver.onCompleted(); + } catch (StatusRuntimeException t) { + responseObserver.onError(t); + } catch (Throwable t) { + responseObserver.onError(Status.INTERNAL.asRuntimeException()); + } + } + private void commitTransaction(ByteString transactionId) { transactions.remove(transactionId); isPartitionedDmlTransaction.remove(transactionId); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MutationGroupTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MutationGroupTest.java new file mode 100644 index 00000000000..99fcb8b6943 --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MutationGroupTest.java @@ -0,0 +1,114 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner; + +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; + +import com.google.common.collect.ImmutableList; +import com.google.spanner.v1.BatchWriteRequest; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Unit tests for {@link MutationGroup}. */ +@RunWith(JUnit4.class) +public class MutationGroupTest { + private final Random random = new Random(); + + private Mutation getRandomMutation() { + return Mutation.newInsertBuilder(String.valueOf(random.nextInt())) + .set("ID") + .to(random.nextInt()) + .set("NAME") + .to(String.valueOf(random.nextInt())) + .build(); + } + + private BatchWriteRequest.MutationGroup getMutationGroupProto(ImmutableList mutations) { + List mutationsProto = new ArrayList<>(); + Mutation.toProto(mutations, mutationsProto); + return BatchWriteRequest.MutationGroup.newBuilder().addAllMutations(mutationsProto).build(); + } + + @Test + public void ofVarargTest() { + Mutation[] mutations = + new Mutation[] { + getRandomMutation(), getRandomMutation(), getRandomMutation(), getRandomMutation() + }; + MutationGroup mutationGroup = MutationGroup.of(mutations); + assertArrayEquals(mutations, mutationGroup.getMutations().toArray()); + assertEquals( + MutationGroup.toProto(mutationGroup), + getMutationGroupProto(ImmutableList.copyOf(mutations))); + } + + @Test + public void ofIterableTest() { + ImmutableList mutations = + ImmutableList.of( + getRandomMutation(), getRandomMutation(), getRandomMutation(), getRandomMutation()); + MutationGroup mutationGroup = MutationGroup.of(mutations); + assertEquals(mutations, mutationGroup.getMutations()); + assertEquals(MutationGroup.toProto(mutationGroup), getMutationGroupProto(mutations)); + } + + @Test + public void toProtoTest() { + Mutation[] mutations = + new Mutation[] { + getRandomMutation(), getRandomMutation(), getRandomMutation(), getRandomMutation() + }; + MutationGroup mutationGroup = MutationGroup.of(mutations); + assertEquals( + MutationGroup.toProto(mutationGroup), + getMutationGroupProto(ImmutableList.copyOf(mutations))); + } + + @Test + public void toListProtoTest() { + Mutation[] mutations1 = + new Mutation[] { + getRandomMutation(), getRandomMutation(), getRandomMutation(), getRandomMutation() + }; + Mutation[] mutations2 = + new Mutation[] { + getRandomMutation(), getRandomMutation(), getRandomMutation(), getRandomMutation() + }; + Mutation[] mutations3 = + new Mutation[] { + getRandomMutation(), getRandomMutation(), getRandomMutation(), getRandomMutation() + }; + List mutationGroups = + ImmutableList.of( + MutationGroup.of(mutations1), + MutationGroup.of(mutations2), + MutationGroup.of(mutations3)); + List mutationGroupsProto = + MutationGroup.toListProto(mutationGroups); + assertEquals( + mutationGroupsProto.get(0), getMutationGroupProto(ImmutableList.copyOf(mutations1))); + assertEquals( + mutationGroupsProto.get(1), getMutationGroupProto(ImmutableList.copyOf(mutations2))); + assertEquals( + mutationGroupsProto.get(2), getMutationGroupProto(ImmutableList.copyOf(mutations3))); + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbortedTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbortedTest.java index 3a665c4fe7a..00e396c498c 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbortedTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbortedTest.java @@ -21,9 +21,11 @@ import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThrows; import static org.junit.Assert.fail; import com.google.cloud.Timestamp; +import com.google.cloud.spanner.AbortedDueToConcurrentModificationException; import com.google.cloud.spanner.ErrorCode; import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; import com.google.cloud.spanner.ReadContext.QueryAnalyzeMode; @@ -35,14 +37,23 @@ import com.google.cloud.spanner.connection.it.ITTransactionRetryTest.CountTransactionRetryListener; import com.google.common.collect.ImmutableList; import com.google.protobuf.ByteString; +import com.google.protobuf.ListValue; +import com.google.protobuf.Value; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.ExecuteBatchDmlRequest; import com.google.spanner.v1.ExecuteSqlRequest; import com.google.spanner.v1.ExecuteSqlRequest.QueryMode; +import com.google.spanner.v1.ResultSetMetadata; +import com.google.spanner.v1.StructType; +import com.google.spanner.v1.StructType.Field; +import com.google.spanner.v1.Type; +import com.google.spanner.v1.TypeCode; import io.grpc.Status; import io.grpc.StatusRuntimeException; import java.util.Collections; import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.LongStream; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -497,6 +508,7 @@ public void testRetryUsesTagsWithUpdateReturning() { assertEquals(2L, commitRequestCount); } + @Test public void testRetryUsesAnalyzeModeForUpdate() { mockSpanner.putStatementResult( StatementResult.query(SELECT_COUNT_STATEMENT, SELECT_COUNT_RESULTSET_BEFORE_INSERT)); @@ -531,6 +543,69 @@ public void testRetryUsesAnalyzeModeForUpdate() { assertEquals(QueryMode.NORMAL, requests.get(4).getQueryMode()); } + @Test + public void testAbortedWithBitReversedSequence() { + // A bit-reversed sequence can only be used in a read/write transaction. However, calling + // get_next_sequence_value will update the sequence durably, even if the transaction is aborted. + // That means that retrying a transaction that called get_next_sequence_value will always fail. + String getSequenceValuesSql = + "WITH t AS (\n" + + "\tselect get_next_sequence_value(sequence enhanced_sequence) AS n\n" + + "\tUNION ALL\n" + + "\tselect get_next_sequence_value(sequence enhanced_sequence) AS n\n" + + "\tUNION ALL\n" + + "\tselect get_next_sequence_value(sequence enhanced_sequence) AS n\n" + + "\tUNION ALL\n" + + "\tselect get_next_sequence_value(sequence enhanced_sequence) AS n\n" + + "\tUNION ALL\n" + + "\tselect get_next_sequence_value(sequence enhanced_sequence) AS n\n" + + ")\n" + + "SELECT n FROM t"; + mockSpanner.putStatementResult( + StatementResult.queryAndThen( + Statement.of(getSequenceValuesSql), + createBitReversedSequenceResultSet(1L, 5L), + createBitReversedSequenceResultSet(6L, 10L))); + long currentValue = 0L; + try (ITConnection connection = createConnection()) { + try (ResultSet resultSet = connection.executeQuery(Statement.of(getSequenceValuesSql))) { + while (resultSet.next()) { + assertEquals(Long.reverse(++currentValue), resultSet.getLong(0)); + } + } + mockSpanner.abortNextStatement(); + // The retry should fail, because the sequence will return new values during the retry. + assertThrows(AbortedDueToConcurrentModificationException.class, connection::commit); + } + } + + static com.google.spanner.v1.ResultSet createBitReversedSequenceResultSet( + long startValue, long endValue) { + return com.google.spanner.v1.ResultSet.newBuilder() + .setMetadata( + ResultSetMetadata.newBuilder() + .setRowType( + StructType.newBuilder() + .addFields( + Field.newBuilder() + .setName("n") + .setType(Type.newBuilder().setCode(TypeCode.INT64).build()) + .build()) + .build()) + .build()) + .addAllRows( + LongStream.range(startValue, endValue) + .map(Long::reverse) + .mapToObj( + id -> + ListValue.newBuilder() + .addValues( + Value.newBuilder().setStringValue(String.valueOf(id)).build()) + .build()) + .collect(Collectors.toList())) + .build(); + } + ITConnection createConnection(TransactionRetryListener listener) { ITConnection connection = super.createConnection(ImmutableList.of(), ImmutableList.of(listener)); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBatchDmlTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBatchDmlTest.java index 3cd9917e1a8..b11e4f613ce 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBatchDmlTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBatchDmlTest.java @@ -31,7 +31,9 @@ import com.google.cloud.spanner.TransactionRunner.TransactionCallable; import com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; +import java.util.LinkedList; import java.util.List; import org.junit.After; import org.junit.Assert; @@ -189,4 +191,65 @@ public void errorBatchDmlAlreadyExist() { } } } + + @Test + public void largeBatchDml() { + List stmts = new LinkedList<>(); + for (int i = 0; i < 40; i++) { + stmts.add(Statement.of("INSERT INTO T (k, v) VALUES ('boo" + i + "', " + i + ");")); + } + + for (int i = 0; i < 40; i++) { + stmts.add(Statement.of("DELETE FROM T WHERE T.K = 'boo" + i + "';")); + } + long[] expectedRowCounts = new long[stmts.size()]; + Arrays.fill(expectedRowCounts, 1L); + + final TransactionCallable callable = transaction -> transaction.batchUpdate(stmts); + TransactionRunner runner = client.readWriteTransaction(); + long[] actualRowCounts = runner.run(callable); + assertThat(actualRowCounts.length).isEqualTo(80); + assertThat(expectedRowCounts).isEqualTo(actualRowCounts); + } + + @Test + public void largeBatchDml_withParameterisedStatements() { + List stmts = new LinkedList<>(); + String insertQuery = "INSERT INTO T(k, v) VALUES(@key, @val)"; + for (int i = 0; i < 80; i++) { + stmts.add( + Statement.newBuilder(insertQuery) + .bind("key") + .to("'boo" + i + "'") + .bind("val") + .to(i) + .build()); + } + long[] expectedRowCounts = new long[stmts.size()]; + Arrays.fill(expectedRowCounts, 1L); + + final TransactionCallable callable = transaction -> transaction.batchUpdate(stmts); + TransactionRunner runner = client.readWriteTransaction(); + long[] actualRowCounts = runner.run(callable); + + assertThat(actualRowCounts.length).isEqualTo(80); + assertThat(expectedRowCounts).isEqualTo(actualRowCounts); + } + + @Test + public void largeBatchDml_withNonParameterisedStatements() { + List stmts = new LinkedList<>(); + for (int i = 0; i < 80; i++) { + stmts.add(Statement.of("INSERT INTO T (k, v) VALUES ('boo" + i + "', " + i + ");")); + } + long[] expectedRowCounts = new long[stmts.size()]; + Arrays.fill(expectedRowCounts, 1L); + + final TransactionCallable callable = transaction -> transaction.batchUpdate(stmts); + TransactionRunner runner = client.readWriteTransaction(); + long[] actualRowCounts = runner.run(callable); + + assertThat(actualRowCounts.length).isEqualTo(80); + assertThat(expectedRowCounts).isEqualTo(actualRowCounts); + } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITWriteTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITWriteTest.java index 020beb68ef9..1888bf6b9e5 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITWriteTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITWriteTest.java @@ -25,10 +25,12 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.junit.Assume.assumeFalse; import static org.junit.Assume.assumeTrue; +import com.google.api.gax.rpc.ServerStream; import com.google.cloud.ByteArray; import com.google.cloud.Date; import com.google.cloud.Timestamp; @@ -41,6 +43,7 @@ import com.google.cloud.spanner.Key; import com.google.cloud.spanner.KeySet; import com.google.cloud.spanner.Mutation; +import com.google.cloud.spanner.MutationGroup; import com.google.cloud.spanner.Options; import com.google.cloud.spanner.ParallelIntegrationTest; import com.google.cloud.spanner.ResultSet; @@ -53,6 +56,9 @@ import com.google.cloud.spanner.testing.EmulatorSpannerHelper; import com.google.common.collect.ImmutableList; import com.google.protobuf.NullValue; +import com.google.rpc.Code; +import com.google.rpc.Status; +import com.google.spanner.v1.BatchWriteResponse; import io.grpc.Context; import java.math.BigDecimal; import java.util.ArrayList; @@ -60,9 +66,11 @@ import java.util.Base64; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Random; +import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; @@ -100,51 +108,65 @@ public static List data() { private static DatabaseClient googleStandardSQLClient; private static DatabaseClient postgreSQLClient; - private static final String GOOGLE_STANDARD_SQL_SCHEMA = - "CREATE TABLE T (" - + " K STRING(MAX) NOT NULL," - + " BoolValue BOOL," - + " Int64Value INT64," - + " Float64Value FLOAT64," - + " StringValue STRING(MAX)," - + " JsonValue JSON," - + " BytesValue BYTES(MAX)," - + " TimestampValue TIMESTAMP OPTIONS (allow_commit_timestamp = true)," - + " DateValue DATE," - + " NumericValue NUMERIC," - + " BoolArrayValue ARRAY," - + " Int64ArrayValue ARRAY," - + " Float64ArrayValue ARRAY," - + " StringArrayValue ARRAY," - + " JsonArrayValue ARRAY," - + " BytesArrayValue ARRAY," - + " TimestampArrayValue ARRAY," - + " DateArrayValue ARRAY," - + " NumericArrayValue ARRAY," - + ") PRIMARY KEY (K)"; - - private static final String POSTGRESQL_SCHEMA = - "CREATE TABLE T (" - + " K VARCHAR PRIMARY KEY," - + " BoolValue BOOL," - + " Int64Value BIGINT," - + " Float64Value DOUBLE PRECISION," - + " StringValue VARCHAR," - + " JsonValue JSONB," - + " BytesValue BYTEA," - + " TimestampValue TIMESTAMPTZ," - + " DateValue DATE," - + " NumericValue NUMERIC," - + " BoolArrayValue BOOL[]," - + " Int64ArrayValue BIGINT[]," - + " Float64ArrayValue DOUBLE PRECISION[]," - + " StringArrayValue VARCHAR[]," - + " JsonArrayValue JSONB[]," - + " BytesArrayValue BYTEA[]," - + " TimestampArrayValue TIMESTAMPTZ[]," - + " DateArrayValue DATE[]," - + " NumericArrayValue NUMERIC[]" - + ")"; + private static final String[] GOOGLE_STANDARD_SQL_SCHEMA = + new String[] { + "CREATE TABLE T (" + + " K STRING(MAX) NOT NULL," + + " BoolValue BOOL," + + " Int64Value INT64," + + " Float64Value FLOAT64," + + " StringValue STRING(MAX)," + + " JsonValue JSON," + + " BytesValue BYTES(MAX)," + + " TimestampValue TIMESTAMP OPTIONS (allow_commit_timestamp = true)," + + " DateValue DATE," + + " NumericValue NUMERIC," + + " BoolArrayValue ARRAY," + + " Int64ArrayValue ARRAY," + + " Float64ArrayValue ARRAY," + + " StringArrayValue ARRAY," + + " JsonArrayValue ARRAY," + + " BytesArrayValue ARRAY," + + " TimestampArrayValue ARRAY," + + " DateArrayValue ARRAY," + + " NumericArrayValue ARRAY," + + ") PRIMARY KEY (K)", + "CREATE TABLE T1 (" + + " K1 STRING(MAX) NOT NULL," + + " K STRING(MAX) NOT NULL," + + " CONSTRAINT FK FOREIGN KEY (K) REFERENCES T(K)" + + ") PRIMARY KEY (K1)" + }; + + private static final String[] POSTGRESQL_SCHEMA = + new String[] { + "CREATE TABLE T (" + + " K VARCHAR PRIMARY KEY," + + " BoolValue BOOL," + + " Int64Value BIGINT," + + " Float64Value DOUBLE PRECISION," + + " StringValue VARCHAR," + + " JsonValue JSONB," + + " BytesValue BYTEA," + + " TimestampValue TIMESTAMPTZ," + + " DateValue DATE," + + " NumericValue NUMERIC," + + " BoolArrayValue BOOL[]," + + " Int64ArrayValue BIGINT[]," + + " Float64ArrayValue DOUBLE PRECISION[]," + + " StringArrayValue VARCHAR[]," + + " JsonArrayValue JSONB[]," + + " BytesArrayValue BYTEA[]," + + " TimestampArrayValue TIMESTAMPTZ[]," + + " DateArrayValue DATE[]," + + " NumericArrayValue NUMERIC[]" + + ")", + "CREATE TABLE T1 (" + + " K1 VARCHAR PRIMARY KEY," + + " K VARCHAR," + + " CONSTRAINT FK FOREIGN KEY (K) REFERENCES T(K)" + + ")" + }; /** Sequence used to generate unique keys. */ private static int seq; @@ -161,7 +183,7 @@ public static void setUpDatabase() if (!EmulatorSpannerHelper.isUsingEmulator()) { Database postgreSQLDatabase = env.getTestHelper() - .createTestDatabase(Dialect.POSTGRESQL, Collections.singletonList(POSTGRESQL_SCHEMA)); + .createTestDatabase(Dialect.POSTGRESQL, Arrays.asList(POSTGRESQL_SCHEMA)); postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase); } } @@ -192,9 +214,13 @@ private Mutation.WriteBuilder baseInsert() { } private Struct readLastRow(String... columns) { + return readRow("T", lastKey, columns); + } + + private Struct readRow(String table, String key, String... columns) { return client .singleUse(TimestampBound.strong()) - .readRow("T", Key.of(lastKey), Arrays.asList(columns)); + .readRow(table, Key.of(key), Arrays.asList(columns)); } @Test @@ -212,6 +238,71 @@ public void writeAtLeastOnce() { assertThat(row.getString(0)).isEqualTo("v1"); } + @Test + public void batchWriteAtLeastOnce() { + assumeFalse("Emulator does not support BatchWriteAtLeastOnce", isUsingEmulator()); + final String k1 = uniqueString(), k2 = uniqueString(), k3 = uniqueString(), k4 = uniqueString(); + lastKey = k3; + final List mutationGroups = + ImmutableList.of( + MutationGroup.of( + Mutation.newInsertOrUpdateBuilder("T") + .set("K") + .to(k1) + .set("StringValue") + .to("v1") + .set("BoolValue") + .to(true) + .build(), + Mutation.newInsertOrUpdateBuilder("T") + .set("K") + .to(k2) + .set("StringValue") + .to("v2") + .build()), + MutationGroup.of( + Mutation.newInsertOrUpdateBuilder("T") + .set("K") + .to(k3) + .set("StringValue") + .to("v1") + .set("BoolValue") + .to(false) + .build(), + Mutation.newInsertOrUpdateBuilder("T1").set("K1").to(k4).set("K").to(k3).build())); + ServerStream responses = client.batchWriteAtLeastOnce(mutationGroups); + Set responseIndexes = new HashSet<>(); + Set appliedMutationIndexes = new HashSet<>(); + for (BatchWriteResponse response : responses) { + responseIndexes.addAll(response.getIndexesList()); + if (response.getStatus().equals(Status.newBuilder().setCode(Code.OK_VALUE).build())) { + appliedMutationIndexes.addAll(response.getIndexesList()); + assertNotNull(response.getCommitTimestamp()); + } + } + assertEquals(responseIndexes, new HashSet<>(Arrays.asList(0, 1))); + + Struct row; + // assert row with key k1 + if (appliedMutationIndexes.contains(0)) { + row = readRow("T", k1, "StringValue", "BoolValue"); + assertEquals(row.getString(0), "v1"); + assertTrue(row.getBoolean(1)); + row = readRow("T", k2, "StringValue", "BoolValue"); + assertEquals(row.getString(0), "v2"); + assertTrue(row.isNull(1)); + } + + // assert row with key k4, and corresponding referencing table. + if (appliedMutationIndexes.contains(1)) { + row = readRow("T", k3, "StringValue", "BoolValue"); + assertEquals(row.getString(0), "v1"); + assertFalse(row.getBoolean(1)); + row = readRow("T1", k4, "K"); + assertEquals(row.getString(0), k3); + } + } + @Test public void testWriteReturnsCommitStats() { assumeFalse("Emulator does not return commit statistics", isUsingEmulator()); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java index 7c26f582758..c806987beeb 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java @@ -21,6 +21,8 @@ import com.google.protobuf.Empty; import com.google.spanner.v1.BatchCreateSessionsRequest; import com.google.spanner.v1.BatchCreateSessionsResponse; +import com.google.spanner.v1.BatchWriteRequest; +import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -390,4 +392,25 @@ public void partitionRead( Exception.class.getName()))); } } + + @Override + public void batchWrite( + BatchWriteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchWriteResponse) { + requests.add(request); + responseObserver.onNext(((BatchWriteResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchWrite, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchWriteResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientHttpJsonTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientHttpJsonTest.java index e2ffb566626..8f022126bbb 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientHttpJsonTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientHttpJsonTest.java @@ -1315,4 +1315,15 @@ public void partitionReadExceptionTest() throws Exception { // Expected exception. } } + + @Test + public void batchWriteTest() throws Exception {} + + @Test + public void batchWriteExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java index 73998b39810..62fc1dc6658 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java @@ -39,6 +39,8 @@ import com.google.rpc.Status; import com.google.spanner.v1.BatchCreateSessionsRequest; import com.google.spanner.v1.BatchCreateSessionsResponse; +import com.google.spanner.v1.BatchWriteRequest; +import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; @@ -1359,4 +1361,60 @@ public void partitionReadExceptionTest() throws Exception { // Expected exception. } } + + @Test + public void batchWriteTest() throws Exception { + BatchWriteResponse expectedResponse = + BatchWriteResponse.newBuilder() + .addAllIndexes(new ArrayList()) + .setStatus(Status.newBuilder().build()) + .setCommitTimestamp(Timestamp.newBuilder().build()) + .build(); + mockSpanner.addResponse(expectedResponse); + BatchWriteRequest request = + BatchWriteRequest.newBuilder() + .setSession( + SessionName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]").toString()) + .setRequestOptions(RequestOptions.newBuilder().build()) + .addAllMutationGroups(new ArrayList()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.batchWriteCallable(); + callable.serverStreamingCall(request, responseObserver); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void batchWriteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSpanner.addException(exception); + BatchWriteRequest request = + BatchWriteRequest.newBuilder() + .setSession( + SessionName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]").toString()) + .setRequestOptions(RequestOptions.newBuilder().build()) + .addAllMutationGroups(new ArrayList()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.batchWriteCallable(); + callable.serverStreamingCall(request, responseObserver); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } } diff --git a/grpc-google-cloud-spanner-admin-database-v1/pom.xml b/grpc-google-cloud-spanner-admin-database-v1/pom.xml index c72c46cf01b..9c651e5f482 100644 --- a/grpc-google-cloud-spanner-admin-database-v1/pom.xml +++ b/grpc-google-cloud-spanner-admin-database-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-spanner-admin-database-v1 - 6.47.0 + 6.48.0 grpc-google-cloud-spanner-admin-database-v1 GRPC library for grpc-google-cloud-spanner-admin-database-v1 com.google.cloud google-cloud-spanner-parent - 6.47.0 + 6.48.0 diff --git a/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java b/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java index 5fb4137fd2a..8f3341ba7d0 100644 --- a/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java +++ b/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,8 @@ public final class DatabaseAdminGrpc { private DatabaseAdminGrpc() {} - public static final String SERVICE_NAME = "google.spanner.admin.database.v1.DatabaseAdmin"; + public static final java.lang.String SERVICE_NAME = + "google.spanner.admin.database.v1.DatabaseAdmin"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor< @@ -3058,9 +3059,9 @@ private static final class DatabaseAdminFileDescriptorSupplier private static final class DatabaseAdminMethodDescriptorSupplier extends DatabaseAdminBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - DatabaseAdminMethodDescriptorSupplier(String methodName) { + DatabaseAdminMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/grpc-google-cloud-spanner-admin-instance-v1/pom.xml b/grpc-google-cloud-spanner-admin-instance-v1/pom.xml index f79c2e6b1f9..abc2c549253 100644 --- a/grpc-google-cloud-spanner-admin-instance-v1/pom.xml +++ b/grpc-google-cloud-spanner-admin-instance-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-spanner-admin-instance-v1 - 6.47.0 + 6.48.0 grpc-google-cloud-spanner-admin-instance-v1 GRPC library for grpc-google-cloud-spanner-admin-instance-v1 com.google.cloud google-cloud-spanner-parent - 6.47.0 + 6.48.0 diff --git a/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java b/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java index 9bf015fcaa8..5126b2b45cb 100644 --- a/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java +++ b/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,7 +49,8 @@ public final class InstanceAdminGrpc { private InstanceAdminGrpc() {} - public static final String SERVICE_NAME = "google.spanner.admin.instance.v1.InstanceAdmin"; + public static final java.lang.String SERVICE_NAME = + "google.spanner.admin.instance.v1.InstanceAdmin"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor< @@ -2573,9 +2574,9 @@ private static final class InstanceAdminFileDescriptorSupplier private static final class InstanceAdminMethodDescriptorSupplier extends InstanceAdminBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - InstanceAdminMethodDescriptorSupplier(String methodName) { + InstanceAdminMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/grpc-google-cloud-spanner-v1/pom.xml b/grpc-google-cloud-spanner-v1/pom.xml index f1b13b9ab8f..d147036546c 100644 --- a/grpc-google-cloud-spanner-v1/pom.xml +++ b/grpc-google-cloud-spanner-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-spanner-v1 - 6.47.0 + 6.48.0 grpc-google-cloud-spanner-v1 GRPC library for grpc-google-cloud-spanner-v1 com.google.cloud google-cloud-spanner-parent - 6.47.0 + 6.48.0 diff --git a/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java b/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java index 59ab44cc122..0c3d9f8e806 100644 --- a/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java +++ b/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,7 @@ public final class SpannerGrpc { private SpannerGrpc() {} - public static final String SERVICE_NAME = "google.spanner.v1.Spanner"; + public static final java.lang.String SERVICE_NAME = "google.spanner.v1.Spanner"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor< @@ -652,6 +652,47 @@ private SpannerGrpc() {} return getPartitionReadMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.spanner.v1.BatchWriteRequest, com.google.spanner.v1.BatchWriteResponse> + getBatchWriteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchWrite", + requestType = com.google.spanner.v1.BatchWriteRequest.class, + responseType = com.google.spanner.v1.BatchWriteResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.spanner.v1.BatchWriteRequest, com.google.spanner.v1.BatchWriteResponse> + getBatchWriteMethod() { + io.grpc.MethodDescriptor< + com.google.spanner.v1.BatchWriteRequest, com.google.spanner.v1.BatchWriteResponse> + getBatchWriteMethod; + if ((getBatchWriteMethod = SpannerGrpc.getBatchWriteMethod) == null) { + synchronized (SpannerGrpc.class) { + if ((getBatchWriteMethod = SpannerGrpc.getBatchWriteMethod) == null) { + SpannerGrpc.getBatchWriteMethod = + getBatchWriteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchWrite")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.v1.BatchWriteRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.v1.BatchWriteResponse.getDefaultInstance())) + .setSchemaDescriptor(new SpannerMethodDescriptorSupplier("BatchWrite")) + .build(); + } + } + } + return getBatchWriteMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static SpannerStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -1004,6 +1045,32 @@ default void partitionRead( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getPartitionReadMethod(), responseObserver); } + + /** + * + * + *
+     * Batches the supplied mutation groups in a collection of efficient
+     * transactions. All mutations in a group are committed atomically. However,
+     * mutations across groups can be committed non-atomically in an unspecified
+     * order and thus, they must be independent of each other. Partial failure is
+     * possible, i.e., some groups may have been committed successfully, while
+     * some may have failed. The results of individual batches are streamed into
+     * the response as the batches are applied.
+     * BatchWrite requests are not replay protected, meaning that each mutation
+     * group may be applied more than once. Replays of non-idempotent mutations
+     * may have undesirable effects. For example, replays of an insert mutation
+     * may produce an already exists error or if you use generated or commit
+     * timestamp-based keys, it may result in additional rows being added to the
+     * mutation's table. We recommend structuring your mutation groups to be
+     * idempotent to avoid this issue.
+     * 
+ */ + default void batchWrite( + com.google.spanner.v1.BatchWriteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchWriteMethod(), responseObserver); + } } /** @@ -1368,6 +1435,33 @@ public void partitionRead( request, responseObserver); } + + /** + * + * + *
+     * Batches the supplied mutation groups in a collection of efficient
+     * transactions. All mutations in a group are committed atomically. However,
+     * mutations across groups can be committed non-atomically in an unspecified
+     * order and thus, they must be independent of each other. Partial failure is
+     * possible, i.e., some groups may have been committed successfully, while
+     * some may have failed. The results of individual batches are streamed into
+     * the response as the batches are applied.
+     * BatchWrite requests are not replay protected, meaning that each mutation
+     * group may be applied more than once. Replays of non-idempotent mutations
+     * may have undesirable effects. For example, replays of an insert mutation
+     * may produce an already exists error or if you use generated or commit
+     * timestamp-based keys, it may result in additional rows being added to the
+     * mutation's table. We recommend structuring your mutation groups to be
+     * idempotent to avoid this issue.
+     * 
+ */ + public void batchWrite( + com.google.spanner.v1.BatchWriteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getBatchWriteMethod(), getCallOptions()), request, responseObserver); + } } /** @@ -1677,6 +1771,32 @@ public com.google.spanner.v1.PartitionResponse partitionRead( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPartitionReadMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Batches the supplied mutation groups in a collection of efficient
+     * transactions. All mutations in a group are committed atomically. However,
+     * mutations across groups can be committed non-atomically in an unspecified
+     * order and thus, they must be independent of each other. Partial failure is
+     * possible, i.e., some groups may have been committed successfully, while
+     * some may have failed. The results of individual batches are streamed into
+     * the response as the batches are applied.
+     * BatchWrite requests are not replay protected, meaning that each mutation
+     * group may be applied more than once. Replays of non-idempotent mutations
+     * may have undesirable effects. For example, replays of an insert mutation
+     * may produce an already exists error or if you use generated or commit
+     * timestamp-based keys, it may result in additional rows being added to the
+     * mutation's table. We recommend structuring your mutation groups to be
+     * idempotent to avoid this issue.
+     * 
+ */ + public java.util.Iterator batchWrite( + com.google.spanner.v1.BatchWriteRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getBatchWriteMethod(), getCallOptions(), request); + } } /** @@ -1976,6 +2096,7 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2076,6 +2197,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_BATCH_WRITE: + serviceImpl.batchWrite( + (com.google.spanner.v1.BatchWriteRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -2187,6 +2314,12 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.spanner.v1.PartitionReadRequest, com.google.spanner.v1.PartitionResponse>(service, METHODID_PARTITION_READ))) + .addMethod( + getBatchWriteMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.google.spanner.v1.BatchWriteRequest, + com.google.spanner.v1.BatchWriteResponse>(service, METHODID_BATCH_WRITE))) .build(); } @@ -2212,9 +2345,9 @@ private static final class SpannerFileDescriptorSupplier extends SpannerBaseDesc private static final class SpannerMethodDescriptorSupplier extends SpannerBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - SpannerMethodDescriptorSupplier(String methodName) { + SpannerMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } @@ -2251,6 +2384,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getRollbackMethod()) .addMethod(getPartitionQueryMethod()) .addMethod(getPartitionReadMethod()) + .addMethod(getBatchWriteMethod()) .build(); } } diff --git a/pom.xml b/pom.xml index 017960333a8..6f8c575716e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-spanner-parent pom - 6.47.0 + 6.48.0 Google Cloud Spanner Parent https://github.com/googleapis/java-spanner @@ -62,37 +62,37 @@ com.google.api.grpc proto-google-cloud-spanner-admin-instance-v1 - 6.47.0 + 6.48.0 com.google.api.grpc proto-google-cloud-spanner-v1 - 6.47.0 + 6.48.0 com.google.api.grpc proto-google-cloud-spanner-admin-database-v1 - 6.47.0 + 6.48.0 com.google.api.grpc grpc-google-cloud-spanner-v1 - 6.47.0 + 6.48.0 com.google.api.grpc grpc-google-cloud-spanner-admin-instance-v1 - 6.47.0 + 6.48.0 com.google.api.grpc grpc-google-cloud-spanner-admin-database-v1 - 6.47.0 + 6.48.0 com.google.cloud google-cloud-spanner - 6.47.0 + 6.48.0 @@ -187,7 +187,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.5.0 + 3.6.0 html diff --git a/proto-google-cloud-spanner-admin-database-v1/pom.xml b/proto-google-cloud-spanner-admin-database-v1/pom.xml index c6eb130f895..449fb66f848 100644 --- a/proto-google-cloud-spanner-admin-database-v1/pom.xml +++ b/proto-google-cloud-spanner-admin-database-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-spanner-admin-database-v1 - 6.47.0 + 6.48.0 proto-google-cloud-spanner-admin-database-v1 PROTO library for proto-google-cloud-spanner-admin-database-v1 com.google.cloud google-cloud-spanner-parent - 6.47.0 + 6.48.0 diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java index 83815908c09..bf59b96fd5c 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfo.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfo.java index 0bb89ec6c08..6d44eae9ef3 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfo.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfoOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfoOrBuilder.java index 0d3766f1a33..b90885b9e84 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfoOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupName.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupName.java index 6cb52a86fee..3018af54e49 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupName.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupName.java @@ -154,7 +154,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { BackupName that = ((BackupName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.instance, that.instance) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java index 77a157a819b..c7d7a6e60e2 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupProto.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupProto.java index ed23e270715..617e00b29b9 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupProto.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CommonProto.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CommonProto.java index 0f5840f6f15..32077585ec4 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CommonProto.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CommonProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfig.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfig.java index bfa78ae301f..189d80f4cbb 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfig.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfigOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfigOrBuilder.java index a6117dfb660..ad4c312b7b6 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfigOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadata.java index 63db05c5083..ed2b5db4e68 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadataOrBuilder.java index f977fe6fb38..b888c5d233c 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequest.java index 62cbd05991d..bb321f0cf97 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequestOrBuilder.java index 5a8be05a57e..1ce1a78ee2b 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfig.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfig.java index 72efb786d53..e1c679437b4 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfig.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfigOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfigOrBuilder.java index ecefb88dc0d..266ca42fd54 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfigOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadata.java index 83c3b45c003..b3d0e8c71e3 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadataOrBuilder.java index 5ca2529e2f3..35ac9312ee5 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequest.java index 3ac0f2c8558..b8d2b57b4a3 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequestOrBuilder.java index 533a7441a76..0fde8792ab4 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadata.java index ebcc297cbba..d0c55bb862c 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadataOrBuilder.java index ce1922985d9..f63442138d0 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequest.java index 38317542e4c..54065db2840 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequestOrBuilder.java index 537e9c161fa..2a71d1e2808 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Database.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Database.java index c87638bef4d..ab488e87b81 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Database.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Database.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseDialect.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseDialect.java index b2898046416..1c8a6f37a26 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseDialect.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseDialect.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseName.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseName.java index 9c583702ee4..146a438cc2a 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseName.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseName.java @@ -154,7 +154,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { DatabaseName that = ((DatabaseName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.instance, that.instance) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java index 2dd394d2c7c..860ac8d9d73 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRole.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRole.java index d0f86946079..8518141cf47 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRole.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRole.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRoleOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRoleOrBuilder.java index 293fe0f672c..cc15677e0dd 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRoleOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRoleOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfo.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfo.java index 8c57d14fb9b..0c5e9ceea38 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfo.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfoOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfoOrBuilder.java index 77632b556eb..5e9ad55d53b 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfoOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequest.java index b7ec86f086c..ba8a0bad913 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequestOrBuilder.java index 8aff1d1bced..b6d592f7164 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequest.java index 401e68627a3..f5708ef9c41 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequestOrBuilder.java index be7aca5e0b5..76701950637 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfig.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfig.java index 77046a46e50..7413956be14 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfig.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfigOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfigOrBuilder.java index f3638c5eb90..34b1811b5c5 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfigOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfo.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfo.java index b5a473e4b8b..6f7ff1958d5 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfo.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfoOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfoOrBuilder.java index 279ae23ffc2..f08cca64b75 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfoOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequest.java index cd3c0180bc6..2f42294375e 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequestOrBuilder.java index d27620cd0fc..7973d261061 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequest.java index 311555b751c..3447e8ac1c2 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequestOrBuilder.java index 2469460dc3e..3520a2333b0 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponse.java index fd710da5da0..b35f72c212c 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponseOrBuilder.java index 28f7fb2cc5c..c436d5c844f 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequest.java index d6b52bfbbfa..9d8c2aa67f5 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequestOrBuilder.java index dcbddc2f882..1f8d75ff8f8 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InstanceName.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InstanceName.java index afc77685648..b4ca9b58d8b 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InstanceName.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InstanceName.java @@ -137,7 +137,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { InstanceName that = ((InstanceName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.instance, that.instance); diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequest.java index a871c005dc6..f7a89b62763 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequestOrBuilder.java index 4268655ed60..4255d075607 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponse.java index 4afe5a1cc6a..119484dffb1 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponseOrBuilder.java index f170588152b..ba6b8352ec7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequest.java index 69c1786eec9..ec4724c8267 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequestOrBuilder.java index 3c253ef05bf..74def9180b7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponse.java index 8c06fc77b79..368f505e606 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponseOrBuilder.java index fe5c302a0e8..9c1ccadf998 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequest.java index 4b0abaf18d2..37d86fbdedb 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequestOrBuilder.java index 4d1f7f23c82..9f67dc38b95 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponse.java index 110f68ff83d..9331109f4bb 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponseOrBuilder.java index 786c6fc2317..97a577e30ef 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequest.java index e26e0089963..679e8885de8 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequestOrBuilder.java index c9537a1b835..b465a2a2625 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponse.java index 442ed797d6f..7ba8415ac39 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponseOrBuilder.java index 2189d1d743a..93d63bfefad 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequest.java index c6c3c695459..6d281f2ad5a 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequestOrBuilder.java index 89cfe991ec2..b8cd5819beb 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponse.java index 6063e3bb8a3..76505b943fc 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponseOrBuilder.java index e6b6facc0bb..6c09054c001 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgress.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgress.java index 7a4a49e58e6..11c77e5af17 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgress.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgress.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgressOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgressOrBuilder.java index df76dbaca01..2636bad9ba3 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgressOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgressOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadata.java index 372757476db..08529ae165f 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadataOrBuilder.java index 0606518a011..1ef0a9fbae9 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfig.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfig.java index 19523910055..12df82b01d7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfig.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfigOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfigOrBuilder.java index a3915b2a6f4..03e5beb45fa 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfigOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadata.java index 49ca8fde967..427be919b66 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadataOrBuilder.java index a6b1bc97877..e697cd2438c 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequest.java index 96d866db827..0b2e139f288 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequestOrBuilder.java index e2047038bd5..a3a1be382f6 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfo.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfo.java index 02c67d53686..07b08825bcb 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfo.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfoOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfoOrBuilder.java index d02746a0ed6..f36f8bce23b 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfoOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreSourceType.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreSourceType.java index e881b2a5910..cbd229d2e3c 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreSourceType.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreSourceType.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java index 4ac1d45264c..9fd014fc9ac 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequest.java index 9da77849b35..bf34a574996 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequestOrBuilder.java index 2fd0d8ae9b5..cffc8d5e4f2 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadata.java index 0e9f3b0a5d3..552455f8175 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadataOrBuilder.java index 5b435a6844c..1668105e9ca 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequest.java index aa78a8f7a15..dee90581940 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequestOrBuilder.java index 0933a94e09e..ead26bcfab8 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadata.java index e42f634cdf0..f8cd92a0673 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadataOrBuilder.java index 876bdd9440f..c96e6bef5fa 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequest.java index bb83a712eec..0934d93a05c 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequestOrBuilder.java index 810c0bce696..a802b81253d 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/pom.xml b/proto-google-cloud-spanner-admin-instance-v1/pom.xml index 890bed6320c..06e58e08d6c 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/pom.xml +++ b/proto-google-cloud-spanner-admin-instance-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-spanner-admin-instance-v1 - 6.47.0 + 6.48.0 proto-google-cloud-spanner-admin-instance-v1 PROTO library for proto-google-cloud-spanner-admin-instance-v1 com.google.cloud google-cloud-spanner-parent - 6.47.0 + 6.48.0 diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CommonProto.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CommonProto.java index a608a7917fb..7ba46aef4c8 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CommonProto.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CommonProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadata.java index 7957451eb76..383a27b4ffb 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadata.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadataOrBuilder.java index 6f80b73da11..42188854244 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequest.java index f283c425854..ca7fbf66518 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequestOrBuilder.java index 0748fdade24..80f27abe104 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadata.java index 72dad2442f8..0aa8cef0567 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadata.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadataOrBuilder.java index ce460d6f984..c294c0d46bf 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequest.java index 1e3de9da213..19cbc45e551 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequestOrBuilder.java index 5f7649eb259..8f97e2a94ca 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequest.java index cd5397978a0..902f2c7043f 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequestOrBuilder.java index 8002cd5678c..396f633f9a3 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequest.java index 362cafcb798..06d344081a7 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequestOrBuilder.java index 951a643978a..57d7ec7faaf 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequest.java index 11b2d456206..c4de114d587 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequestOrBuilder.java index 4601a9598de..00bdd435ba3 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequest.java index fb836dd7a2f..b720c34def6 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequestOrBuilder.java index 32e35c95e21..5376dc8e957 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/Instance.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/Instance.java index 3f81d952f62..c18b78c6afd 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/Instance.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/Instance.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfig.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfig.java index 0351972ca66..d2da1f12a60 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfig.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigName.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigName.java index 013ea8d822f..2069fd6b900 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigName.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigName.java @@ -138,7 +138,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { InstanceConfigName that = ((InstanceConfigName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.instanceConfig, that.instanceConfig); diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigOrBuilder.java index acf1f898390..cf2d7e56c9f 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceName.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceName.java index bdf8fc16fc5..559fa5f6c17 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceName.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceName.java @@ -137,7 +137,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { InstanceName that = ((InstanceName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.instance, that.instance); diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceOrBuilder.java index accad92c855..58a85a5a460 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequest.java index 542bafb332b..e92b768f4b1 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequestOrBuilder.java index b9116f3d765..f07f113e887 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponse.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponse.java index 5ea6dd69395..13089b74288 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponse.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponseOrBuilder.java index f7d1c09b612..f2ee88e1cbf 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequest.java index 9101130a4c0..5e8a8d11666 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequestOrBuilder.java index 1cdb7effce4..1776f0fb515 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponse.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponse.java index 0d8cac1c67f..69956ba6452 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponse.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponseOrBuilder.java index 10593e8253d..c2942f5005c 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequest.java index 1236936495a..dd38de27baf 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequestOrBuilder.java index 4d2e9869ded..60ec0277046 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponse.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponse.java index 65ae986053e..70c637a4301 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponse.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponseOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponseOrBuilder.java index 542ef8910a7..41ab85f5df8 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgress.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgress.java index 37971de7ed9..1046948b1fd 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgress.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgress.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgressOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgressOrBuilder.java index 8bf5eedddde..0cd1e8f90fe 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgressOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgressOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ProjectName.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ProjectName.java index ac48875b84f..20e263c45aa 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ProjectName.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ProjectName.java @@ -127,7 +127,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { ProjectName that = ((ProjectName) o); return Objects.equals(this.project, that.project); } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfo.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfo.java index e180b6bbb6d..503d8ca6587 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfo.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfoOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfoOrBuilder.java index 1e3f8a3e1a1..e166098b1ac 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfoOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java index 8fc561a4fa7..bbc4edd718a 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadata.java index 48f2e9e1683..9a271d701a4 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadata.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadataOrBuilder.java index 79e1db736f6..8f52d338583 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequest.java index d2916ab0a74..ab6d545bf53 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequestOrBuilder.java index 36afa00cc7c..18c8ce272a8 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadata.java index 291ad67bc82..9b4e9855386 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadata.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadataOrBuilder.java index cb4f3c002dd..e520e83b19f 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequest.java index 3c734c86d6e..a0b42cf11d5 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequestOrBuilder.java index 6d01be2120f..1733dec0e18 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/pom.xml b/proto-google-cloud-spanner-v1/pom.xml index 28c4b027559..50edda9dc11 100644 --- a/proto-google-cloud-spanner-v1/pom.xml +++ b/proto-google-cloud-spanner-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-spanner-v1 - 6.47.0 + 6.48.0 proto-google-cloud-spanner-v1 PROTO library for proto-google-cloud-spanner-v1 com.google.cloud google-cloud-spanner-parent - 6.47.0 + 6.48.0 diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequest.java index 1bdb2f44a29..1bb2c97bf87 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequestOrBuilder.java index 3a4cd4d26ac..3a1183555c1 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponse.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponse.java index 9a8d1c91120..8bc814aad56 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponse.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponseOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponseOrBuilder.java index 8c6fd582b74..37aa55ad7ae 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequest.java new file mode 100644 index 00000000000..f790301b43c --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequest.java @@ -0,0 +1,2494 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/spanner.proto + +package com.google.spanner.v1; + +/** + * + * + *
+ * The request for [BatchWrite][google.spanner.v1.Spanner.BatchWrite].
+ * 
+ * + * Protobuf type {@code google.spanner.v1.BatchWriteRequest} + */ +public final class BatchWriteRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.BatchWriteRequest) + BatchWriteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchWriteRequest.newBuilder() to construct. + private BatchWriteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchWriteRequest() { + session_ = ""; + mutationGroups_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchWriteRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.BatchWriteRequest.class, + com.google.spanner.v1.BatchWriteRequest.Builder.class); + } + + public interface MutationGroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.BatchWriteRequest.MutationGroup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The mutations in this group.
+     * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getMutationsList(); + /** + * + * + *
+     * Required. The mutations in this group.
+     * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.spanner.v1.Mutation getMutations(int index); + /** + * + * + *
+     * Required. The mutations in this group.
+     * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getMutationsCount(); + /** + * + * + *
+     * Required. The mutations in this group.
+     * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getMutationsOrBuilderList(); + /** + * + * + *
+     * Required. The mutations in this group.
+     * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.spanner.v1.MutationOrBuilder getMutationsOrBuilder(int index); + } + /** + * + * + *
+   * A group of mutations to be committed together. Related mutations should be
+   * placed in a group. For example, two mutations inserting rows with the same
+   * primary key prefix in both parent and child tables are related.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.BatchWriteRequest.MutationGroup} + */ + public static final class MutationGroup extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.BatchWriteRequest.MutationGroup) + MutationGroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use MutationGroup.newBuilder() to construct. + private MutationGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MutationGroup() { + mutations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MutationGroup(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteRequest_MutationGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteRequest_MutationGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.BatchWriteRequest.MutationGroup.class, + com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder.class); + } + + public static final int MUTATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List mutations_; + /** + * + * + *
+     * Required. The mutations in this group.
+     * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getMutationsList() { + return mutations_; + } + /** + * + * + *
+     * Required. The mutations in this group.
+     * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getMutationsOrBuilderList() { + return mutations_; + } + /** + * + * + *
+     * Required. The mutations in this group.
+     * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getMutationsCount() { + return mutations_.size(); + } + /** + * + * + *
+     * Required. The mutations in this group.
+     * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.v1.Mutation getMutations(int index) { + return mutations_.get(index); + } + /** + * + * + *
+     * Required. The mutations in this group.
+     * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.v1.MutationOrBuilder getMutationsOrBuilder(int index) { + return mutations_.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 < mutations_.size(); i++) { + output.writeMessage(1, mutations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < mutations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, mutations_.get(i)); + } + size += getUnknownFields().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.BatchWriteRequest.MutationGroup)) { + return super.equals(obj); + } + com.google.spanner.v1.BatchWriteRequest.MutationGroup other = + (com.google.spanner.v1.BatchWriteRequest.MutationGroup) obj; + + if (!getMutationsList().equals(other.getMutationsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMutationsCount() > 0) { + hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getMutationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.BatchWriteRequest.MutationGroup parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchWriteRequest.MutationGroup 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.BatchWriteRequest.MutationGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchWriteRequest.MutationGroup 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.BatchWriteRequest.MutationGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchWriteRequest.MutationGroup parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.BatchWriteRequest.MutationGroup parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchWriteRequest.MutationGroup 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.BatchWriteRequest.MutationGroup parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchWriteRequest.MutationGroup 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.BatchWriteRequest.MutationGroup parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchWriteRequest.MutationGroup 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.BatchWriteRequest.MutationGroup 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; + } + /** + * + * + *
+     * A group of mutations to be committed together. Related mutations should be
+     * placed in a group. For example, two mutations inserting rows with the same
+     * primary key prefix in both parent and child tables are related.
+     * 
+ * + * Protobuf type {@code google.spanner.v1.BatchWriteRequest.MutationGroup} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.BatchWriteRequest.MutationGroup) + com.google.spanner.v1.BatchWriteRequest.MutationGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteRequest_MutationGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteRequest_MutationGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.BatchWriteRequest.MutationGroup.class, + com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder.class); + } + + // Construct using com.google.spanner.v1.BatchWriteRequest.MutationGroup.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (mutationsBuilder_ == null) { + mutations_ = java.util.Collections.emptyList(); + } else { + mutations_ = null; + mutationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteRequest_MutationGroup_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.BatchWriteRequest.MutationGroup getDefaultInstanceForType() { + return com.google.spanner.v1.BatchWriteRequest.MutationGroup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.BatchWriteRequest.MutationGroup build() { + com.google.spanner.v1.BatchWriteRequest.MutationGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.BatchWriteRequest.MutationGroup buildPartial() { + com.google.spanner.v1.BatchWriteRequest.MutationGroup result = + new com.google.spanner.v1.BatchWriteRequest.MutationGroup(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.v1.BatchWriteRequest.MutationGroup result) { + if (mutationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + mutations_ = java.util.Collections.unmodifiableList(mutations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.mutations_ = mutations_; + } else { + result.mutations_ = mutationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.v1.BatchWriteRequest.MutationGroup result) { + int from_bitField0_ = bitField0_; + } + + @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.BatchWriteRequest.MutationGroup) { + return mergeFrom((com.google.spanner.v1.BatchWriteRequest.MutationGroup) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.BatchWriteRequest.MutationGroup other) { + if (other == com.google.spanner.v1.BatchWriteRequest.MutationGroup.getDefaultInstance()) + return this; + if (mutationsBuilder_ == null) { + if (!other.mutations_.isEmpty()) { + if (mutations_.isEmpty()) { + mutations_ = other.mutations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMutationsIsMutable(); + mutations_.addAll(other.mutations_); + } + onChanged(); + } + } else { + if (!other.mutations_.isEmpty()) { + if (mutationsBuilder_.isEmpty()) { + mutationsBuilder_.dispose(); + mutationsBuilder_ = null; + mutations_ = other.mutations_; + bitField0_ = (bitField0_ & ~0x00000001); + mutationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMutationsFieldBuilder() + : null; + } else { + mutationsBuilder_.addAllMessages(other.mutations_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.spanner.v1.Mutation m = + input.readMessage(com.google.spanner.v1.Mutation.parser(), extensionRegistry); + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + mutations_.add(m); + } else { + mutationsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List mutations_ = + java.util.Collections.emptyList(); + + private void ensureMutationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + mutations_ = new java.util.ArrayList(mutations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.Mutation, + com.google.spanner.v1.Mutation.Builder, + com.google.spanner.v1.MutationOrBuilder> + mutationsBuilder_; + + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getMutationsList() { + if (mutationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(mutations_); + } else { + return mutationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getMutationsCount() { + if (mutationsBuilder_ == null) { + return mutations_.size(); + } else { + return mutationsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.v1.Mutation getMutations(int index) { + if (mutationsBuilder_ == null) { + return mutations_.get(index); + } else { + return mutationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMutations(int index, com.google.spanner.v1.Mutation value) { + if (mutationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMutationsIsMutable(); + mutations_.set(index, value); + onChanged(); + } else { + mutationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMutations( + int index, com.google.spanner.v1.Mutation.Builder builderForValue) { + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + mutations_.set(index, builderForValue.build()); + onChanged(); + } else { + mutationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMutations(com.google.spanner.v1.Mutation value) { + if (mutationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMutationsIsMutable(); + mutations_.add(value); + onChanged(); + } else { + mutationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMutations(int index, com.google.spanner.v1.Mutation value) { + if (mutationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMutationsIsMutable(); + mutations_.add(index, value); + onChanged(); + } else { + mutationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMutations(com.google.spanner.v1.Mutation.Builder builderForValue) { + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + mutations_.add(builderForValue.build()); + onChanged(); + } else { + mutationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMutations( + int index, com.google.spanner.v1.Mutation.Builder builderForValue) { + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + mutations_.add(index, builderForValue.build()); + onChanged(); + } else { + mutationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllMutations( + java.lang.Iterable values) { + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mutations_); + onChanged(); + } else { + mutationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMutations() { + if (mutationsBuilder_ == null) { + mutations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + mutationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeMutations(int index) { + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + mutations_.remove(index); + onChanged(); + } else { + mutationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.v1.Mutation.Builder getMutationsBuilder(int index) { + return getMutationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.v1.MutationOrBuilder getMutationsOrBuilder(int index) { + if (mutationsBuilder_ == null) { + return mutations_.get(index); + } else { + return mutationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMutationsOrBuilderList() { + if (mutationsBuilder_ != null) { + return mutationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mutations_); + } + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.v1.Mutation.Builder addMutationsBuilder() { + return getMutationsFieldBuilder() + .addBuilder(com.google.spanner.v1.Mutation.getDefaultInstance()); + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.v1.Mutation.Builder addMutationsBuilder(int index) { + return getMutationsFieldBuilder() + .addBuilder(index, com.google.spanner.v1.Mutation.getDefaultInstance()); + } + /** + * + * + *
+       * Required. The mutations in this group.
+       * 
+ * + * + * repeated .google.spanner.v1.Mutation mutations = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getMutationsBuilderList() { + return getMutationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.Mutation, + com.google.spanner.v1.Mutation.Builder, + com.google.spanner.v1.MutationOrBuilder> + getMutationsFieldBuilder() { + if (mutationsBuilder_ == null) { + mutationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.Mutation, + com.google.spanner.v1.Mutation.Builder, + com.google.spanner.v1.MutationOrBuilder>( + mutations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + mutations_ = null; + } + return mutationsBuilder_; + } + + @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.BatchWriteRequest.MutationGroup) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.BatchWriteRequest.MutationGroup) + private static final com.google.spanner.v1.BatchWriteRequest.MutationGroup DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.BatchWriteRequest.MutationGroup(); + } + + public static com.google.spanner.v1.BatchWriteRequest.MutationGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MutationGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.BatchWriteRequest.MutationGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SESSION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object session_ = ""; + /** + * + * + *
+   * Required. The session in which the batch request is to be run.
+   * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The session. + */ + @java.lang.Override + public java.lang.String getSession() { + java.lang.Object ref = session_; + 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(); + session_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The session in which the batch request is to be run.
+   * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for session. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_OPTIONS_FIELD_NUMBER = 3; + private com.google.spanner.v1.RequestOptions requestOptions_; + /** + * + * + *
+   * Common options for this request.
+   * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + * + * @return Whether the requestOptions field is set. + */ + @java.lang.Override + public boolean hasRequestOptions() { + return requestOptions_ != null; + } + /** + * + * + *
+   * Common options for this request.
+   * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + * + * @return The requestOptions. + */ + @java.lang.Override + public com.google.spanner.v1.RequestOptions getRequestOptions() { + return requestOptions_ == null + ? com.google.spanner.v1.RequestOptions.getDefaultInstance() + : requestOptions_; + } + /** + * + * + *
+   * Common options for this request.
+   * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + */ + @java.lang.Override + public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder() { + return requestOptions_ == null + ? com.google.spanner.v1.RequestOptions.getDefaultInstance() + : requestOptions_; + } + + public static final int MUTATION_GROUPS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List mutationGroups_; + /** + * + * + *
+   * Required. The groups of mutations to be applied.
+   * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getMutationGroupsList() { + return mutationGroups_; + } + /** + * + * + *
+   * Required. The groups of mutations to be applied.
+   * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getMutationGroupsOrBuilderList() { + return mutationGroups_; + } + /** + * + * + *
+   * Required. The groups of mutations to be applied.
+   * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getMutationGroupsCount() { + return mutationGroups_.size(); + } + /** + * + * + *
+   * Required. The groups of mutations to be applied.
+   * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.v1.BatchWriteRequest.MutationGroup getMutationGroups(int index) { + return mutationGroups_.get(index); + } + /** + * + * + *
+   * Required. The groups of mutations to be applied.
+   * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.v1.BatchWriteRequest.MutationGroupOrBuilder getMutationGroupsOrBuilder( + int index) { + return mutationGroups_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); + } + if (requestOptions_ != null) { + output.writeMessage(3, getRequestOptions()); + } + for (int i = 0; i < mutationGroups_.size(); i++) { + output.writeMessage(4, mutationGroups_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); + } + if (requestOptions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRequestOptions()); + } + for (int i = 0; i < mutationGroups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, mutationGroups_.get(i)); + } + size += getUnknownFields().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.BatchWriteRequest)) { + return super.equals(obj); + } + com.google.spanner.v1.BatchWriteRequest other = (com.google.spanner.v1.BatchWriteRequest) obj; + + if (!getSession().equals(other.getSession())) return false; + if (hasRequestOptions() != other.hasRequestOptions()) return false; + if (hasRequestOptions()) { + if (!getRequestOptions().equals(other.getRequestOptions())) return false; + } + if (!getMutationGroupsList().equals(other.getMutationGroupsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + SESSION_FIELD_NUMBER; + hash = (53 * hash) + getSession().hashCode(); + if (hasRequestOptions()) { + hash = (37 * hash) + REQUEST_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getRequestOptions().hashCode(); + } + if (getMutationGroupsCount() > 0) { + hash = (37 * hash) + MUTATION_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getMutationGroupsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.BatchWriteRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchWriteRequest 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.BatchWriteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchWriteRequest 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.BatchWriteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchWriteRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.BatchWriteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchWriteRequest 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.BatchWriteRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchWriteRequest 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.BatchWriteRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchWriteRequest 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.BatchWriteRequest 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 [BatchWrite][google.spanner.v1.Spanner.BatchWrite].
+   * 
+ * + * Protobuf type {@code google.spanner.v1.BatchWriteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.BatchWriteRequest) + com.google.spanner.v1.BatchWriteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.BatchWriteRequest.class, + com.google.spanner.v1.BatchWriteRequest.Builder.class); + } + + // Construct using com.google.spanner.v1.BatchWriteRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + session_ = ""; + requestOptions_ = null; + if (requestOptionsBuilder_ != null) { + requestOptionsBuilder_.dispose(); + requestOptionsBuilder_ = null; + } + if (mutationGroupsBuilder_ == null) { + mutationGroups_ = java.util.Collections.emptyList(); + } else { + mutationGroups_ = null; + mutationGroupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteRequest_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.BatchWriteRequest getDefaultInstanceForType() { + return com.google.spanner.v1.BatchWriteRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.BatchWriteRequest build() { + com.google.spanner.v1.BatchWriteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.BatchWriteRequest buildPartial() { + com.google.spanner.v1.BatchWriteRequest result = + new com.google.spanner.v1.BatchWriteRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.v1.BatchWriteRequest result) { + if (mutationGroupsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + mutationGroups_ = java.util.Collections.unmodifiableList(mutationGroups_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.mutationGroups_ = mutationGroups_; + } else { + result.mutationGroups_ = mutationGroupsBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.v1.BatchWriteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.session_ = session_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestOptions_ = + requestOptionsBuilder_ == null ? requestOptions_ : requestOptionsBuilder_.build(); + } + } + + @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.BatchWriteRequest) { + return mergeFrom((com.google.spanner.v1.BatchWriteRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.BatchWriteRequest other) { + if (other == com.google.spanner.v1.BatchWriteRequest.getDefaultInstance()) return this; + if (!other.getSession().isEmpty()) { + session_ = other.session_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasRequestOptions()) { + mergeRequestOptions(other.getRequestOptions()); + } + if (mutationGroupsBuilder_ == null) { + if (!other.mutationGroups_.isEmpty()) { + if (mutationGroups_.isEmpty()) { + mutationGroups_ = other.mutationGroups_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureMutationGroupsIsMutable(); + mutationGroups_.addAll(other.mutationGroups_); + } + onChanged(); + } + } else { + if (!other.mutationGroups_.isEmpty()) { + if (mutationGroupsBuilder_.isEmpty()) { + mutationGroupsBuilder_.dispose(); + mutationGroupsBuilder_ = null; + mutationGroups_ = other.mutationGroups_; + bitField0_ = (bitField0_ & ~0x00000004); + mutationGroupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMutationGroupsFieldBuilder() + : null; + } else { + mutationGroupsBuilder_.addAllMessages(other.mutationGroups_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + session_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + input.readMessage(getRequestOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + com.google.spanner.v1.BatchWriteRequest.MutationGroup m = + input.readMessage( + com.google.spanner.v1.BatchWriteRequest.MutationGroup.parser(), + extensionRegistry); + if (mutationGroupsBuilder_ == null) { + ensureMutationGroupsIsMutable(); + mutationGroups_.add(m); + } else { + mutationGroupsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object session_ = ""; + /** + * + * + *
+     * Required. The session in which the batch request is to be run.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The session. + */ + public java.lang.String getSession() { + java.lang.Object ref = session_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + session_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The session in which the batch request is to be run.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for session. + */ + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The session in which the batch request is to be run.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The session to set. + * @return This builder for chaining. + */ + public Builder setSession(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + session_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The session in which the batch request is to be run.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSession() { + session_ = getDefaultInstance().getSession(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The session in which the batch request is to be run.
+     * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for session to set. + * @return This builder for chaining. + */ + public Builder setSessionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + session_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.spanner.v1.RequestOptions requestOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.RequestOptions, + com.google.spanner.v1.RequestOptions.Builder, + com.google.spanner.v1.RequestOptionsOrBuilder> + requestOptionsBuilder_; + /** + * + * + *
+     * Common options for this request.
+     * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + * + * @return Whether the requestOptions field is set. + */ + public boolean hasRequestOptions() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Common options for this request.
+     * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + * + * @return The requestOptions. + */ + public com.google.spanner.v1.RequestOptions getRequestOptions() { + if (requestOptionsBuilder_ == null) { + return requestOptions_ == null + ? com.google.spanner.v1.RequestOptions.getDefaultInstance() + : requestOptions_; + } else { + return requestOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Common options for this request.
+     * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + */ + public Builder setRequestOptions(com.google.spanner.v1.RequestOptions value) { + if (requestOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestOptions_ = value; + } else { + requestOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Common options for this request.
+     * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + */ + public Builder setRequestOptions(com.google.spanner.v1.RequestOptions.Builder builderForValue) { + if (requestOptionsBuilder_ == null) { + requestOptions_ = builderForValue.build(); + } else { + requestOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Common options for this request.
+     * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + */ + public Builder mergeRequestOptions(com.google.spanner.v1.RequestOptions value) { + if (requestOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && requestOptions_ != null + && requestOptions_ != com.google.spanner.v1.RequestOptions.getDefaultInstance()) { + getRequestOptionsBuilder().mergeFrom(value); + } else { + requestOptions_ = value; + } + } else { + requestOptionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Common options for this request.
+     * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + */ + public Builder clearRequestOptions() { + bitField0_ = (bitField0_ & ~0x00000002); + requestOptions_ = null; + if (requestOptionsBuilder_ != null) { + requestOptionsBuilder_.dispose(); + requestOptionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Common options for this request.
+     * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + */ + public com.google.spanner.v1.RequestOptions.Builder getRequestOptionsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRequestOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Common options for this request.
+     * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + */ + public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder() { + if (requestOptionsBuilder_ != null) { + return requestOptionsBuilder_.getMessageOrBuilder(); + } else { + return requestOptions_ == null + ? com.google.spanner.v1.RequestOptions.getDefaultInstance() + : requestOptions_; + } + } + /** + * + * + *
+     * Common options for this request.
+     * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.RequestOptions, + com.google.spanner.v1.RequestOptions.Builder, + com.google.spanner.v1.RequestOptionsOrBuilder> + getRequestOptionsFieldBuilder() { + if (requestOptionsBuilder_ == null) { + requestOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.RequestOptions, + com.google.spanner.v1.RequestOptions.Builder, + com.google.spanner.v1.RequestOptionsOrBuilder>( + getRequestOptions(), getParentForChildren(), isClean()); + requestOptions_ = null; + } + return requestOptionsBuilder_; + } + + private java.util.List mutationGroups_ = + java.util.Collections.emptyList(); + + private void ensureMutationGroupsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + mutationGroups_ = + new java.util.ArrayList( + mutationGroups_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.BatchWriteRequest.MutationGroup, + com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder, + com.google.spanner.v1.BatchWriteRequest.MutationGroupOrBuilder> + mutationGroupsBuilder_; + + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMutationGroupsList() { + if (mutationGroupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(mutationGroups_); + } else { + return mutationGroupsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getMutationGroupsCount() { + if (mutationGroupsBuilder_ == null) { + return mutationGroups_.size(); + } else { + return mutationGroupsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.v1.BatchWriteRequest.MutationGroup getMutationGroups(int index) { + if (mutationGroupsBuilder_ == null) { + return mutationGroups_.get(index); + } else { + return mutationGroupsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMutationGroups( + int index, com.google.spanner.v1.BatchWriteRequest.MutationGroup value) { + if (mutationGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMutationGroupsIsMutable(); + mutationGroups_.set(index, value); + onChanged(); + } else { + mutationGroupsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMutationGroups( + int index, com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder builderForValue) { + if (mutationGroupsBuilder_ == null) { + ensureMutationGroupsIsMutable(); + mutationGroups_.set(index, builderForValue.build()); + onChanged(); + } else { + mutationGroupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMutationGroups(com.google.spanner.v1.BatchWriteRequest.MutationGroup value) { + if (mutationGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMutationGroupsIsMutable(); + mutationGroups_.add(value); + onChanged(); + } else { + mutationGroupsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMutationGroups( + int index, com.google.spanner.v1.BatchWriteRequest.MutationGroup value) { + if (mutationGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMutationGroupsIsMutable(); + mutationGroups_.add(index, value); + onChanged(); + } else { + mutationGroupsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMutationGroups( + com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder builderForValue) { + if (mutationGroupsBuilder_ == null) { + ensureMutationGroupsIsMutable(); + mutationGroups_.add(builderForValue.build()); + onChanged(); + } else { + mutationGroupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMutationGroups( + int index, com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder builderForValue) { + if (mutationGroupsBuilder_ == null) { + ensureMutationGroupsIsMutable(); + mutationGroups_.add(index, builderForValue.build()); + onChanged(); + } else { + mutationGroupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllMutationGroups( + java.lang.Iterable + values) { + if (mutationGroupsBuilder_ == null) { + ensureMutationGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mutationGroups_); + onChanged(); + } else { + mutationGroupsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMutationGroups() { + if (mutationGroupsBuilder_ == null) { + mutationGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + mutationGroupsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeMutationGroups(int index) { + if (mutationGroupsBuilder_ == null) { + ensureMutationGroupsIsMutable(); + mutationGroups_.remove(index); + onChanged(); + } else { + mutationGroupsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder getMutationGroupsBuilder( + int index) { + return getMutationGroupsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.v1.BatchWriteRequest.MutationGroupOrBuilder + getMutationGroupsOrBuilder(int index) { + if (mutationGroupsBuilder_ == null) { + return mutationGroups_.get(index); + } else { + return mutationGroupsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMutationGroupsOrBuilderList() { + if (mutationGroupsBuilder_ != null) { + return mutationGroupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mutationGroups_); + } + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder + addMutationGroupsBuilder() { + return getMutationGroupsFieldBuilder() + .addBuilder(com.google.spanner.v1.BatchWriteRequest.MutationGroup.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder addMutationGroupsBuilder( + int index) { + return getMutationGroupsFieldBuilder() + .addBuilder( + index, com.google.spanner.v1.BatchWriteRequest.MutationGroup.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The groups of mutations to be applied.
+     * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMutationGroupsBuilderList() { + return getMutationGroupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.BatchWriteRequest.MutationGroup, + com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder, + com.google.spanner.v1.BatchWriteRequest.MutationGroupOrBuilder> + getMutationGroupsFieldBuilder() { + if (mutationGroupsBuilder_ == null) { + mutationGroupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.BatchWriteRequest.MutationGroup, + com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder, + com.google.spanner.v1.BatchWriteRequest.MutationGroupOrBuilder>( + mutationGroups_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + mutationGroups_ = null; + } + return mutationGroupsBuilder_; + } + + @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.BatchWriteRequest) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.BatchWriteRequest) + private static final com.google.spanner.v1.BatchWriteRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.BatchWriteRequest(); + } + + public static com.google.spanner.v1.BatchWriteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchWriteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.BatchWriteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequestOrBuilder.java new file mode 100644 index 00000000000..88615ac1c88 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/spanner.proto + +package com.google.spanner.v1; + +public interface BatchWriteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.BatchWriteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The session in which the batch request is to be run.
+   * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The session. + */ + java.lang.String getSession(); + /** + * + * + *
+   * Required. The session in which the batch request is to be run.
+   * 
+ * + * + * string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for session. + */ + com.google.protobuf.ByteString getSessionBytes(); + + /** + * + * + *
+   * Common options for this request.
+   * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + * + * @return Whether the requestOptions field is set. + */ + boolean hasRequestOptions(); + /** + * + * + *
+   * Common options for this request.
+   * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + * + * @return The requestOptions. + */ + com.google.spanner.v1.RequestOptions getRequestOptions(); + /** + * + * + *
+   * Common options for this request.
+   * 
+ * + * .google.spanner.v1.RequestOptions request_options = 3; + */ + com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder(); + + /** + * + * + *
+   * Required. The groups of mutations to be applied.
+   * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getMutationGroupsList(); + /** + * + * + *
+   * Required. The groups of mutations to be applied.
+   * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.spanner.v1.BatchWriteRequest.MutationGroup getMutationGroups(int index); + /** + * + * + *
+   * Required. The groups of mutations to be applied.
+   * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getMutationGroupsCount(); + /** + * + * + *
+   * Required. The groups of mutations to be applied.
+   * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getMutationGroupsOrBuilderList(); + /** + * + * + *
+   * Required. The groups of mutations to be applied.
+   * 
+ * + * + * repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.spanner.v1.BatchWriteRequest.MutationGroupOrBuilder getMutationGroupsOrBuilder( + int index); +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponse.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponse.java new file mode 100644 index 00000000000..b7525340d07 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponse.java @@ -0,0 +1,1221 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/spanner.proto + +package com.google.spanner.v1; + +/** + * + * + *
+ * The result of applying a batch of mutations.
+ * 
+ * + * Protobuf type {@code google.spanner.v1.BatchWriteResponse} + */ +public final class BatchWriteResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.BatchWriteResponse) + BatchWriteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchWriteResponse.newBuilder() to construct. + private BatchWriteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchWriteResponse() { + indexes_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchWriteResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.BatchWriteResponse.class, + com.google.spanner.v1.BatchWriteResponse.Builder.class); + } + + public static final int INDEXES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList indexes_; + /** + * + * + *
+   * The mutation groups applied in this batch. The values index into the
+   * `mutation_groups` field in the corresponding `BatchWriteRequest`.
+   * 
+ * + * repeated int32 indexes = 1; + * + * @return A list containing the indexes. + */ + @java.lang.Override + public java.util.List getIndexesList() { + return indexes_; + } + /** + * + * + *
+   * The mutation groups applied in this batch. The values index into the
+   * `mutation_groups` field in the corresponding `BatchWriteRequest`.
+   * 
+ * + * repeated int32 indexes = 1; + * + * @return The count of indexes. + */ + public int getIndexesCount() { + return indexes_.size(); + } + /** + * + * + *
+   * The mutation groups applied in this batch. The values index into the
+   * `mutation_groups` field in the corresponding `BatchWriteRequest`.
+   * 
+ * + * repeated int32 indexes = 1; + * + * @param index The index of the element to return. + * @return The indexes at the given index. + */ + public int getIndexes(int index) { + return indexes_.getInt(index); + } + + private int indexesMemoizedSerializedSize = -1; + + public static final int STATUS_FIELD_NUMBER = 2; + private com.google.rpc.Status status_; + /** + * + * + *
+   * An `OK` status indicates success. Any other status indicates a failure.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + * + * + *
+   * An `OK` status indicates success. Any other status indicates a failure.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + * + * + *
+   * An `OK` status indicates success. Any other status indicates a failure.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + + public static final int COMMIT_TIMESTAMP_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp commitTimestamp_; + /** + * + * + *
+   * The commit timestamp of the transaction that applied this batch.
+   * Present if `status` is `OK`, absent otherwise.
+   * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + * + * @return Whether the commitTimestamp field is set. + */ + @java.lang.Override + public boolean hasCommitTimestamp() { + return commitTimestamp_ != null; + } + /** + * + * + *
+   * The commit timestamp of the transaction that applied this batch.
+   * Present if `status` is `OK`, absent otherwise.
+   * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + * + * @return The commitTimestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCommitTimestamp() { + return commitTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitTimestamp_; + } + /** + * + * + *
+   * The commit timestamp of the transaction that applied this batch.
+   * Present if `status` is `OK`, absent otherwise.
+   * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { + return commitTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitTimestamp_; + } + + 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 { + getSerializedSize(); + if (getIndexesList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(indexesMemoizedSerializedSize); + } + for (int i = 0; i < indexes_.size(); i++) { + output.writeInt32NoTag(indexes_.getInt(i)); + } + if (status_ != null) { + output.writeMessage(2, getStatus()); + } + if (commitTimestamp_ != null) { + output.writeMessage(3, getCommitTimestamp()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < indexes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(indexes_.getInt(i)); + } + size += dataSize; + if (!getIndexesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + indexesMemoizedSerializedSize = dataSize; + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); + } + if (commitTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCommitTimestamp()); + } + size += getUnknownFields().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.BatchWriteResponse)) { + return super.equals(obj); + } + com.google.spanner.v1.BatchWriteResponse other = (com.google.spanner.v1.BatchWriteResponse) obj; + + if (!getIndexesList().equals(other.getIndexesList())) return false; + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (hasCommitTimestamp() != other.hasCommitTimestamp()) return false; + if (hasCommitTimestamp()) { + if (!getCommitTimestamp().equals(other.getCommitTimestamp())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIndexesCount() > 0) { + hash = (37 * hash) + INDEXES_FIELD_NUMBER; + hash = (53 * hash) + getIndexesList().hashCode(); + } + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + if (hasCommitTimestamp()) { + hash = (37 * hash) + COMMIT_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getCommitTimestamp().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.BatchWriteResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchWriteResponse 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.BatchWriteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchWriteResponse 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.BatchWriteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.BatchWriteResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.BatchWriteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchWriteResponse 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.BatchWriteResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchWriteResponse 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.BatchWriteResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.BatchWriteResponse 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.BatchWriteResponse 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 result of applying a batch of mutations.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.BatchWriteResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.BatchWriteResponse) + com.google.spanner.v1.BatchWriteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.BatchWriteResponse.class, + com.google.spanner.v1.BatchWriteResponse.Builder.class); + } + + // Construct using com.google.spanner.v1.BatchWriteResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + indexes_ = emptyIntList(); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + commitTimestamp_ = null; + if (commitTimestampBuilder_ != null) { + commitTimestampBuilder_.dispose(); + commitTimestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_BatchWriteResponse_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.BatchWriteResponse getDefaultInstanceForType() { + return com.google.spanner.v1.BatchWriteResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.BatchWriteResponse build() { + com.google.spanner.v1.BatchWriteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.BatchWriteResponse buildPartial() { + com.google.spanner.v1.BatchWriteResponse result = + new com.google.spanner.v1.BatchWriteResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.v1.BatchWriteResponse result) { + if (((bitField0_ & 0x00000001) != 0)) { + indexes_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.indexes_ = indexes_; + } + + private void buildPartial0(com.google.spanner.v1.BatchWriteResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.commitTimestamp_ = + commitTimestampBuilder_ == null ? commitTimestamp_ : commitTimestampBuilder_.build(); + } + } + + @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.BatchWriteResponse) { + return mergeFrom((com.google.spanner.v1.BatchWriteResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.BatchWriteResponse other) { + if (other == com.google.spanner.v1.BatchWriteResponse.getDefaultInstance()) return this; + if (!other.indexes_.isEmpty()) { + if (indexes_.isEmpty()) { + indexes_ = other.indexes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIndexesIsMutable(); + indexes_.addAll(other.indexes_); + } + onChanged(); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (other.hasCommitTimestamp()) { + mergeCommitTimestamp(other.getCommitTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int v = input.readInt32(); + ensureIndexesIsMutable(); + indexes_.addInt(v); + break; + } // case 8 + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureIndexesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + indexes_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 10 + case 18: + { + input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCommitTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.IntList indexes_ = emptyIntList(); + + private void ensureIndexesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + indexes_ = mutableCopy(indexes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The mutation groups applied in this batch. The values index into the
+     * `mutation_groups` field in the corresponding `BatchWriteRequest`.
+     * 
+ * + * repeated int32 indexes = 1; + * + * @return A list containing the indexes. + */ + public java.util.List getIndexesList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(indexes_) + : indexes_; + } + /** + * + * + *
+     * The mutation groups applied in this batch. The values index into the
+     * `mutation_groups` field in the corresponding `BatchWriteRequest`.
+     * 
+ * + * repeated int32 indexes = 1; + * + * @return The count of indexes. + */ + public int getIndexesCount() { + return indexes_.size(); + } + /** + * + * + *
+     * The mutation groups applied in this batch. The values index into the
+     * `mutation_groups` field in the corresponding `BatchWriteRequest`.
+     * 
+ * + * repeated int32 indexes = 1; + * + * @param index The index of the element to return. + * @return The indexes at the given index. + */ + public int getIndexes(int index) { + return indexes_.getInt(index); + } + /** + * + * + *
+     * The mutation groups applied in this batch. The values index into the
+     * `mutation_groups` field in the corresponding `BatchWriteRequest`.
+     * 
+ * + * repeated int32 indexes = 1; + * + * @param index The index to set the value at. + * @param value The indexes to set. + * @return This builder for chaining. + */ + public Builder setIndexes(int index, int value) { + + ensureIndexesIsMutable(); + indexes_.setInt(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The mutation groups applied in this batch. The values index into the
+     * `mutation_groups` field in the corresponding `BatchWriteRequest`.
+     * 
+ * + * repeated int32 indexes = 1; + * + * @param value The indexes to add. + * @return This builder for chaining. + */ + public Builder addIndexes(int value) { + + ensureIndexesIsMutable(); + indexes_.addInt(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The mutation groups applied in this batch. The values index into the
+     * `mutation_groups` field in the corresponding `BatchWriteRequest`.
+     * 
+ * + * repeated int32 indexes = 1; + * + * @param values The indexes to add. + * @return This builder for chaining. + */ + public Builder addAllIndexes(java.lang.Iterable values) { + ensureIndexesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, indexes_); + onChanged(); + return this; + } + /** + * + * + *
+     * The mutation groups applied in this batch. The values index into the
+     * `mutation_groups` field in the corresponding `BatchWriteRequest`.
+     * 
+ * + * repeated int32 indexes = 1; + * + * @return This builder for chaining. + */ + public Builder clearIndexes() { + indexes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + /** + * + * + *
+     * An `OK` status indicates success. Any other status indicates a failure.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * An `OK` status indicates success. Any other status indicates a failure.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * An `OK` status indicates success. Any other status indicates a failure.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + } else { + statusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * An `OK` status indicates success. Any other status indicates a failure.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * An `OK` status indicates success. Any other status indicates a failure.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && status_ != null + && status_ != com.google.rpc.Status.getDefaultInstance()) { + getStatusBuilder().mergeFrom(value); + } else { + status_ = value; + } + } else { + statusBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * An `OK` status indicates success. Any other status indicates a failure.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000002); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * An `OK` status indicates success. Any other status indicates a failure.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An `OK` status indicates success. Any other status indicates a failure.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + * + * + *
+     * An `OK` status indicates success. Any other status indicates a failure.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + private com.google.protobuf.Timestamp commitTimestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + commitTimestampBuilder_; + /** + * + * + *
+     * The commit timestamp of the transaction that applied this batch.
+     * Present if `status` is `OK`, absent otherwise.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + * + * @return Whether the commitTimestamp field is set. + */ + public boolean hasCommitTimestamp() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The commit timestamp of the transaction that applied this batch.
+     * Present if `status` is `OK`, absent otherwise.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + * + * @return The commitTimestamp. + */ + public com.google.protobuf.Timestamp getCommitTimestamp() { + if (commitTimestampBuilder_ == null) { + return commitTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitTimestamp_; + } else { + return commitTimestampBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The commit timestamp of the transaction that applied this batch.
+     * Present if `status` is `OK`, absent otherwise.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + */ + public Builder setCommitTimestamp(com.google.protobuf.Timestamp value) { + if (commitTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commitTimestamp_ = value; + } else { + commitTimestampBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The commit timestamp of the transaction that applied this batch.
+     * Present if `status` is `OK`, absent otherwise.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + */ + public Builder setCommitTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) { + if (commitTimestampBuilder_ == null) { + commitTimestamp_ = builderForValue.build(); + } else { + commitTimestampBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The commit timestamp of the transaction that applied this batch.
+     * Present if `status` is `OK`, absent otherwise.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + */ + public Builder mergeCommitTimestamp(com.google.protobuf.Timestamp value) { + if (commitTimestampBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && commitTimestamp_ != null + && commitTimestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCommitTimestampBuilder().mergeFrom(value); + } else { + commitTimestamp_ = value; + } + } else { + commitTimestampBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The commit timestamp of the transaction that applied this batch.
+     * Present if `status` is `OK`, absent otherwise.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + */ + public Builder clearCommitTimestamp() { + bitField0_ = (bitField0_ & ~0x00000004); + commitTimestamp_ = null; + if (commitTimestampBuilder_ != null) { + commitTimestampBuilder_.dispose(); + commitTimestampBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The commit timestamp of the transaction that applied this batch.
+     * Present if `status` is `OK`, absent otherwise.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + */ + public com.google.protobuf.Timestamp.Builder getCommitTimestampBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCommitTimestampFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The commit timestamp of the transaction that applied this batch.
+     * Present if `status` is `OK`, absent otherwise.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + */ + public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { + if (commitTimestampBuilder_ != null) { + return commitTimestampBuilder_.getMessageOrBuilder(); + } else { + return commitTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitTimestamp_; + } + } + /** + * + * + *
+     * The commit timestamp of the transaction that applied this batch.
+     * Present if `status` is `OK`, absent otherwise.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCommitTimestampFieldBuilder() { + if (commitTimestampBuilder_ == null) { + commitTimestampBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCommitTimestamp(), getParentForChildren(), isClean()); + commitTimestamp_ = null; + } + return commitTimestampBuilder_; + } + + @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.BatchWriteResponse) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.BatchWriteResponse) + private static final com.google.spanner.v1.BatchWriteResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.BatchWriteResponse(); + } + + public static com.google.spanner.v1.BatchWriteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchWriteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.BatchWriteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponseOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponseOrBuilder.java new file mode 100644 index 00000000000..9fe756ecf03 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponseOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/spanner.proto + +package com.google.spanner.v1; + +public interface BatchWriteResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.BatchWriteResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The mutation groups applied in this batch. The values index into the
+   * `mutation_groups` field in the corresponding `BatchWriteRequest`.
+   * 
+ * + * repeated int32 indexes = 1; + * + * @return A list containing the indexes. + */ + java.util.List getIndexesList(); + /** + * + * + *
+   * The mutation groups applied in this batch. The values index into the
+   * `mutation_groups` field in the corresponding `BatchWriteRequest`.
+   * 
+ * + * repeated int32 indexes = 1; + * + * @return The count of indexes. + */ + int getIndexesCount(); + /** + * + * + *
+   * The mutation groups applied in this batch. The values index into the
+   * `mutation_groups` field in the corresponding `BatchWriteRequest`.
+   * 
+ * + * repeated int32 indexes = 1; + * + * @param index The index of the element to return. + * @return The indexes at the given index. + */ + int getIndexes(int index); + + /** + * + * + *
+   * An `OK` status indicates success. Any other status indicates a failure.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+   * An `OK` status indicates success. Any other status indicates a failure.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+   * An `OK` status indicates success. Any other status indicates a failure.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + + /** + * + * + *
+   * The commit timestamp of the transaction that applied this batch.
+   * Present if `status` is `OK`, absent otherwise.
+   * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + * + * @return Whether the commitTimestamp field is set. + */ + boolean hasCommitTimestamp(); + /** + * + * + *
+   * The commit timestamp of the transaction that applied this batch.
+   * Present if `status` is `OK`, absent otherwise.
+   * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + * + * @return The commitTimestamp. + */ + com.google.protobuf.Timestamp getCommitTimestamp(); + /** + * + * + *
+   * The commit timestamp of the transaction that applied this batch.
+   * Present if `status` is `OK`, absent otherwise.
+   * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 3; + */ + com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder(); +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequest.java index fae0074b1ca..36768bd8d30 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequestOrBuilder.java index 61c73dbe378..0e392cd708f 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java index a052d9059b4..70873e5129a 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java index c55778357bb..dae8af33200 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponse.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponse.java index f3331b717f4..cdbd0e0ac8d 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponse.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseOrBuilder.java index 256983c2f71..f3a1917c261 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseProto.java index 29045351437..a0275299548 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequest.java index 68c912c6598..c990f56b5a9 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequestOrBuilder.java index e6e69132e6f..283b6307c33 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DatabaseName.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DatabaseName.java index 3df2c6e0804..d4cce686cce 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DatabaseName.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DatabaseName.java @@ -154,7 +154,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { DatabaseName that = ((DatabaseName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.instance, that.instance) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequest.java index 26f385c994c..6f10b8712d9 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequestOrBuilder.java index 5774259370a..7e36ce651d1 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java index 3c9f88a1e4e..29f1262ff2f 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequestOrBuilder.java index b0ecb6ff7ca..7715f9e4029 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponse.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponse.java index b467bf5feb0..d6632adca4a 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponse.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponseOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponseOrBuilder.java index ac45d58c2fc..297c8b2e34c 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponseOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java index 8418e41cc38..cb16f3cac6f 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java index 1bfb3f43749..6d677bca846 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequest.java index 0a78d665a60..2f06025e247 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequestOrBuilder.java index 811caaed11a..4f43c14e649 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRange.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRange.java index 6eb2bd0e2ac..7c5560e1ac0 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRange.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRange.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRangeOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRangeOrBuilder.java index 77a2acdc324..3310e6af4af 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRangeOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRangeOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySet.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySet.java index d89ccd74fcb..fb43bbec4a0 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySet.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySet.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySetOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySetOrBuilder.java index 7ff32d68436..4aa83584ea3 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySetOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySetOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeysProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeysProto.java index c448bd7a673..7db545a22ec 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeysProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeysProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequest.java index 067526b246f..270677ecec4 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequestOrBuilder.java index 9588536d71d..fc3024b4159 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponse.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponse.java index 820f48dcd7f..f0b342c7deb 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponse.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponseOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponseOrBuilder.java index 3f42309cc36..5850d1e55e8 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Mutation.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Mutation.java index 96d2dcea3ea..74825356015 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Mutation.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Mutation.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationOrBuilder.java index f448af6710f..9f662719d55 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationProto.java index ca64bf3a9b8..8176ccbd8ad 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSet.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSet.java index 04457063afb..7cc3aafbb4d 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSet.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSetOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSetOrBuilder.java index d0fb0a05c77..a81cfafe132 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSetOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSetOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Partition.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Partition.java index c25d69935af..f569b078cfb 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Partition.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Partition.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptions.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptions.java index 52c32ec4de8..74cd83c3b58 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptions.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptionsOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptionsOrBuilder.java index 07d763cbf90..644c2542184 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptionsOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptionsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOrBuilder.java index cec517cd5df..60daac111a6 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequest.java index 47b4bcfc6a2..af550f5488d 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequestOrBuilder.java index 03858c082d1..0527cd263ce 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequest.java index 8b8d2a6b4f6..2b8e5562dba 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequestOrBuilder.java index 2f6a285bc43..0f78440f96d 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponse.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponse.java index 66ba370b276..bb7ef647d0d 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponse.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponseOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponseOrBuilder.java index 0015b84f03f..9af27927b29 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponseOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNode.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNode.java index 6507cb2656f..0db01a2bacb 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNode.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNodeOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNodeOrBuilder.java index 0ba896c5717..073eb24077e 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNodeOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNodeOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlan.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlan.java index 54d2be319de..0738552475f 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlan.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlan.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanOrBuilder.java index 2c570c1e9e1..3f0567d3375 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanProto.java index c3bc87108b6..863a047faa2 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java index 54129945d8c..9a22689648f 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java index 3bdf94f7ebd..cc5f8f368dc 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptions.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptions.java index 3b43c192884..46bdfe3297b 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptions.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptionsOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptionsOrBuilder.java index c2c12f4a0b1..399b1a3b2ee 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptionsOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptionsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSet.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSet.java index c2982901a17..9fe21bb3fc8 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSet.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadata.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadata.java index a195b930323..704acc2d543 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadata.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadataOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadataOrBuilder.java index ec11a259891..f78edce7a6d 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetOrBuilder.java index 81a2f13afd3..4e01eda0560 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetProto.java index 72abfc21124..5c3bbe434fc 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStats.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStats.java index b4472630c26..acd90adc55d 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStats.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStats.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStatsOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStatsOrBuilder.java index 049091eeb0c..2cc3b8e2fbc 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStatsOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStatsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequest.java index d079779e349..2d4647ff4d2 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequestOrBuilder.java index 06a29aeb00b..441b691f1f0 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Session.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Session.java index 30a10b81938..8b7eab15c65 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Session.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Session.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionName.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionName.java index 241081d9bda..14023e7fcea 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionName.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionName.java @@ -174,7 +174,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { SessionName that = ((SessionName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.instance, that.instance) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionOrBuilder.java index 15a932664ab..6df98f7ebef 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java index eaa10048ac4..daa5ed9f50e 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -135,6 +135,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_spanner_v1_RollbackRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_spanner_v1_RollbackRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_BatchWriteRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_BatchWriteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_BatchWriteRequest_MutationGroup_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_BatchWriteRequest_MutationGroup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_BatchWriteResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_BatchWriteResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -277,86 +289,102 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "equestOptionsB\r\n\013transaction\"i\n\017Rollback" + "Request\0228\n\007session\030\001 \001(\tB\'\342A\001\002\372A \n\036spann" + "er.googleapis.com/Session\022\034\n\016transaction" - + "_id\030\002 \001(\014B\004\342A\001\0022\300\026\n\007Spanner\022\246\001\n\rCreateSe" - + "ssion\022\'.google.spanner.v1.CreateSessionR" - + "equest\032\032.google.spanner.v1.Session\"P\332A\010d" - + "atabase\202\323\344\223\002?\":/v1/{database=projects/*/" - + "instances/*/databases/*}/sessions:\001*\022\340\001\n" - + "\023BatchCreateSessions\022-.google.spanner.v1" - + ".BatchCreateSessionsRequest\032..google.spa" - + "nner.v1.BatchCreateSessionsResponse\"j\332A\026" - + "database,session_count\202\323\344\223\002K\"F/v1/{datab" - + "ase=projects/*/instances/*/databases/*}/" - + "sessions:batchCreate:\001*\022\227\001\n\nGetSession\022$" - + ".google.spanner.v1.GetSessionRequest\032\032.g" - + "oogle.spanner.v1.Session\"G\332A\004name\202\323\344\223\002:\022" - + "8/v1/{name=projects/*/instances/*/databa" - + "ses/*/sessions/*}\022\256\001\n\014ListSessions\022&.goo" - + "gle.spanner.v1.ListSessionsRequest\032\'.goo" - + "gle.spanner.v1.ListSessionsResponse\"M\332A\010" - + "database\202\323\344\223\002<\022:/v1/{database=projects/*" - + "/instances/*/databases/*}/sessions\022\231\001\n\rD" - + "eleteSession\022\'.google.spanner.v1.DeleteS" - + "essionRequest\032\026.google.protobuf.Empty\"G\332" - + "A\004name\202\323\344\223\002:*8/v1/{name=projects/*/insta" - + "nces/*/databases/*/sessions/*}\022\243\001\n\nExecu" - + "teSql\022$.google.spanner.v1.ExecuteSqlRequ" - + "est\032\034.google.spanner.v1.ResultSet\"Q\202\323\344\223\002" - + "K\"F/v1/{session=projects/*/instances/*/d" - + "atabases/*/sessions/*}:executeSql:\001*\022\276\001\n" - + "\023ExecuteStreamingSql\022$.google.spanner.v1" - + ".ExecuteSqlRequest\032#.google.spanner.v1.P" - + "artialResultSet\"Z\202\323\344\223\002T\"O/v1/{session=pr" - + "ojects/*/instances/*/databases/*/session" - + "s/*}:executeStreamingSql:\001*0\001\022\300\001\n\017Execut" - + "eBatchDml\022).google.spanner.v1.ExecuteBat" - + "chDmlRequest\032*.google.spanner.v1.Execute" - + "BatchDmlResponse\"V\202\323\344\223\002P\"K/v1/{session=p" + + "_id\030\002 \001(\014B\004\342A\001\002\"\243\002\n\021BatchWriteRequest\0228\n" + + "\007session\030\001 \001(\tB\'\342A\001\002\372A \n\036spanner.googlea" + + "pis.com/Session\022:\n\017request_options\030\003 \001(\013" + + "2!.google.spanner.v1.RequestOptions\022Q\n\017m" + + "utation_groups\030\004 \003(\01322.google.spanner.v1" + + ".BatchWriteRequest.MutationGroupB\004\342A\001\002\032E" + + "\n\rMutationGroup\0224\n\tmutations\030\001 \003(\0132\033.goo" + + "gle.spanner.v1.MutationB\004\342A\001\002\"\177\n\022BatchWr" + + "iteResponse\022\017\n\007indexes\030\001 \003(\005\022\"\n\006status\030\002" + + " \001(\0132\022.google.rpc.Status\0224\n\020commit_times" + + "tamp\030\003 \001(\0132\032.google.protobuf.Timestamp2\213" + + "\030\n\007Spanner\022\246\001\n\rCreateSession\022\'.google.sp" + + "anner.v1.CreateSessionRequest\032\032.google.s" + + "panner.v1.Session\"P\332A\010database\202\323\344\223\002?\":/v" + + "1/{database=projects/*/instances/*/datab" + + "ases/*}/sessions:\001*\022\340\001\n\023BatchCreateSessi" + + "ons\022-.google.spanner.v1.BatchCreateSessi" + + "onsRequest\032..google.spanner.v1.BatchCrea" + + "teSessionsResponse\"j\332A\026database,session_" + + "count\202\323\344\223\002K\"F/v1/{database=projects/*/in" + + "stances/*/databases/*}/sessions:batchCre" + + "ate:\001*\022\227\001\n\nGetSession\022$.google.spanner.v" + + "1.GetSessionRequest\032\032.google.spanner.v1." + + "Session\"G\332A\004name\202\323\344\223\002:\0228/v1/{name=projec" + + "ts/*/instances/*/databases/*/sessions/*}" + + "\022\256\001\n\014ListSessions\022&.google.spanner.v1.Li" + + "stSessionsRequest\032\'.google.spanner.v1.Li" + + "stSessionsResponse\"M\332A\010database\202\323\344\223\002<\022:/" + + "v1/{database=projects/*/instances/*/data" + + "bases/*}/sessions\022\231\001\n\rDeleteSession\022\'.go" + + "ogle.spanner.v1.DeleteSessionRequest\032\026.g" + + "oogle.protobuf.Empty\"G\332A\004name\202\323\344\223\002:*8/v1" + + "/{name=projects/*/instances/*/databases/" + + "*/sessions/*}\022\243\001\n\nExecuteSql\022$.google.sp" + + "anner.v1.ExecuteSqlRequest\032\034.google.span" + + "ner.v1.ResultSet\"Q\202\323\344\223\002K\"F/v1/{session=p" + "rojects/*/instances/*/databases/*/sessio" - + "ns/*}:executeBatchDml:\001*\022\221\001\n\004Read\022\036.goog" - + "le.spanner.v1.ReadRequest\032\034.google.spann" - + "er.v1.ResultSet\"K\202\323\344\223\002E\"@/v1/{session=pr" - + "ojects/*/instances/*/databases/*/session" - + "s/*}:read:\001*\022\254\001\n\rStreamingRead\022\036.google." - + "spanner.v1.ReadRequest\032#.google.spanner." - + "v1.PartialResultSet\"T\202\323\344\223\002N\"I/v1/{sessio" - + "n=projects/*/instances/*/databases/*/ses" - + "sions/*}:streamingRead:\001*0\001\022\311\001\n\020BeginTra" - + "nsaction\022*.google.spanner.v1.BeginTransa" - + "ctionRequest\032\036.google.spanner.v1.Transac" - + "tion\"i\332A\017session,options\202\323\344\223\002Q\"L/v1/{ses" - + "sion=projects/*/instances/*/databases/*/" - + "sessions/*}:beginTransaction:\001*\022\353\001\n\006Comm" - + "it\022 .google.spanner.v1.CommitRequest\032!.g" - + "oogle.spanner.v1.CommitResponse\"\233\001\332A ses" - + "sion,transaction_id,mutations\332A(session," - + "single_use_transaction,mutations\202\323\344\223\002G\"B" + + "ns/*}:executeSql:\001*\022\276\001\n\023ExecuteStreaming" + + "Sql\022$.google.spanner.v1.ExecuteSqlReques" + + "t\032#.google.spanner.v1.PartialResultSet\"Z" + + "\202\323\344\223\002T\"O/v1/{session=projects/*/instance" + + "s/*/databases/*/sessions/*}:executeStrea" + + "mingSql:\001*0\001\022\300\001\n\017ExecuteBatchDml\022).googl" + + "e.spanner.v1.ExecuteBatchDmlRequest\032*.go" + + "ogle.spanner.v1.ExecuteBatchDmlResponse\"" + + "V\202\323\344\223\002P\"K/v1/{session=projects/*/instanc" + + "es/*/databases/*/sessions/*}:executeBatc" + + "hDml:\001*\022\221\001\n\004Read\022\036.google.spanner.v1.Rea" + + "dRequest\032\034.google.spanner.v1.ResultSet\"K" + + "\202\323\344\223\002E\"@/v1/{session=projects/*/instance" + + "s/*/databases/*/sessions/*}:read:\001*\022\254\001\n\r" + + "StreamingRead\022\036.google.spanner.v1.ReadRe" + + "quest\032#.google.spanner.v1.PartialResultS" + + "et\"T\202\323\344\223\002N\"I/v1/{session=projects/*/inst" + + "ances/*/databases/*/sessions/*}:streamin" + + "gRead:\001*0\001\022\311\001\n\020BeginTransaction\022*.google" + + ".spanner.v1.BeginTransactionRequest\032\036.go" + + "ogle.spanner.v1.Transaction\"i\332A\017session," + + "options\202\323\344\223\002Q\"L/v1/{session=projects/*/i" + + "nstances/*/databases/*/sessions/*}:begin" + + "Transaction:\001*\022\353\001\n\006Commit\022 .google.spann" + + "er.v1.CommitRequest\032!.google.spanner.v1." + + "CommitResponse\"\233\001\332A session,transaction_" + + "id,mutations\332A(session,single_use_transa" + + "ction,mutations\202\323\344\223\002G\"B/v1/{session=proj" + + "ects/*/instances/*/databases/*/sessions/" + + "*}:commit:\001*\022\260\001\n\010Rollback\022\".google.spann" + + "er.v1.RollbackRequest\032\026.google.protobuf." + + "Empty\"h\332A\026session,transaction_id\202\323\344\223\002I\"D" + "/v1/{session=projects/*/instances/*/data" - + "bases/*/sessions/*}:commit:\001*\022\260\001\n\010Rollba" - + "ck\022\".google.spanner.v1.RollbackRequest\032\026" - + ".google.protobuf.Empty\"h\332A\026session,trans" - + "action_id\202\323\344\223\002I\"D/v1/{session=projects/*" - + "/instances/*/databases/*/sessions/*}:rol" - + "lback:\001*\022\267\001\n\016PartitionQuery\022(.google.spa" - + "nner.v1.PartitionQueryRequest\032$.google.s" - + "panner.v1.PartitionResponse\"U\202\323\344\223\002O\"J/v1" - + "/{session=projects/*/instances/*/databas" - + "es/*/sessions/*}:partitionQuery:\001*\022\264\001\n\rP" - + "artitionRead\022\'.google.spanner.v1.Partiti" - + "onReadRequest\032$.google.spanner.v1.Partit" - + "ionResponse\"T\202\323\344\223\002N\"I/v1/{session=projec" - + "ts/*/instances/*/databases/*/sessions/*}" - + ":partitionRead:\001*\032w\312A\026spanner.googleapis" - + ".com\322A[https://www.googleapis.com/auth/c" - + "loud-platform,https://www.googleapis.com" - + "/auth/spanner.dataB\221\002\n\025com.google.spanne" - + "r.v1B\014SpannerProtoP\001Z5cloud.google.com/g" - + "o/spanner/apiv1/spannerpb;spannerpb\252\002\027Go" - + "ogle.Cloud.Spanner.V1\312\002\027Google\\Cloud\\Spa" - + "nner\\V1\352\002\032Google::Cloud::Spanner::V1\352A_\n" - + "\037spanner.googleapis.com/Database\022 com.google.cloud google-cloud-spanner - 6.44.0 + 6.47.0
diff --git a/samples/native-image/pom.xml b/samples/native-image/pom.xml index 1655dc936e4..51a1baedeb4 100644 --- a/samples/native-image/pom.xml +++ b/samples/native-image/pom.xml @@ -28,7 +28,7 @@ com.google.cloud libraries-bom - 26.22.0 + 26.23.0 pom import @@ -109,7 +109,7 @@ org.graalvm.buildtools junit-platform-native - 0.9.23 + 0.9.27 test
@@ -130,7 +130,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.23 + 0.9.27 true com.example.spanner.NativeImageSpannerSample diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index faddfc846e0..e055077d607 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -31,7 +31,7 @@ com.google.cloud google-cloud-spanner - 6.47.0 + 6.48.0 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 4731895c8e2..b596629c136 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -34,7 +34,7 @@ com.google.cloud libraries-bom - 26.22.0 + 26.23.0 pom import diff --git a/versions.txt b/versions.txt index 191e5fc7f49..a937dbdadba 100644 --- a/versions.txt +++ b/versions.txt @@ -1,11 +1,11 @@ # Format: # module:released-version:current-version -proto-google-cloud-spanner-admin-instance-v1:6.47.0:6.47.0 -proto-google-cloud-spanner-v1:6.47.0:6.47.0 -proto-google-cloud-spanner-admin-database-v1:6.47.0:6.47.0 -grpc-google-cloud-spanner-v1:6.47.0:6.47.0 -grpc-google-cloud-spanner-admin-instance-v1:6.47.0:6.47.0 -grpc-google-cloud-spanner-admin-database-v1:6.47.0:6.47.0 -google-cloud-spanner:6.47.0:6.47.0 -google-cloud-spanner-executor:6.47.0:6.47.0 +proto-google-cloud-spanner-admin-instance-v1:6.48.0:6.48.0 +proto-google-cloud-spanner-v1:6.48.0:6.48.0 +proto-google-cloud-spanner-admin-database-v1:6.48.0:6.48.0 +grpc-google-cloud-spanner-v1:6.48.0:6.48.0 +grpc-google-cloud-spanner-admin-instance-v1:6.48.0:6.48.0 +grpc-google-cloud-spanner-admin-database-v1:6.48.0:6.48.0 +google-cloud-spanner:6.48.0:6.48.0 +google-cloud-spanner-executor:6.48.0:6.48.0